jsf - The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within <h:form> -


i getting following error on facelet page, consists of icefaces form 2 fields , 2 buttons:

the form component needs have uiform in ancestry. suggestion: enclose necessary components within <h:form>

here form:

<ice:form id="form1" partialsubmit="false">     <ice:panellayout id="panellayout3">         <ice:graphicimage id="graphicimage1" url="/resources/images/loginimage.jpg" width="560" />         <ice:outputlabel for="j_username" id="outputlabel1" value="username:"/>         <ice:outputlabel for="j_password" id="outputlabel2" value="password:"/>         <ice:inputtext binding="#{login.username}" id="j_username" required="true" />         <ice:inputsecret binding="#{login.password}" id="j_password" required="true" />         <ice:commandbutton  actionlistener="#{login.login}" id="loginbtn" value="login"/>         <ice:commandbutton action="#{login.reset}" id="resetbtn" value="reset"/>         <ice:outputtext id="errormessage" />         <ice:message errorclass="errormessage" for="j_username" fatalclass="fatalmessage" id="messages1" infoclass="infomessage" showsummary="false" warnclass="warnmessage"/>     </ice:panellayout> </ice:form> 

how caused , how can solve it?

this not error. warning. code looks fine, input components inside form, seems should run , work fine. if indeed works fine, ignore warning. warning displayed when context parameter javax.faces.project_stage set development anyway .

as false warning message itself, check introduced in mojarra 2.1.1 per issue 1663. however, per issue 2147 turns out have bugs , been further improved in mojarra 2.1.3. i'd imagine false warning in particular case caused having <ice:panellayout> between form , input elements.

if aren't on mojarra 2.1.3 yet, may want consider upgrading see if removes false warning message.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -