2010-11-23 89 views
0

我正在嘗試根據從彈出窗口中選擇的帳戶將值加載到VF輸入框中。Visual Force頁面幫助

  <apex:pageBlockSectionItem id="pageblocksectionitem5"> 
     <apex:outputLabel value="Account Name"></apex:outputLabel> 
     <apex:panelGroup style="border: 0px solid Blue;" > 
      <apex:outputPanel layout="inline" style="background-color:#CC0000; padding-left: 3px; position: absolute; margin-left: 0px; margin-top: 2px; margin-right: 0px; height: 20px; border: 0px Red; " ></apex:outputPanel>     
      <input type="text" name="AccountName" id="Input12" style="margin-left: 5px; " /><img src="/s.gif" class="lookupIcon" onClick='window.open("/apex/xyz,"width=600,height=400,left=150,top=200,toolbar=1,status =1,");'/> 
     </apex:panelGroup> 
    </apex:pageBlockSectionItem> 

    <apex:pageBlockSectionItem id="pageblocksectionitem3"> 
      <apex:outputLabel value="Linea"></apex:outputLabel> 
      <apex:outputLabel value="{!linea}"></apex:outputLabel> 
     </apex:pageBlockSectionItem> 

我需要從自定義字段linea__c這是從客戶對象的填充LINEA ..我可以查詢得到的字段值。但我需要它在帳戶被選中後立即發生。我該怎麼做?

任何指針將是巨大的......

感謝

回答

1

你需要JavaScript動作......其實可能是最好的將是最標籤actionrerender屬性,你會在Visualforce見組件參考。

另請參閱本教程:http://wiki.developerforce.com/index.php/Force.com_Tutorial:_An_Introduction_to_Visualforce,特別是「教程:Web應用程序在Jiffy中」部分。類似的東西(重組爲新的食譜:http://developer.force.com/cookbook/recipe/using-ajax-in-a-visualforce-page

最後但並非最不重要的 - Visualforce Developer Guide文檔PDF可能對你很有趣 - 關於「創建嚮導」一章(PDF中的第98頁)將是一個很好的但有點太滿了)例子。