0
votes

I am new to the whole oracle adf thing. So please excuse me for this question.

In my JSP page I got a tabel and above it is a view. The view should display details, when I click on a commandlink in the tabel. But how can I invoke the loadData of the form on click of the commandlink.

Here is the layout for clarification:

<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>

I am using Oracle JDeveloper 11g R2. This should become a adf mobile browser application, therefore I am only using trinidad components.

Thanks for your help Angelo Hannes

2
Angel, please tell us which jdev version you are using. The code uses normal jsf code but I don't see any adf stuff beside the bindings. Do you use Trinidad? - Timo Hahn
I am using Oracle JDeveloper 11g R2. This should become a adf mobile browser application, therefore I am only using trinidad components. - Angelo.Hannes

2 Answers

0
votes

You would have to use ppr. You can set the partialPageRefresh to true and give the component Id which would trigger this component to get refreshed. Something like :

<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>

This would mean the component2 would get refreshed when component1 changes.

0
votes

Try to use PartialPageRefresh (http://myfaces.apache.org/trinidad/devguide/ppr.html) on your form. For this you add the link id as partialTriggers to the form or panelFormLayout. This is how it works in ADF, never tested this in Trinidad.