1

I am using a very old version of the JSF - (faces-config version="1.2"). So I guess a lot of great things are missing.

I am using a single XHTML page to do all the stuff for my small application. I have two rich:modalPanel. Both have a h:form within them. I am able to call the form action of the first Modal (say panel 1) but the similar looking code for second modal (panel 2) seems to not work at all. It pops up as expected but just hit the server side action.

//This is the code that calls the modal window
<a:commandButton value="Add Code to Group" reRender="addActivityCodePanel"
    oncomplete="#{rich:component('addActivityCodePanel')}.show()"/>


(//This works )
    <rich:modalPanel id="addActivityCodePanel" autosized="true" resizeable="false" moveable="false" shadowDepth="0" domElementAttachment="parent">
            <f:facet name="header">Add a new Activity Code</f:facet>
            <h:form id="addActivityCodeForm">
                <table id="addActivityCodeTable" border="0" cellspacing="0" cellpadding="4">
                        <tr class="tableHeader">
                            <th align="left" width="50px">&nbsp;</th>
                            <th align="left" width="50px">Activity Code Group</th>
                            <th align="left" width="50px">Key</th>
                            <th align="left" width="100px">Name</th>
                            <th align="left" width="300px">Detailed Description </th>
                            <th align="left" width="600px">Are Days Required?</th>
                        </tr>
                        <tr>
                            <td align="left" valign="top" width="50px">&nbsp;</td>
                            <td align="left" valign="top" width="50px">#{activityStatusAdmin.strSelectedGroup}</td>
                            <td align="left" valign="top" width="50px"><h:inputText id="addActivityCodeKey" value="#{activityStatusAdmin.addBpmActivityCodes.bpmActivityCodeKey}"/></td>
                            <td align="left" valign="top" width="100px"><h:inputText id="addActivityCodeName" value="#{activityStatusAdmin.addBpmActivityCodes.bpmActivityCodeDesc}"/></td>
                            <td align="left" valign="top" width="300px"><h:inputText id="addActivityCodeDesc" value="#{activityStatusAdmin.addBpmActivityCodes.bpmActivityCodeDefinition}"/></td>
                            <td align="left" valign="top" width="600px"><h:selectBooleanCheckbox id="addActivityCodeDays" value="#{activityStatusAdmin.addBpmActivityCodes.isDaysRequired}"/></td>
                        </tr>                           
                        <tr>
                            <td colspan="6"><hr color="#003399" size="1px"/></td>
                        </tr>
                </table>
                <table align="center">
                    <tr>
                    <td><h:commandButton id="SaveCode" value="Save" action="#{activityStatusAdmin.saveNewActivityCode}" oncomplete="#{rich:component('addActivityCodePanel')}.hide()" reRender="paramsPanel" /></td>
                    <td><a:commandButton id="CancelCode" value="Cancel" type="reset" oncomplete="#{rich:component('addActivityCodePanel')}.hide()"/></td>
                    </tr>
                </table>
            </h:form>
        </rich:modalPanel>
Vasil Lukach
  • 3,658
  • 3
  • 31
  • 40
Pradeep R
  • 11
  • 2
  • Just, so that you know I tried just keeping the non working Modal window code to see if having multiple rich:modalPanel was the issue. – Pradeep R Feb 23 '15 at 05:09
  • Upon further Trial & error I have found the culprit to be this code. `` Instead use an input text and the save action is working. This is odd. I cannot use a Textbox where I need a Checkbox right – Pradeep R Feb 23 '15 at 09:08

0 Answers0