3 Replies Latest reply on Feb 5, 2008 5:42 PM by Guillaume Jeudy

    Multiple random rendering of facelet components

    Guillaume Jeudy Master


      I am upgrading a seam1.2 JSF1.1 application to seam2.0 JSF1.2.

      Now that I finished upgrading and deployed the upgraded app to the server, I display the same facelet page that used to work before, now it displays randomly several times the same components (several forms, buttons etc in random order).

      I followed scrutinously guidelines to migrate to seam 2.0 JSF1.2. I'm running in JBoss 4.2.2.

      All facelet(*.xhtml) pages are exhibiting the same behavior except for pages with no forms or buttons.

      Can anybody give hints of what could be wrong ? I will gladly supply all required information to troubleshoot this issue.


        • 1. Re: Multiple random rendering of facelet components
          Guillaume Jeudy Master

          I figured its a s:decorate tag causing the funky behavior. I removed the s:decorate tags, even though I don't know what could be causing the issue.

          Now the page is rendering normally except that nothing happens when I click a button on the page. The same page gets rerendered even though it should get to the stateful bean execution.

          Prior to seam2.0/JSF1.2 upgrade this exact same button click used to bind to a stateful bean method execution which did some processing and returned a different view id.

          Has anyone experienced something similar ?

          • 2. Re: Multiple random rendering of facelet components
            Guillaume Jeudy Master

            No outstanding exception happens on the server side. The seam phase listener processes the request and renders the same page as the response without getting to my stateful ejb method execution. See page below:

            #{packageEditAction.selectReleasePackage} should resolve to my stateful bean method execution (none of the code has changed between the upgrade from seam 1.2.1 to seam 2.0.

            Any help would be greatly appreciated,

            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
             xmlns:s="http://jboss.com/products/seam/taglib" template="template.xhtml">
             <ui:define name="body">
             <script type="text/javascript" src="rdm.js"></script>
             <h:messages />
             <h:form id="packageForm">
             <table border="1">
             <td width="100%" colspan="3" align="center">
             <h4>Release Packages</h4>
             <td width="50%"><b>Select a Release Package: </b>
             <td width="50%"><h:selectOneListbox
             id="existrel" value="#{relPkg}" required="false" size="20">
             <s:selectItems value="#{releasePackagesResult}" var="relPkg"
             label="#{relPkg.releasePackageId}--#{relPkg.releasePackageNm}" />
             <s:convertEntity />
             <h:commandButton value="Manage Release Package Items"
             action="#{packageEditAction.selectReleasePackage}" />

            • 3. Re: Multiple random rendering of facelet components
              Guillaume Jeudy Master

              I added a new s:button with the same #{packageEditAction.selectReleasePackage} side by side on the same page and it executes normally (well at least I get to the intended view (I have other types of errors but it is not in the interest of this thread)

              I believe there is something seriously wrong with my setup. I can't conceive this would be bugs in seam2.0.

              see my config, the web.xml:

              <?xml version="1.0" encoding="UTF-8"?>
              <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
               <!-- Seam -->
               <servlet-name>Seam Resource Servlet</servlet-name>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <!-- ************************ Seam Filter **************************** -->
               <filter-name>Seam Filter</filter-name>
               <filter-name>Seam Filter</filter-name>
               <!-- JSF -->
               <!-- -->
               <!-- ************************ Faces Servlet Mapping **************************** -->


              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE faces-config
              PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"


              <?xml version="1.0" encoding="UTF-8"?>
              <components xmlns="http://jboss.com/products/seam/components"
               xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
               http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
               http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
               http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd
               http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd">
               <component name="org.jboss.seam.core.init">
               <property name="myFacesLifecycleBug">true</property>
               <property name="jndiPattern">
               <property name="debug">false</property>
               <component name="org.jboss.seam.remoting.remoting">
               <property name="debug">false</property>
               <core:manager conversation-timeout="120000"
               concurrent-request-timeout="500" conversation-id-parameter="cid" />
               <persistence:managed-persistence-context name="entityManager"
               persistence-unit-jndi-name="java:/rdmEntityManagerFactory" />
               <transaction:ejb-transaction />

              I don't have any pages.xml setup, I don't think the issue is in the persistence layer therefore I haven't included my datasource.xml and persistence.xml.

              Let me know if you have any pointers. I am seriously considering starting from scratch with an example app as a template and slowly adding to it and see at which point it will start breaking.