Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-5002

Components included with ui:include src="#{pageScopedViewId} broken

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.3.0.BETA2, 2.3.0.Final, 2.3.1.Final
    • Fix Version/s: 2.3.2.CR1
    • Component/s: JSF Integration
    • Labels:
      None
    • Environment:

      JBoss AS 7.1.2, Seam 2.3.0.CR1-SNAPSHOT (r14986)

    • Steps to Reproduce:
      Hide

      1. deploy the attached .ear
      2. go to http://localhost:8080/JBSEAM-5002
      3. click on "Component 2" button
      4. enter "xyzzy" into the input
      5. click the "save" button
      6. notice that nothing happens

      Show
      1. deploy the attached .ear 2. go to http://localhost:8080/JBSEAM-5002 3. click on "Component 2" button 4. enter "xyzzy" into the input 5. click the "save" button 6. notice that nothing happens
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Insert the following stanza into web.xml:

      <context-param>
          <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
          <param-value>false</param-value>
      </context-param>
      

      or instead of turning on for whole web application, use selectively full state saving mode only for viewId, which requires to have PageScope viewID component(s) and partial state saving mode doesn't work.

      <context-param>
          <param-name>javax.faces.FULL_STATE_SAVING_VIEW_IDS</param-name>
          <param-value>/index.xhtml,/component1.xhtml,/component2.xhtml</param-value>
      </context-param>
      
      Show
      Insert the following stanza into web.xml: <context-param> <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name> <param-value> false </param-value> </context-param> or instead of turning on for whole web application, use selectively full state saving mode only for viewId, which requires to have PageScope viewID component(s) and partial state saving mode doesn't work. <context-param> <param-name>javax.faces.FULL_STATE_SAVING_VIEW_IDS</param-name> <param-value>/index.xhtml,/component1.xhtml,/component2.xhtml</param-value> </context-param>

      Description

      The following scenario that used to work in AS5/Seam2.2 doesn't work anymore in AS7/Seam2.3 for page-scoped and conversation-scoped "viewId" components:

      index.xhtml:

      <h:form>
              <h:commandButton action="#{viewId.component1}" value="Component 1" />
              <h:commandButton action="#{viewId.component2}" value="Component 2" />
      </h:form>
         
      <ui:include src="#{viewId.viewId}"/>
      
      @Scope(ScopeType.PAGE)
      @Name("viewId")
      public class ViewIdComponent implements Serializable
      {
         private String viewId = "/component1.xhtml";
         
         public void setViewId(String viewId) {
            this.viewId = viewId;
         }
         
         public String getViewId() {
            return viewId;
         }
         
         public void component1() {
            setViewId("/component1.xhtml");
         }
         
         public void component2() {
            setViewId("/component2.xhtml");
         }
      }
      

      (compoent1 and 2 are redacted, contain a simple form)

      Only the first component works properly, actions in "component2" doesn't seem to be called after switching to "Component 2".

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  maschmid Marek Schmidt
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: