Tuesday, March 29, 2016

Programmatic PPR af:outputText refresh issues - no PPR-capable ID found for elements of: RichOutputText [UIXFacesBeanImpl, id=ot05]

We sometimes see the below issue on doing a programmatic refresh of af:outputText Component

The error message

PprResponseWriter$PPRTag> <finish> no PPR-capable ID found for elements of: RichOutputText[UIXFacesBeanImpl, id=ot05]

Why do we see this issue?

By default, the framework does not generate the ids for the components unless and absolutely required to optimize the page performance but we need id to be present at the client side to do PPR and thus we see the issue in doing a programmatic PPR of af:outputText. This issue can be solved in 2 methods described below.

Solution 1

Set the clientComponent="true" for the output text, sample is as below

              <af:outputText value="Test" id="ot5" styleClass="share-error"
                             binding="#{backingBeanScope.MB.message}"
                             clientComponent="true"/>

Refer to <af:outputText> documentation for more details on the clientComponent attribute

Solution 2

Add the following in web.xml

<context-param>
    <param-name>
      oracle.adf.view.rich.SUPPRESS_IDS
    </param-name>
    <param-value>auto</param-value>
</context-param>

No comments:

Post a Comment