4 Replies Latest reply on Mar 30, 2007 5:16 AM by Alexander Belov

    Can anyoine help ? Multiple modal panels

    Michael Zohner Newbie


      I am using richfaces 3.0.1 and I have a dataTable with many entries.

      For each row I have a delete button which deletes the specific entry.

      Now I want to use the modalPanel for a "delete confirmation".

      So, I need multiple modal panels (one for each row).

      I added an identifier to the js call (link), but I am not sure how to tell each modal panel the specific id.

      The code looks like this:

      <h:form id="ruleGroupForm">
      <f:facet name="header">
       <h:outputText value="Id" />
       <h:outputText value="Group Name" />
       <rich:column style="width:150px">
       <h:outputText value="Action" />
       <a href="javascript:Richfaces.showModalPanel('ruleGroupForm:mp#{ruleGroup.regId}',{width:450, top:200})">delete</a>
      <rich:modalPanel id="mp" minHeight="200" minWidth="450"
       height="200" width="500" zindex="2000">
       <f:facet name="header">
       <h:outputText value="Delete Rule Group Confirmation" />
       <f:facet name="controls">
       <a4j:commandButton styleClass="button_blue_border_blue" value="Delete Group" action="#{ruleGroupMaintenance.deleteGroup}" reRender="rules">
       <t:updateActionListener property="#{ruleGroupMaintenance.groupId}" value="#{ruleGroup.regId}"/>
       <a href="javascript:Richfaces.hideModalPanel('ruleGroupForm:mp#{ruleGroup.regId}')">close</a>

      I tried to do something like this:

      <rich:modalPanel id="mp#{ruleGroup.regId}" minHeight="200" ...

      to tell the panel the same id I pass in the js call in the link.

      But this does not work.

      Could anyone help ?