Skip to Main Content

h:inputtext not working with multiple forms in JSF2.2

1025201Jul 15 2013

h:inputText is not working in the latest JSF2.2 with multiple forms. I have 2 forms

form1 have: one command button and one input text

form2 has: one input text and one output label

on click of command button in form1, i am rendering the form2(both outputlabel and input text).

but only output label is rendered properly with correct values (corresponding getter method gets called and value is displaying) but the input text is not calling the corresponding getter method hence showing null.

Note: we noticed this issue only if we use multiple forms, within single form its working fine. also it worked fine in JSF2.0

Version used: JSF api - 2.2 (com.sun.faces) JSF impl - 2.2 (com.sun.faces)

let me know if anyone have solution to handle this.

the forms are not nested and both the beans are in View scope.  

<h:form id="form1" prependId="false">
<a4j:commandLink id="actionEdit" title="Click" action="#{bean.action}" 
render="paymentInstructionDetail" styleClass="iconLarge edit" />

<h:form id="form2" prependId="false">
  <a4j:outputPanel ajaxRendered="true" id="paymentInstructionDetail">
  <h:inputText value="#{bean1.amount}" id="sample"/>
  <h:outputLabel value="#{bean1.amount}" id="sampleLabel"/>

Post Details
Added on Jul 15 2013