Reputation: 301
I want to update <p:inputText>
from backing bean after business logic is finished.
I have two properties in backing bean prop1
and prop2
, and corresponding UI component as <p:inputText>
. But when i update both ui component, they are not updated with the latest value from business logic. I tried to update using p:ajax and also with RequestContext
but both are not working.
<p:inputText id="htmlDivs"
style="display:inline"
ajax="true"
value="#{backingbean.deviceHtml}"/>
<p:inputText id="paths"
style="display:inline"
ajax="true"
value="#{backingbean.connections}"/>
And
RequestContext.getCurrentInstance().update(Arrays.asList("myform:htmlDivs",
"myform:paths",
"myform:devicePortTable"));
Strange thing is devicePortTableis
updated. Any suggestion?
Thanks Brijesh
Upvotes: 0
Views: 3898
Reputation: 587
Try to remove immediate="true"
and also remove <p:ajax>
cause it has no effect because you already has update attribute in your <p:commandButton>
<p:commandButton id="reloadSVGBtn"
styleClass="pbutton"
value="Hidden"
actionListener="#{myform.reloadSVG}"
update=":topologyViewForm:htmlDivs :topologyViewForm:paths">
</p:commandButton>
and for a further details read this.
Upvotes: 1