Situation with <s:div rendered="">: <h:form> does not work within <s:div rendered="">
spagop Aug 24, 2009 11:05 AMHi altogeher,
I have now an issue with
<h:form>
into
<s:div>
. I have a vertical list menu in a xhtml file home.xhmtl, Where I can click on one menu to open it in the same xhtml, so that I can apply the action for the menu (e.g. Change password). The problem is that when I click on the commandButton for changing the password nothing happen. I suppose that the problem come from
<s:div id="MyDetailsDiv" rendered="#{navigator.view == 'mydata'}"> <s:div id="MyPasswordDiv" rendered="#{navigator.subview == 'MyPassword'}">
Note that the rendering is not the problem, rendering works fine, but the form does not call the action
action="#{changePassword.change}"
But when I removed
<s:div id="MyDetailsDiv" rendered="#{navigator.view == 'mydata'}"> <s:div id="MyPasswordDiv" rendered="#{navigator.subview == 'MyPassword'}">
then the form calls the action changePassword.change great.
Here is a snippet of my home.xhtml, May be someone already got so a problem.
.... <div id="main" class="main_content"> <div id="wrapperDiv" class="wide"> <div id="content"> <div class="w"> <s:div id="MyDetailsDiv" rendered="#{navigator.view == 'mydata'}"> <s:div id="MyPasswordDiv" rendered="#{navigator.subview == 'MyPassword'}"> <h1 class="c">#{messages['msg.user.home.mypassword.update']}</h1> <h3 class="c">#{messages['msg.user.home.mypassword.select']}</h3> <div style="width: 220px;"> <h:form id=ChangePasswordForm> <div id="panelChangePassword" class="normalPara"> <h:outputLabel for="currentPassword" value="Enter your current password: "/> <h:inputSecret id="currentPassword" value="#{changePassword.currentPassword}" maxlength="12" size="32" class="textBox"/> <h:outputLabel for="newPassword" value="Enter a new password: "/> <h:inputSecret id="newPassword" value="#{changePassword.newPassword}" maxlength="12" size="32" class="textBox"/> <h:outputLabel for="newPasswordVerify" value="Confirm your new password: "/> <h:inputSecret id="newPasswordVerify" value="#{changePassword.newPasswordVerify}" maxlength="12" size="32" class="textBox"/> <div> <h:commandButton id="changePassword" action="#{changePassword.change}" value="" image="/themes/2009/img/change-password.gif" alt="Change password" style="border-width:0px;" r/> </div> </div> </h:form> </div> </s:div> </s:div> </div> </div> </div> </div> </div> </ui:define> </ui:composition>
Thanks in advance and I will appreciate any helps / tips and tricks
Cheers,