Search This Blog

Showing posts with label PPR. Show all posts
Showing posts with label PPR. Show all posts

Tuesday, 27 May 2008

Partial Page Renderring (PPR) fails for commandLink within ADF Table

There are 2 ways to get this to work.

Option #1

Follow the technique shown in the blog entry below.

Dynamically-Updating JSP Graph in JSF Page
http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#88

In that example the backing bean for the page illustrates how to allow an updateable UIComponent in a table to trigger partial page rendering for other elements in the page by programmatically calling the ADF Faces addPartialTarget API.

Option #2

1. Make sure the af:table containing the af:commandLink has its id set.
2. Set the PartialSubmit property for the af:commandLink to true.
3. Set the PartialTriggers property for the af:outputText to the following.

tableId:commandLinkId

For example, if the id of the af:table is myTableId and the id for the af:commandLink is cmdTradeName, then the PartialTrigger property for the af:outputText should be set to.

myTableId:cmdTradeName

Example as follows.

<h:form>
<af:table value="#{bindings.findAllPipelineData1.collectionModel}"
var="row" rows="#{bindings.findAllPipelineData1.rangeSize}"
first="#{bindings.findAllPipelineData1.rangeStart}"
emptyText="#{bindings.findAllPipelineData1.viewable ? 'No rows yet.' : 'Access Denied.'}"
id="myTableId">

......

<af:column sortProperty="tradeName" sortable="false"
headerText="#{bindings.findAllPipelineData1.labels.tradeName}">
<af:commandLink text="#{row.tradeName}" id="cmdTradeName"
partialSubmit="true" immediate="true">
<af:setActionListener from="#{row.tradeName}"
to="#{sessionUser.data}"/>
</af:commandLink>
</af:column>
</af:table>
<af:outputText value="#{sessionUser.data}"
partialTriggers="myTableId:cmdTradeName"/>
</h:form>