2012-09-11 20 views
0

我是新的整個oracle adf的東西。所以請原諒我這個問題。commandlink上的更新表單點擊adf

在我的JSP頁面中,我得到了一個tabel,上面是一個視圖。當我點擊tabel中的一個commandlink時,視圖應該會顯示細節。但是,如何通過點擊命令鏈接來調用表單的loadData。

這裏是澄清的佈局:

<h:form> 
    <tr:panelHeader text="Browse" styleClass="af_m_toolbar" size="-1"/> 
    <tr:panelFormLayout> 
     <tr:panelLabelAndMessage label="#{bindings.name.hints.label}"> 
      <tr:outputText value="#{bindings.name.inputValue}"/> 
     </tr:panelLabelAndMessage> 
     <tr:panelLabelAndMessage label="#{bindings.id.hints.label}"> 
      <tr:outputText value="#{bindings.id.inputValue}"/> 
     </tr:panelLabelAndMessage> 
     <tr:panelLabelAndMessage label="#{bindings.salary.hints.label}"> 
      <tr:outputText value="#{bindings.salary.inputValue}"/> 
     </tr:panelLabelAndMessage> 
    </tr:panelFormLayout> 
    <tr:table value="#{bindings.emp.collectionModel}" var="row" rows="#{bindings.emp.rangeSize}" 
       emptyText="#{bindings.emp.viewable ? 'No data to display.' : 'Access Denied.'}" 
       width="100%" inlineStyle="width:100%"> 
     <tr:column sortProperty="#{bindings.emp.hints.name.name}" sortable="false" inlineStyle="width:100%"> 
      <tr:outputText value="#{row.bindings.name.inputValue}" styleClass="af_m_listingLink"/> 
      <tr:outputText value="ID: #{row.bindings.id.inputValue} Salery: #{row.bindings.salary.inputValue}" 
          styleClass="af_m_listingDetails"/> 
     </tr:column> 
    </tr:table> 
</h:form> 

我使用Oracle JDeveloper11克R2。這應該成爲adf移動瀏覽器應用程序,因此我只使用特立尼達組件。

感謝您的幫助 安傑洛漢納斯

+0

天使,請告訴我們你正在使用哪個jdev版本。該代碼使用正常的jsf代碼,但我沒有看到綁定旁邊的任何adf東西。你使用特立尼達嗎? –

+0

我正在使用Oracle JDeveloper 11g R2。這應該成爲adf移動瀏覽器應用程序,因此我只使用特立尼達組件。 –

回答

0

你將不得不使用ppr。您可以將partialPageRefresh設置爲true,並給出將觸發此組件刷新的組件Id。例如:

<tr:panelLabelAndMessage label="#{bindings.name.hints.label}" id="pl1"> 
    <tr:outputText value="#{bindings.name.inputValue}"/> 
</tr:panelLabelAndMessage> 
<tr:panelLabelAndMessage label="#{bindings.id.hints.label}"> 
    <tr:outputText value="#{bindings.id.inputValue}" partialTriggers="pl1"/> 
</tr:panelLabelAndMessage> 

這將意味着component1更改時將刷新component2。

0

嘗試表單上使用PartialPageRefresh(http://myfaces.apache.org/trinidad/devguide/ppr.html)。爲此,您將鏈接ID作爲partialTriggers添加到窗體或panelFormLayout。 這是ADF的工作原理,從未在特立尼達進行過測試。