10 Replies Latest reply on Sep 22, 2010 3:29 AM by jshepher

    Unknown RunTime error

    sivaprasad9394

      I am trying to open the model panel when i click the edit button that time i am getting below error in IE8, the same code working properly in Chrome and Mozilla.

       

      1)I have main page which consists h:form and tabs.

      2)using a4j:include i have added pages in all the tabs.(this page also have h:form)

      3) In the included page i have Edit button and if i click the button it should open model panel.

      4)Modelpanel also have h:form tag.(i have defined model panel code in separate jsp page)

       

      In my case i removed all the sun form tag and tried that time also it is not working.If i keep the model panel code in a4j:include page means it is working.Different jsp page means it is not working.If i remove all the form tag that time it is telling undefined for model panel id.

       

       

      Webpage error details
      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
      Timestamp: Tue, 14 Sep 2010 06:15:19 UTC
      Message: Unknown runtime error
      Line: 2373
      Char: 3
      Code: 0

      Webpage error details


      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

      Timestamp: Tue, 14 Sep 2010 06:15:19 UTC



      Message: Unknown runtime error

      Line: 2373

      Char: 3

      Code: 0

      URI: http://localhost:8080/Sample22/a4j/g/3_3_2.GA/org/ajax4jsf/framework.pack.js.jsf

       

       

      What could be route cause of the error????Thank you for reading my post.

       

       


       

        • 1. Re: Unknown RunTime error
          harut

          be sure that you have no nested 'form' tags in your pages... Also post your page code

          • 2. Re: Unknown RunTime error
            sivaprasad9394

            Hi Harut,

             

            Thanks for your reply.This is my problem,

             

            have main page inside mail page my code looks like this,Iam getting error in IE8 like this,
            But in Mozilla nd Chrome it is working fine.
            even i tried with removing forms in sub pages(nested forms) also,it shows the same error in IE8.
            MainPage.jsp
            <rich:tabPanel  switchType="client" id="tp1" styleClass="tabbertab" >
             
            <rich:tab label="General Info" name="General Info" styleClass="myClass">
            <a4j:region id="generalInforegion">
            <a4j:commandLink ajaxSingle="true" id="nameEditLinks" styleClass="celcomNoColor01"
            reRender="postpaidNameField" value="#{msg['statusEdit']}" immediate="true"
            oncomplete="#{rich:component('edit_info_nricmodal')}.show();">
            </a4j:commandLink>
            <a4j:include id="generalInformationPage" viewId="/existingcustomer/postpaid/genaralinformation/generalinfo/generalInformation.jsp"/>
            </a4j:region>
            </rich:tab>
            </rich:tabPanel>
            <rich:tabPanel  switchType="client" id="tp1" styleClass="tabbertab" ><rich:tab label="General Info" name="General Info" styleClass="myClass"><a4j:region id="generalInforegion"><a4j:commandLink ajaxSingle="true" id="nameEditLinks" styleClass="celcomNoColor01"reRender="postpaidNameField" value="#{msg['statusEdit']}" immediate="true"oncomplete="#{rich:component('edit_info_nricmodal')}.show();"></a4j:commandLink><a4j:include id="generalInformationPage" viewId="/existingcustomer/postpaid/genaralinformation/generalinfo/generalInformation.jsp"/></a4j:region></rich:tab>
            generalInformation.jsp
            <f:subview id="postpaidCustomerView">
            <h:form id="postpaidCustomerForm">
            <a4j:outputPanel ajaxRendered="true">
            <a4j:region id="postpaidCustomerRegion">
            <table width="100%" border="0" cellspacing="1" cellpadding="1" >
                        <tr>
            <td width="147"><h:outputText  value="#{msg['existingcustomer.tab.postpaid.postpaid.name']}"/></td>
               <td width="5"><h:outputText value=":" /></td>
                              <td width="638" class="font_exist">
               <h:outputText id="postpaidNameFields" styleClass="style1" value="#{generalInformationBean.name}"/></td>
                              <td width="30">
                              <a4j:commandLink ajaxSingle="true" id="nameEditLinks" styleClass="celcomNoColor01"
            reRender="postpaidNameField" value="#{msg['statusEdit']}" immediate="true"
            oncomplete="#{rich:component('edit_info_nricmodal')}.show();">
            </a4j:commandLink></td>            
            </tr>
                </table>
            </a4j:region>
            </a4j:outputPanel>
            </h:form>
            <!-- Adding Model panel starts here -->
            <c:import url="../generalinfo/infonriceditmodal.jsp"/>
            <!-- Adding model panel ends here -->
            </f:subview>
            infornriceditmodel.jsp
            <f:subview id="info_nric_editmodalsubview">
            <rich:modalPanel id="edit_info_nricmodal" moveable="false" resizeable="false"
            width="950" height="450">
            <f:facet name="header">
            <h:outputText value="Edit Customer Info" styleClass="modalPanel12"/>
            </f:facet>
            <f:facet name="controls">
            <h:panelGroup>
            <h:graphicImage value="../_assets/image/close.png" id="hidelinkedit_info_nric"
            styleClass="hidelink" />
            <rich:componentControl for="edit_info_nricmodal" attachTo="hidelinkedit_info_nric"
            operation="hide" event="onclick" />
            </h:panelGroup>
            </f:facet>
            <h:form id="edit_info_nric_modal_Form">
            <table class="font_exist" width="950" height="50%" border="0" cellpadding="0" cellspacing="0">
                              <tr><td> ..................sample text </td></tr></table>
            </h:form>
            </rich:modalPanel>
            </f:subview>

            I have main page inside mail page my code looks like this,Iam getting error in IE8 like this,

            URI: http://localhost:8080/sample/a4j/g/3_3_2.GA/org/ajax4jsf/framework.pack.js.jsf

            But in Mozilla nd Chrome it is working fine.

             

            even i tried with removing forms in sub pages(nested forms) also,it shows the same error in IE8.

             

            MainPage.jsp

             

            <f:subview id="CustomerView">

            <h:form id="CustomerForm">

            <a4j:outputPanel ajaxRendered="true">

            <a4j:region id="Region">

             

            <rich:tabPanel  switchType="client" id="tp1" styleClass="tabbertab" >

             

            <rich:tab label="General Info" name="General Info" styleClass="myClass">

            <a4j:region id="generalInforegion">

            <a4j:commandLink ajaxSingle="true" id="nameEditLinks" styleClass="celcomNoColor01"

            reRender="postpaidNameField" value="#{msg['statusEdit']}" immediate="true"

            oncomplete="#{rich:component('edit_info_nricmodal')}.show();">

            </a4j:commandLink>

            <a4j:include id="generalInformationPage" viewId="/existingcustomer/postpaid/genaralinformation/generalinfo/generalInformation.jsp"/>

            </a4j:region>

            </rich:tab>

            </rich:tabPanel>

             

             

            <rich:tabPanel  switchType="client" id="tp1" styleClass="tabbertab" ><rich:tab label="General Info" name="General Info" styleClass="myClass"><a4j:region id="generalInforegion"><a4j:commandLink ajaxSingle="true" id="nameEditLinks" styleClass="celcomNoColor01"reRender="postpaidNameField" value="#{msg['statusEdit']}" immediate="true"oncomplete="#{rich:component('edit_info_nricmodal')}.show();"></a4j:commandLink><a4j:include id="generalInformationPage" viewId="/existingcustomer/postpaid/genaralinformation/generalinfo/generalInformation.jsp"/></a4j:region></rich:tab>

             

            </a4j:region>

            </a4j:outputPanel>

            </h:form>

            </f:subview>

             

             

            generalInformation.jsp

             

             

            <f:subview id="postpaidCustomerView">

            <h:form id="postpaidCustomerForm">

            <a4j:outputPanel ajaxRendered="true">

            <a4j:region id="postpaidCustomerRegion">

            <table width="100%" border="0" cellspacing="1" cellpadding="1" >

                        <tr>

            <td width="147"><h:outputText  value="#{msg['existingcustomer.tab.postpaid.postpaid.name']}"/></td>

               <td width="5"><h:outputText value=":" /></td>

                              <td width="638" class="font_exist">

               <h:outputText id="postpaidNameFields" styleClass="style1" value="#{generalInformationBean.name}"/></td>

                              <td width="30">

                              <a4j:commandLink ajaxSingle="true" id="nameEditLinks" styleClass="celcomNoColor01"

            reRender="postpaidNameField" value="#{msg['statusEdit']}" immediate="true"

            oncomplete="#{rich:component('edit_info_nricmodal')}.show();">

            </a4j:commandLink></td>            

             

            </tr>

                </table>

            </a4j:region>

            </a4j:outputPanel>

            </h:form>

            <!-- Adding Model panel starts here -->

             

            <c:import url="../generalinfo/infonriceditmodal.jsp"/>

             

            <!-- Adding model panel ends here -->

            </f:subview>

             

             

             

             

            infornriceditmodel.jsp

             

             

            <f:subview id="info_nric_editmodalsubview">

            <rich:modalPanel id="edit_info_nricmodal" moveable="false" resizeable="false"

            width="950" height="450">

            <f:facet name="header">

            <h:outputText value="Edit Customer Info" styleClass="modalPanel12"/>

            </f:facet>

            <f:facet name="controls">

            <h:panelGroup>

            <h:graphicImage value="../_assets/image/close.png" id="hidelinkedit_info_nric"

            styleClass="hidelink" />

            <rich:componentControl for="edit_info_nricmodal" attachTo="hidelinkedit_info_nric"

            operation="hide" event="onclick" />

            </h:panelGroup>

            </f:facet>

            <h:form id="edit_info_nric_modal_Form">

            <table class="font_exist" width="950" height="50%" border="0" cellpadding="0" cellspacing="0">

                              <tr><td> ..................sample text </td></tr></table>

             

            </h:form>

            </rich:modalPanel>

            </f:subview>

             

             

            I tried removing nested form also but in IE8 i cant see the modal panel page.

            Any help would be appreciate..

            • 3. Re: Unknown RunTime error
              liuliu

              hi,

              do you include the same page twice?

              i suggest you put all your code in one page, and see what happens.

              • 4. Re: Unknown RunTime error
                sivaprasad9394

                Thank you for your reply.My problem is When i click edit button it should open one modal panel,As per previous discussion this is one model panel page

                infornriceditmodel.jsp

                 

                Like wise  i have 10 edit in my page so 10 modal panel in one jsp page means my code will be mess ,so only i have created 10 model panels as seperate page and while clicking Edit i am trying to open model panel.

                • 5. Re: Unknown RunTime error
                  liuliu

                  in your second poste, i dont know if it is a problem de copy-paste. you have 2 tabpanel include the same modalpanel.

                   

                  #{rich:component('edit_info_nricmodal')} try to find the first modalpanel with this id in the view, it use the short id, not the complete id.

                   

                  and i see you rerender all your tabpanel automatically with ajaxRendered="true", it could be a problem for modalpanel.

                  • 6. Re: Unknown RunTime error
                    sivaprasad9394

                    Still i am facing the problem i cant open popup,after giving the full path id also,

                     

                    ERRORMAIN.JPG

                    • 7. Re: Unknown RunTime error
                      liuliu

                      hi,

                      when i have this kind problem, i put all code in one single page to see if it works at first. because the includ could bring some surprises.

                      and then put them in seperate files to find out the problem..

                      • 8. Re: Unknown RunTime error
                        sivaprasad9394

                        yes i agree your answer.Thank you for reply.But in my case i have 30-40 tabs and some tabs have sub tabs and sub tabs have sub tabs in single page divided into modules .so in a single jsp means it comes around n-number of lines code.So i is mess and can't debug also.How to solve this issue

                        • 9. Re: Unknown RunTime error
                          liuliu

                          Did you try with firebug to find if your modalpanel is unique?

                          • 10. Re: Unknown RunTime error
                            jshepher

                            If it is possible to use a h:outputLink, instead of a4j:commandLink, to render the ModalPanel, please do so using the following code snippet:

                             

                            <h:outputLink value="#" id="link">
                               showModal
                               <rich:componentControl for="edit_info_nricmodal" attachTo="link" operation="show" event="onclick"/>
                            </h:outputLink>

                             

                            I have raised an issue in Jira about this issue, which I have verified for 3.3.2.GA, 3.3.2.SR1, and 3.3.3.Final

                            https://jira.jboss.org/browse/RF-936