[richfaces-issues] [JBoss JIRA] Commented: (RF-7770) Waste space between 2 columns in rich:layout

Andreas Höhmann (JIRA) jira-events at lists.jboss.org
Thu Aug 27 05:22:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/RF-7770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12482978#action_12482978 ] 

Andreas Höhmann commented on RF-7770:
-------------------------------------

The above template use the following "main-site-template"

<rich:page 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:rich="http://richfaces.org/rich"
  xmlns:a4j="http://richfaces.org/a4j"
  markupType="xhtml-transitional"
  contentType="text/html">
  
  <a4j:loadStyle src="/css/layout.css" />

  <f:facet name="header">
    <h:panelGroup>
      <ui:insert name="site-header"/>
      <title>
      #{bundle['common.website.titel']}
      - #{bundle['common.website.version']} #{ApplicationVersionBean.applicationVersion}
      - #{bundle['common.website.build']} - #{ApplicationVersionBean.applicationBuild}
      </title>
    </h:panelGroup>
  </f:facet>
  
  <rich:layout>
    <rich:layoutPanel id="top" position="top" width="100%">
      <ui:insert name="site-toolbar">
        <div id="toolbarContainer" class="primaryNavigation">
          <h:panelGrid id="toolbarContainerLayout" 
                       cellpadding="0" cellspacing="0"
                       columns="2" columnClasses="toolbar"
                       width="100%">
            <ui:include src="/WEB-INF/facelets/layout/toolbar.xhtml" />
            <a4j:outputPanel layout="block" id="siteTitleContainer">
              <h:outputText value="#{bundle['main.site.title.intro']}:" style="padding: 5px 10px;"/>
              <ui:insert name="site-title"/>
              <br style="clear:both;"/>
            </a4j:outputPanel>
          </h:panelGrid>
        </div>
      </ui:insert>
    </rich:layoutPanel>
    <rich:layoutPanel position="bottom" width="100%">
      <h:panelGrid columns="1" cellpadding="0" cellspacing="0" width="100%">
        <f:facet name="header">
          <!-- little line between toolbar and content -->
          <rich:spacer height="1" rendered="true"/>
        </f:facet>
        <a4j:outputPanel id="siteContainer" layout="block">
          <ui:insert name="site-content"/>
        </a4j:outputPanel>
      </h:panelGrid>
    </rich:layoutPanel>
  </rich:layout>
  
  <f:facet name="footer">
    <ui:insert name="site-footer">
      <a4j:outputPanel id="footer" layout="block">
        <ui:include src="/WEB-INF/facelets/layout/footer.xhtml" />
      </a4j:outputPanel>
    </ui:insert>
  </f:facet>
  
</rich:page>

> Waste space between 2 columns in rich:layout 
> ---------------------------------------------
>
>                 Key: RF-7770
>                 URL: https://jira.jboss.org/jira/browse/RF-7770
>             Project: RichFaces
>          Issue Type: Bug
>          Components: component
>    Affects Versions: 3.3.2.GA
>         Environment: 3.3.2-SNAPSHOT
> FF 3
> IE 6
>            Reporter: Andreas Höhmann
>            Priority: Minor
>
> in the current 3.3.2-SNAPSHOT the layout-render component calculate the width of layout-panels a little bit "wrong"
> i have a 2 column layout "left:30%, right:70%" (i guess "left center" || "center right" produce the same problem) ... here is my template:
> <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:a4j="http://richfaces.org/a4j"
>                 xmlns:rich="http://richfaces.org/rich"
>                 xmlns:c="http://java.sun.com/jstl/core"
>                 xmlns:fn="http://java.sun.com/jsp/jstl/functions"
>                 template="#{initParam.mainTemplate}">
>   <ui:define name="site-title">
>     <h:outputText value="#{bundle['components.header']}" />
>   </ui:define>
>   <ui:define name="site-content">
>     <rich:layout style="width: 100%; height: 100%; background-color: red;">
>       <rich:layoutPanel id="leftColumn" position="left" width="30%">
>         <rich:layout id="leftLayout">
>           <rich:layoutPanel id="leftHeader" position="top" width="100%">
>             <h:panelGrid cellpadding="5" cellspacing="1" width="100%" headerClass="secondaryNavigation">
>               <f:facet name="header">
>                 <ui:insert name="left-header"/>
>               </f:facet>
>             </h:panelGrid>
>           </rich:layoutPanel>
>           <rich:layoutPanel id="leftContent" position="bottom" width="100%">
>             <a4j:outputPanel id="leftContentContainer" layout="block"
>                              styleClass="verticalScrollerContainer"
>                              style="height: 500px; overflow: auto;">
>               <div class="verticalScrollerContainerFix">
>                 <ui:insert name="left-content"/>
>               </div>
>             </a4j:outputPanel>
>           </rich:layoutPanel>
>         </rich:layout>
>       </rich:layoutPanel>
>       <rich:layoutPanel id="contentColumn" position="right" width="70%">
>         <rich:layout id="contentLayout">
>           <rich:layoutPanel id="contentHeader" position="top" width="100%">
>             <h:panelGrid cellpadding="5" cellspacing="1" width="100%" headerClass="secondaryNavigation">
>               <f:facet name="header">
>                 <ui:insert name="content-header"/>
>               </f:facet>
>             </h:panelGrid>
>           </rich:layoutPanel>
>           <rich:layoutPanel id="contentContent" position="bottom" width="100%">
>             <a4j:outputPanel id="contentContentContainer" layout="block"
>                              styleClass="verticalScrollerContainer"
>                              style="height: 500px; overflow: auto;">
>               <div class="verticalScrollerContainerFix">
>                 <ui:insert name="content-content"/>
>               </div>
>             </a4j:outputPanel>
>           </rich:layoutPanel>
>         </rich:layout>
>       </rich:layoutPanel>
>     </rich:layout>
>   </ui:define>
> </ui:composition>
> The rendered html contains the following widths for the columns:
> <div id="leftColumn" style="float: left; width: 29.4%;" width="30%">
> <div id="contentColumn" style="float: right; width: 68.6%;" width="70%">
> The width-calculation in org.richfaces.renderkit.html.LayoutPanelRenderer should be changed. If i define only "%" widths  i expect that the renderer don't change/calculate this widths.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list