2 Replies Latest reply on Apr 2, 2009 9:41 AM by Vladimir Lubenchenko

    Seam and <h:panelGrid columns="2".. problem

    Vladimir Lubenchenko Newbie

      Hello all,


      Sorry for my english.


      I've some problem with using seam and jsf h:panelGrid tag..
      There is a jsp :




      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns="http://www.w3.org/1999/xhtml" version="2.0">
      
      
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:s="http://jboss.com/products/seam/taglib"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:rich="http://richfaces.org/rich"
            xmlns:a4j="http://richfaces.org/a4j">
      
      <f:view locale="de" contentType="text/html">
      
      <f:loadBundle basename="messages" var="mymsg"/>
      
      
      <h:form id="statisticcatalogsform">
      
      
      <h:panelGrid columns="1" width="100%" >
      
             <ui:include src="menustatistics.jsp"/>
      
      
      
      
        <rich:panel>
          <h:panelGrid id="panelcompound" columns="2">
      
              <rich:panel id="panelleft">
                <h:panelGrid  width="400px" columns="1">
                     ... 
                     ...
                </h:panelGrid>
              </rich:panel>
      
             <rich:panel id="panelright">
                 <h:panelGridcolumns="2">
                    ...
                    ...
                </h:panelGrid>
              </rich:panel>
      
       
          </h:panelGrid>
         </rich:panel>
      






      Problem in show panels with ids panelleft and panelright. This panels displayed in 1 column (panel panelcompound  ignored ). (problem not exists without seam (only richfaces) )


      :(


      Thank you.



        • 1. Re: Seam and <h:panelGrid columns="2".. problem
          Arbi Sookazian Master

          1) It is universally accepted that Facelets is a superior view technology when compared to JSP.  That's why it is included in JSF 2.0 spec.  Recommend you start using Facelets (xhtml).


          2) what exactly is the problem/error you're seeing?  don't understand.  are you saying you don't experience the problem in an app developer w/o Seam but w/ RF?  The difference would be mostly that you don't have access to the Seam tags (e.g., <s:link>) and you need JSF managed/backing beans.

          • 2. Re: Seam and <h:panelGrid columns="2".. problem
            Vladimir Lubenchenko Newbie
            Thank you Ron for your answer! My problem in following.. I've developed application with using richfaces and it working fine. But I need to add seam in my application for some reasons. I've updated my web.xml for it.


            <?xml version="1.0" encoding="UTF-8"?>
            <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
                     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-app_2_5.xsd">


            <!-- Seam -->

               <listener>
                  <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
               </listener>


                <filter>
                    <filter-name>Seam Filter</filter-name>
                    <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
                </filter>

                <filter-mapping>
                    <filter-name>Seam Filter</filter-name>
                    <url-pattern>/*</url-pattern>
                </filter-mapping>

               <servlet>
                  <servlet-name>Seam Resource Servlet</servlet-name>
                  <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
               </servlet>

               <servlet-mapping>
                  <servlet-name>Seam Resource Servlet</servlet-name>
                  <url-pattern>/seam/resource/*</url-pattern>
               </servlet-mapping>

                <context-param>
                    <param-name>com.sun.faces.verifyObjects</param-name>
                    <param-value>false</param-value>
                </context-param>
                <context-param>
                    <param-name>com.sun.faces.validateXml</param-name>
                    <param-value>true</param-value>
                </context-param>
                <context-param>
                    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                    <param-value>client</param-value>
                </context-param>


                <servlet>
                    <servlet-name>Faces Servlet</servlet-name>
                    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                    <load-on-startup>1</load-on-startup>
                </servlet>
                <servlet-mapping>
                    <servlet-name>Faces Servlet</servlet-name>
                    <url-pattern>/faces/*</url-pattern>
                </servlet-mapping>


                  <!-- Richfaces -->

                    <context-param>
                        <param-name>org.richfaces.SKIN</param-name>
                        <param-value>blueSky</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>



                <session-config>
                    <session-timeout>
                        30
                    </session-timeout>
                </session-config>
                <welcome-file-list>
                    <welcome-file>faces/index.jsp</welcome-file>
                </welcome-file-list>


                </web-app>



            All working fine but I've problem with compounds elements in some jsf's. Exactly:

            Tag panelGrid columns=2  not working.
            You are right - I haven't experience in SEAM on this moment..