ラベル Flex の投稿を表示しています。 すべての投稿を表示
ラベル Flex の投稿を表示しています。 すべての投稿を表示

2010年4月28日水曜日

[SFDC,Flex]:VisualForceでのセッションの渡し方

1時間ほど死んだので、メモ

↓みれ
http://forums.sforce.com/t5/Visualforce-Development/as3Salesforce-swc-Flex-Toolkit-no-longer-working/m-p/148684

visualforceでドメインが変わってしまうのがそもそもいけないと思います。
これでおそらく相当の人が詰まったはず。

以下は上記リンクの核心部分の転載になります。wintamute氏多謝!

/**
 * セッションを取得
 */
public class GetSessionControllerExtension {

    public GetSessionControllerExtension(ApexPages.StandardController stdController) {
        
    }
    
    public String GetMySessionId() {
        return UserInfo.getSessionId();
    }
}

<apex:page standardController="Location__c" extensions="GetSessionControllerExtension">
  <apex:form >
      <apex:pageBlock title="Flex implementation">
                <apex:flash id="flexSOs" src="{!$Resource.SFFlex}" height="100%" width="100%"
                flashvars="session_id={!MySessionId}&server_url={!$Api.Partner_Server_URL_150}"/>
     </apex:pageBlock>
  </apex:form>
</apex:page> 

2010年4月26日月曜日

[Flex]:ローカルファイル読み込み

わすれないうちにメモ

Flash Player 10 のローカルファイルアクセス機能 (FileReference クラス)
http://blogs.adobe.com/akamijo/archives/2008/07/flash_player_10_5.html

Flex Builder 3をFlash Player 10に対応させる
http://as3s.org/2008/10/flex-builder-3-flash-player-10/

標準のエンコードはUTF-8みたい。