I have the following code and scenario: An output text that will be updated upon user clicking one button.I want to validate in UI when the value updated is empty.
<h:outputText id="Input" value="#{myBean.inputValue}"/>
<p:commandButton update="Input hide"/> //Ajax is true in this button
<h:inputHidden id="hide" value="#{Input}" required="true" requiredMessage="Value cannot be empty" />
I need to update both output text and Hidden value at the same time since I cannot perform validation operations on output text. but what happens is only the output text gets updated and inputHidden is always throwing required message, it is not getting updated. Can anyone please suggest why this is failing?