[richfaces-issues] [JBoss JIRA] Created: (RF-1946) show modalPanel in oncomplete doesn't work

Tomasz Jedzierowski (JIRA) jira-events at lists.jboss.org
Fri Jan 18 08:34:21 EST 2008


show modalPanel in oncomplete doesn't work
------------------------------------------

                 Key: RF-1946
                 URL: http://jira.jboss.com/jira/browse/RF-1946
             Project: RichFaces
          Issue Type: Bug
    Affects Versions: 3.1.3
         Environment: Firefox 2.0, IE 7.0
            Reporter: Tomasz Jedzierowski


I'm trying to show a modalPanel after initialization by user input. The following code does not work.

<a4j:commandButton image="/images/icons/edit.gif" action="#{SoftwareLicenceTypeBean.chooseRow}" reRender="edytuj_typ" oncomplete="cos();"/>

<rich:modalPanel  id="edytuj_typ" minHeight="100" minWidth="250" height="100" width="250" zindex="2000" resizeable="false">
                <f:facet name="header">
                    <h:outputText value="Edytowanie licencji - #{SelectedLicenceTypeBean.licence.name}" />
                </f:facet>
                <f:facet name="controls">
                    <h:graphicImage value="/images/modal/close.png" style="cursor:pointer" onclick="javascript:Richfaces.hideModalPanel('edytuj_typ')" />
                </f:facet>
                <div>
                    <table cellspacing="1" cellpadding="0" class="tableEvidence">
                        <tr>
                            <td class="tName">Nazwa</td>
                            <td class="tValue">
                                <h:inputText value="#{SelectedLicenceTypeBean.licence.name}"/>
                            </td>
                        </tr>
                    </table>
                    <a4j:commandButton value="Dodaj" action="#{SoftwareLicenceTypeBean.editLicence}" onclick="javascript:Richfaces.hideModalPanel('edytuj_typ')" reRender="formularz_typy"/>
                </div>
</rich:modalPanel>


<script>
            function cos() {
                Richfaces.showModalPanel('edytuj_typ',{width:450, top:200});
                }
</script>



When I change the cos() function to:

<script>
            function cos() {
                alert();
                Richfaces.showModalPanel('edytuj_typ',{width:450, top:200});
                }
</script>

Suddenly the modalPanel start appearing. It looks like without, the alert(); function the cos() function doesn't get called.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list