jsf - How to bind component inside rich:modalPanel -
i have problem rich:modalpanel , rich:calendar.
the code works without modal, when include components in modal recieve nullpointer in date.
working:
<a4j:outputpanel id="datepanel"> <a4j:region> <rich:calendar id="calendar" value="#{ mybean.mydate }" /> <a4j:commandbutton value="confirm" rerender="tablepanel" action="#{ mybean.addtotable }" /> </a4j:region> </a4j:outputpanel>
not working:
<rich:modalpanel id="mpcalendar" height="250" width="350" autosized="true" zindex="1000"> <f:facet name="header"> <h:outputtext value="new date" /> </f:facet> <f:facet name="controls"> <h:graphicimage value="/images/close.gif" onclick="richfaces.hidemodalpanel('mpcalendar')" style="cursor:pointer" /> </f:facet> <a4j:outputpanel id="datepanel"> <a4j:region> <rich:calendar id="calendar" value="#{ mybean.mydate }" /> <a4j:commandbutton value="confirm" rerender="tablepanel" action="#{ mybean.addtotable }" /> </a4j:region> </a4j:outputpanel> </rich:modalpanel>
my questions are: 1. why when put inside modal doesnt work? 2. how can fix it?
i found wrong.
my modalpanel inside form... put modal outside form , added form modal.
example:
<a4j:outputpanel id="datepanel"> <a4j:form> <rich:calendar id="calendar" value="#{ mybean.mydate }" /> <a4j:commandbutton value="confirm" rerender="tablepanel" action="#{ mybean.addtotable }" /> </a4j:form> </a4j:outputpanel> <h:form> ...
Comments
Post a Comment