Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
149
rated 0 times [  156] [ 7]  / answers: 1 / hits: 5550  / 10 Years ago, thu, february 20, 2014, 12:00:00

I have a Button called Add oncilck of add panel needs to be displayed and within the panel there is a cancel button onclick of cancel the panel should be closed my problem is onclicking the add button the panel is coming for a moment and disapperaring. actually i have incuded template_2.xhtml which has .. if i remove from template_2.xhtml the panel is working fine but these warnings are coming like this The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within i want both of things to work fine and warnings should not come .Here is my codei know the problem that i am using 2 times form in 1 xhtml page but not able to overcome that help me out
`



     <h:commandButton value=Add id=show  action=#  onclick=panelwv.show() ></h:commandButton>
<h:form>

<p:panel id=panel widgetVar=panelwv visible=false header=Add Dependents>
<h:panelGrid id=myPanel columns=3 cellpadding=5 styleClass=text-input>


<h:outputText value=/>

<h:outputLabel value=Name style=font-family: cursive;font-size: 18px;font-weight:normal;/>
<h:inputText id=name value=#{depco.depapp.dep.name} styleClass=border label=First Name />
<h:outputText value=/>

<h:outputLabel value=Relationship style=font-family: cursive;font-size: 18px;font-weight:normal;/>
<h:inputText id=rel value=#{depco.depapp.dep.relationship} styleClass=border label=Relationship />
<h:outputText value=/>



<h:outputLabel value=Date of Birth style=font-family: cursive;font-size: 18px;font-weight:normal;/>
<p:calendar id=dob value=#{depco.depapp.dep.dob} showOn=button label=Date of Birth />
<h:outputText value=/>


<h:outputLabel value=Emp Id />
<h:selectOneMenu value=#{depco.depapp.dep.empId} > &nbsp;
<f:selectItems value=#{coemp.empapp.itemsAvailableSelectOne} var=emp itemLabel=#{emp.empId} itemValue=#{emp.empId} />
<f:converter converterId=employeeConverter />
</h:selectOneMenu>
<h:outputText value=/>


<h:commandButton value=Save action=#{depco.createDepAction()}/>
<h:commandButton action=# id=hide onclick=panelwv.hide() value=cancel/>


</h:panelGrid>
</p:panel>
</h:form>
`

More From » jquery

 Answers
0

JSF menu and submenu tags should be included within form tag .so i just mage a separate jsf file with some name(say xyz.xhtml) and i just included the xyz.xhtml in actual jsf page using


[#47567] Wednesday, February 19, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leslijessalyng

Total Points: 650
Total Questions: 85
Total Answers: 109

Location: Croatia
Member since Mon, Sep 6, 2021
3 Years ago
leslijessalyng questions
Fri, Feb 21, 20, 00:00, 4 Years ago
Tue, Jul 30, 19, 00:00, 5 Years ago
Fri, Jul 5, 19, 00:00, 5 Years ago
Wed, Mar 13, 19, 00:00, 5 Years ago
;