primemobile view navigate data not updated

if you have 2 view in a xhtml, 1st view do the calculation and 2nd view display the result of the calculation.

Then the 2nd view would not updated because the page is pre-generated .

For now I have to use two different page for this, have not found a way using “update” for another view. update in commandButton is good for update component within the same view though.


Got the solution just now. Actually very easy, just add the red part.

<p:commandButton value=”Submit” action=”#{surveyManager.calculate}” update=”:resultDisplay”/>   //if in the same view, just add the id to update

//This is in another view

<h:outputText id=”resultDisplay” value=”#{surveyManager.finalScore}” />

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s