0 Replies Latest reply on Nov 18, 2014 5:52 AM by Mario Andala

    dynamic ui:include doesnt load richfaces component

    Mario Andala Newbie

      Hello again. I have a home page with in main page content a ui:include that has src to a backing bean property.

      The backing bean property starts with a blank page (only ui:composition inside) then with a panelmenuitem users can choose next page (changing backing bean property).

      Every components that was not in blank page (then all components) that there will be in the new page dont work, or work bad (button dont fire action, datatable not skinned ecc. ecc.), looks like if they are not present in first page they are not correctly loaded.

      I found a trick and I added in first blank page a hidden panel with all components I will use later inside, but its really a bad solution I think, because if I use a component and I forget to add it in blank page something works bad after and its hard to manage it.

       

      My first and blank page looks like this:

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:a4j="http://richfaces.org/a4j"
        xmlns:rich="http://richfaces.org/rich">
      
      
      
      
        <a4j:outputPanel rendered="false"> 
           <rich:popupPanel modal="true" resizeable="false">
        <f:facet name="header">
        <h:outputText value="Ordine" />
        </f:facet>
        <rich:panel style="width:875px;height:70px;">
        <h:panelGrid columns="3">
        <h:outputLabel value="Cliente" />
        <h:outputLabel value="Registrazione" />
        <h:outputLabel value="Consegna" />
      
        <rich:autocomplete/>
        <rich:calendar>
        </rich:calendar>
        <rich:calendar>
        </rich:calendar>
        </h:panelGrid>
        </rich:panel>
        <div style="height: 5px"></div>
        <rich:toolbar height="26" width="879">
        <rich:toolbarGroup>
        <h:graphicImage value="/images/16x16/document-new.png" styleClass="pic" />
        </rich:toolbarGroup>
        <rich:toolbarGroup>
        <h:graphicImage value="/images/16x16/document-edit.png" styleClass="pic"/>
        </rich:toolbarGroup>
        <rich:toolbarGroup>
        <h:graphicImage value="/images/16x16/document-close.png" styleClass="pic"/>
        </rich:toolbarGroup>
        </rich:toolbar>
        <h:panelGrid columns="3">
        <div style="width: 685px"></div>
        <a4j:commandButton/>
        <a4j:commandButton>
        <rich:componentControl operation="hide"/>
        </a4j:commandButton>
        </h:panelGrid>
           </rich:popupPanel> 
           <rich:calendar/> 
           <rich:collapsiblePanel/> 
           <rich:extendedDataTable>
        <a4j:ajax event="selectionchange" />
           </rich:extendedDataTable>
           <rich:autocomplete />
           <rich:toolbar />
        <rich:toolbarGroup />
        <rich:column />
        <rich:panel />
        <h:commandButton />
        <h:panelGrid />
        <rich:messages />
        </a4j:outputPanel>     
      </ui:composition>
      
      

       

       

      I tried forcing parameters in web.xml but didnt worked:

      <context-param>
        <param-name>org.richfaces.LoadStyleStrategy</param-name>
        <param-value>ALL</param-value>
      </context-param>
      <context-param>
        <param-name>org.richfaces.LoadScriptStrategy</param-name>
        <param-value>ALL</param-value>
      </context-param>
      

      There is some better solution to fix this? its a bug or its normal?

      Thank you.