5 Replies Latest reply on Oct 15, 2010 9:25 AM by Nikos Paraskevopoulos

    Rich-panel problem

    Max Meyers Newbie

      Hello!


      I have a big problem with rich-panels. I have a rich-panel, where in this rich-panels are decorate-tags with the display.xhtml template of seam-gen. My problem is that the rich-panel don't cover their content (the decorate-tags). These tags are outside the rich-panel.


      Here is my code:


      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <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:s="http://jboss.com/products/seam/taglib"
            xmlns:rich="http://richfaces.org/rich"
            xmlns:a="http://richfaces.org/a4j"
            xmlns:richfaces="http://richfaces.ajax4jsf.org/rich"
            template="layout/after_login.xhtml">
      
           <ui:define name="body">
                <h:form id="profileShow" styleClass="edit">
                     <div id="wrapper">
                     <rich:panel styleClass="rich-panel-body transparent">
                          <f:facet name="header">Pers&#246;nliches</f:facet>
                               <s:decorate template="layout/display.xhtml">
                                    <ui:define name="label"> Vorname </ui:define>
                                    <h:outputText id="tfirstname" value="#{tuser.tfirstname}" />
                               </s:decorate>               
                               <s:decorate template="layout/display.xhtml">
                                    <ui:define name="label"> Nachname </ui:define>
                                    <h:outputText id="tlastname" value="#{tuser.tlastname}" />
                               </s:decorate>
                               <s:decorate template="layout/display.xhtml">
                                    <ui:define name="label"> Geschlecht </ui:define>
                                    <h:outputText id="tgender" value="#{tuser.tgender=='m' ? 'm&#228;nnlich' : 'weiblich'}" />
                               </s:decorate>
                               <s:decorate template="layout/display.xhtml">
                                    <ui:define name="label"> Verein </ui:define>
                                    <h:outputText id="tclub" value="#{tuser.tclub.tname}" />
                               </s:decorate>
                     </rich:panel>
                     </div>
      
      .... and so on (more rich-panel code)
      



      wrapper is like this:


      #wrapper {
         float:left;
         width:100%;
      }
      



      I think you know the display.xhtml, but here it is:


      <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:s="http://jboss.com/products/seam/taglib">
      
          <div class="prop">
              <span class="name">
                  <ui:insert name="label"/>
              </span>
              <span class="value">
                  <ui:insert/>
              </span>
          </div>
      
      </ui:composition>
      
      



      And here is the picture of the ugly site:


      Picture

      By now I am sitting 3 hours in front of my computer thinking about solving the problem and I don't know why my content is not inside my richpanel, but outside.


      It would be extreme cool, if someone knows the problem and can help me!


      Thanks!


      regards,
      max.

        • 1. Re: Rich-panel problem
          Joe Rybacki Newbie

          Move the rich panel outside of the h:form  and everything should render properly. 

          • 2. Re: Rich-panel problem
            Arbi Sookazian Master

            It would be nice if the IDE or JBoss Tools, etc. gave a warning about that (proper nesting of tags in facelets).

            • 3. Re: Rich-panel problem
              Matthias Langer Newbie

              Joe Rybacki wrote on Jul 28, 2009 18:12:


              Move the rich panel outside of the h:form  and everything should render properly. 


              That didn't work for me... the solution I finally came up with is nesting a h:panelGrid into the rich:panel like

              
              <rich:panel header="Foo">
                <h:panelGrid columns="2">
                  <s:decorate template="layout/edit.xhtml">
                    <ui:define name="label">Bar</ui:define>
                    <h:inputText value="#{foo.bar}" required="true"/>
                   </s:decorate>
                   <s:decorate template="layout/edit.xhtml">
                     <ui:define name="label">Baz</ui:define>
                     <h:inputText value="#{foo.baz}" required="true"/>
                   </s:decorate>
                </h:panelGrid>
              </rich:panel>
              


              Still, this smells like a bug to me :-/.

              • 4. Re: Rich-panel problem
                c danzmann Newbie

                I don't know if this is a known issue yet, but i had the same problem today.
                I had to use a gridPanel to arrange my components as well.(Thanks for the hint!)


                I'm using Seam 2.2 and richfaces 3.3.3, and i smell bug, too.

                • 5. Re: Rich-panel problem
                  Nikos Paraskevopoulos Novice

                  Hello,


                  This really smells like CSS problem: try including a <div style="clear:both"></div> at the end of the <rich:panel> or at the end of the <div id="wrapper">. Experiment a little, it will probably solve the problem.


                  Nikos