2 Replies Latest reply on May 19, 2008 4:24 AM by leelavathic leelavathic

    Java script error in cancel request - richfaces-3.2.0

    leelavathic leelavathic Novice

      Hi,

      From a modal panel, if i select cancel button, the same page from where this modal panel is intiated has to be rendered. But in the process, I am getting java script error from ajax4jsf and the blank page is getting displayed. I am getting this error only with richfaces 3.2.0 and no issues with richfaces 3.1.3.

      Code:
      <a4j:commandButton value="#{myBean.modalButton}" action="cancel" styleClass="rsButton" immediate="true" oncomplete="javascript:Richfaces.hideModalPanel('myModalPanel')"></a4j:commandButton>

      Can anybody suggest me if any solution?

      Thanks in advance!

        • 1. Re: Java script error in cancel request - richfaces-3.2.0
          Ilya Shaikovsky Master

          1) I can't see reRender attribute.
          2) please show full modal panel code

          • 2. Re: Java script error in cancel request - richfaces-3.2.0
            leelavathic leelavathic Novice

            Hi,
            Here is the complete code for my modal panel.

            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich"
            xmlns:c="http://java.sun.com/jsp/jstl/core">


            //I have set of java script functions here


            <f:view>
            <a4j:region>
            <h:form id="myPanel">
            <rich:spacer width="12" height="5"/>
            <rich:panel styleClass="noBorder" id="myRichPanel" style="height:210px;width:560px;overflow-x:auto;overflow-y:hidden;margin-left:10px;margin-right:10px;">
            <rich:spacer width="10"/>
            <rich:message for="varName" infoClass="myStyle" errorClass="errorStyle">
            <f:facet name="errorMarker">
            <h:graphicImage value="error.gif" />
            </f:facet>
            </rich:message>
            <h:panelGrid columns="3" id="myGrid" styleClass="rsPanelStyles" columnClasses=",,col2" style="margin-left:0px;margin-right:0px;">
            //I have set of output and input text properties
            <a4j:region>
            <h:panelGrid id="selectPanel" columns="7" rendered="#{myBean.dataType == 'SELECT'}">
            //i have a set of components here
            </h:panelGrid>
            </a4j:region>
            </h:panelGrid>
            <h:panelGrid columns="3" id="selectDeleteRegion" columnClasses=",,col2" styleClass="rsPanelStyles" rendered="#{myBean.dataType == 'SELECT'}" style="margin-left:0px;margin-right:0px;">
            // i have a set of componets here
            </h:panelGrid>
            <h:panelGrid columns="4" styleClass="rsPanelStyles" columnClasses=",,,col2" style="margin-left:0px;margin-right:0px;" rendered="#{myBean.showGroupSelect}">
            // i have a set of components here like input and output properties and command buttons
            </h:panelGrid>
            </rich:panel>
            <rich:spacer height="15" width="10" />
            <h:panelGrid columns="4" >
            // i have a set of components here like command buttons
            </h:panelGrid >
            </h:form>
            </a4j:region>
            </f:view>
            </ui:composition>