5 Replies Latest reply on Mar 8, 2010 7:44 AM by Nick Belaevski

    Not able to view <rich:panelMenu in browser

    Sandeep Gowda Newbie

      I am using JSF framework, i have a file containing as below, when opened in Browser(IE/Firefox), its blank....

       

      <html>
          <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">

       

              <head>
                  <title>Customer Details Page</title>
                  <style>
      .cols {
          vertical-align: top;
          width: 50%;
      }
      </style>

       

              </head>
              <body>
             
                      <h:form id="form">
                          <h:panelGrid columns="2" columnClasses="cols" width="100%">
                              <rich:panelMenu style="width:200px" mode="ajax">
                                  <rich:panelMenuGroup label="Group 1">
                                      <rich:panelMenuItem label="Item 1.1">
                                          <f:param name="current" value="Item 1.1" />
                                      </rich:panelMenuItem>
                                      <rich:panelMenuItem label="Item 1.2">
                                          <f:param name="current" value="Item 1.2" />
                                      </rich:panelMenuItem>
                                      <rich:panelMenuItem label="Item 1.3">
                                          <f:param name="current" value="Item 1.3" />
                                      </rich:panelMenuItem>
                                  </rich:panelMenuGroup>
                              </rich:panelMenu>
                              <rich:panel bodyClass="rich-laguna-panel-no-header">
                                  <a4j:outputPanel ajaxRendered="true">

       

                                  </a4j:outputPanel>
                              </rich:panel>
                          </h:panelGrid>
                      </h:form>
             
              </body>
          </ui:composition>
      </html>

       

      View source of browser is as below

       

      <html xmlns="http://www.w3.org/1999/xhtml">
          <head><script src="/DEBT/a4j_resources/org/ajax4jsf/framework.pack.js.faces" type="text/javascript"></script><script src="/DEBT/a4j_resources/org/richfaces/ui.pack.js.faces" type="text/javascript"></script><link class="component" href="/DEBT/a4j_resourcesorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.faces" rel="stylesheet" type="text/css" /><link class="component" href="/DEBT/a4j_resourcesorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.faces" media="rich-extended-skinning" rel="stylesheet" type="text/css" /><script type="text/javascript">window.RICH_FACES_EXTENDED_SKINNING_ON=true;</script></head><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">

              <head>
                  <title>Customer Details Page</title>
                  <style>
      .cols {
          vertical-align: top;
          width: 50%;
      }
      </style>

              </head>
              <body>
             
                      <h:form id="form">
                          <h:panelGrid columns="2" columnClasses="cols" width="100%">
                              <rich:panelMenu style="width:200px" mode="ajax">
                                  <rich:panelMenuGroup label="Group 1">
                                      <rich:panelMenuItem label="Item 1.1">
                                          <f:param name="current" value="Item 1.1" />
                                      </rich:panelMenuItem>
                                      <rich:panelMenuItem label="Item 1.2">
                                          <f:param name="current" value="Item 1.2" />
                                      </rich:panelMenuItem>
                                      <rich:panelMenuItem label="Item 1.3">
                                          <f:param name="current" value="Item 1.3" />
                                      </rich:panelMenuItem>
                                  </rich:panelMenuGroup>
                              </rich:panelMenu>
                              <rich:panel bodyClass="rich-laguna-panel-no-header">
                                  <a4j:outputPanel ajaxRendered="true">

                                  </a4j:outputPanel>
                              </rich:panel>
                          </h:panelGrid>
                      </h:form>
             
              </body>
          </ui:composition>
      </html>

       

      regards

      Sandeep

        • 1. Re: Not able to view <rich:panelMenu in browser
          Nick Belaevski Master

          Hi,

           

          Check that:

           

          1. You have correctly configured view handler

          2. Page address is correct

          • 2. Re: Not able to view <rich:panelMenu in browser
            Sandeep Gowda Newbie

            Below attached the Web.xml content.Can you please help if any issues.

             

             

            <display-name>Greeter</display-name>
                <context-param>
                    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                    <param-value>server</param-value>
                </context-param>
                <context-param>
                    <param-name>org.richfaces.SKIN</param-name>
                    <param-value>blueSky</param-value>
                </context-param>
                <context-param>
                    <param-name>org.richfaces.CONTROL_SKINNING</param-name>
                    <param-value>enable</param-value>
                </context-param>
                <context-param>
                    <param-name>org.richfaces.LoadScriptStrategy</param-name>
                    <param-value>ALL</param-value>
                </context-param>
                <context-param>
                    <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>
                    <param-value>a4j_resources</param-value>
                </context-param>
                <filter>
                    <display-name>RichFaces Filter</display-name>
                    <filter-name>richfaces</filter-name>
                    <filter-class>org.ajax4jsf.Filter</filter-class>
                </filter>
                <filter-mapping>
                    <filter-name>richfaces</filter-name>
                    <servlet-name>Faces Servlet</servlet-name>
                    <dispatcher>REQUEST</dispatcher>
                    <dispatcher>FORWARD</dispatcher>
                    <dispatcher>INCLUDE</dispatcher>
                </filter-mapping>
                <filter>
                    <display-name>Ajax4jsf Filter</display-name>
                    <filter-name>ajax4jsf</filter-name>
                    <filter-class>org.ajax4jsf.Filter</filter-class>
                </filter>
                <filter-mapping>
                    <filter-name>ajax4jsf</filter-name>
                    <servlet-name>Faces Servlet</servlet-name>
                    <dispatcher>REQUEST</dispatcher>
                    <dispatcher>FORWARD</dispatcher>
                    <dispatcher>INCLUDE</dispatcher>
                </filter-mapping>
                <listener>
                    <listener-class>
                        com.sun.faces.config.ConfigureListener
                    </listener-class>
                </listener>
                <context-param>
                    <param-name>javax.faces.CONFIG_FILES</param-name>
                    <param-value>/WEB-INF/faces-config.xml</param-value>
                </context-param>
                <!-- Faces Servlet -->
                <servlet>
                    <servlet-name>Faces Servlet</servlet-name>
                    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                    <load-on-startup>1</load-on-startup>
                </servlet>
                <!-- Faces Servlet Mapping -->
                <servlet-mapping>
                    <servlet-name>Faces Servlet</servlet-name>
                    <url-pattern>*.faces</url-pattern>
                </servlet-mapping>

             

             

            regards

            Sandeep

            • 3. Re: Not able to view <rich:panelMenu in browser
              Nick Belaevski Master
              I don't see ViewHandler configured. Check if it is defined in faces-config.xml?
              • 4. Re: Not able to view <rich:panelMenu in browser
                Sandeep Gowda Newbie

                hi,

                I have only entries for managed-bean in my facesconfig., if any thing to be added can you please guide me.

                 

                <?xml version="1.0" encoding="UTF-8"?>
                <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
                    xmlns:xi="http://www.w3.org/2001/XInclude"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
                    <managed-bean>
                        <managed-bean-name>LoginBean</managed-bean-name>
                        <managed-bean-class>login.Login</managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <navigation-rule>
                        <from-view-id>/Jsf/Login.jsp</from-view-id>
                        <navigation-case>
                            <from-outcome>logoutSucess</from-outcome>
                            <to-view-id>/Jsf/logoutError.jsp</to-view-id>
                        </navigation-case>
                    </navigation-rule>
                    <managed-bean>
                        <managed-bean-name>RegistrationBean</managed-bean-name>
                        <managed-bean-class>
                            registration.InternalRegistration
                        </managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>searchCustomerBean</managed-bean-name>
                        <managed-bean-class>search.SearchCustomer</managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>assetInformationBean</managed-bean-name>
                        <managed-bean-class>asset.AssetInformation</managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>liabilityInformationBean</managed-bean-name>
                        <managed-bean-class>
                            liability.LiabilityInformation
                        </managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>invoice</managed-bean-name>
                        <managed-bean-class>
                            invoice.InvoiceInformation
                        </managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>income</managed-bean-name>
                        <managed-bean-class>
                            income.IncomeInformation
                        </managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>expenditureBean</managed-bean-name>
                        <managed-bean-class>
                            expenditure.ExpenditureInformation
                        </managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>DMPMainBean</managed-bean-name>
                        <managed-bean-class>dmp.DMPMainInformation</managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>DMPBean</managed-bean-name>
                        <managed-bean-class>dmp.DMPInformation</managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>dmpSearchBean</managed-bean-name>
                        <managed-bean-class>
                            dmp.search.DMPSearch
                        </managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                    <managed-bean>
                        <managed-bean-name>dmpAdviceBean</managed-bean-name>
                        <managed-bean-class>
                            dmp.advice.DMPAdvice
                        </managed-bean-class>
                        <managed-bean-scope>session</managed-bean-scope>
                    </managed-bean>
                </faces-config>

                 

                regards

                Sandeep