myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Weber" <v.we...@inexso.de>
Subject Re: [Tobago] How does tc:gridLayout fix the overall page size?
Date Wed, 20 Jun 2007 15:27:35 GMT
Hi Zied,

you need at least specify the width and height in the page tag.

You can additionally add a implementation of PageState as state.
With this tobago can calculate the correct browser size.

see the addressbook example:
http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/addressbook/src/main/webapp/WEB-INF/tags/layout/basic.tag?view=markup
http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Layout.java?view=markup


Regards,
    Volker

2007/6/20, Zied Hamdi <javahamdi@gmail.com>:
> Hi Tobago Team,
>
> I have a problem with the sizes of my components. I have a first page with
> the following layout code:
>
>
> <f:view>
>  <tc:loadBundle basename="into-i" var="i18n" />
>  <tc:page label="#{i18n.pageTitle}" id="page">
>   <jsp:body>
>    <tc:form id="personForm">
>     <tc:panel>
>      <f:facet name="layout">
>       <tc:gridLayout rows="300px;20px;1*" />
>      </f:facet>
>
>      <tc:box label="#{i18n.person_info_fieldset}">
> ...some comps...
>
>      </tc:box>
>
>      <tc:panel></tc:panel>
>
>      <tc:panel id="clientDetails">
>       <f:facet name="layout">
>        <tc:gridLayout rows="1*" />
>       </f:facet>
>
>       <f:subview id="details">
>        <jsp:include flush="true" page="personDetailTabs.jsp" />
>       </f:subview>
>       </tc:panel>
>
>     </tc:panel>
>    </tc:form>
>   </jsp:body>
>  </tc:page>
> </f:view>
>
>
>
> in the included file I have a big componenent of 650px (at least):
>
> personDetailTabs.jsp:
>
>
> <tc:tabGroup rendered="#{personCtrl.showDetailView}">
>
>  <tc:tab id="personDetailTab" label="#{i18n.personDetail}">
>   <tc:panel id="personDetailPanel">
>    <f:facet name="layout">
>     <tc:gridLayout columns="2*;3*" rows=" 250px;400px" />
>    </f:facet>
>
>    <tc:cell id="personMainPart">
>     <tc:panel>
>      <f:facet name="layout">
>       <tc:gridLayout rows="fixed;fixed;1*" />
>      </f:facet>
>
>      <tc:toolBar id="personCommands" orientation="center">
>       <tc:toolBarCommand action="#{personCtrl.save}"
>        label="#{i18n.save}" transition="true" />
>       <tc:toolBarCommand action="#{personCtrl.cancel}"
>        label="#{i18n.cancel}" transition="true" />
>      </tc:toolBar>
>
>      <f:subview id="personInfoSubview">
>       <jsp:include page="personInfo.jsp" flush="false" />
>      </f:subview>
>
>      <tc:panel></tc:panel>
>     </tc:panel>
>    </tc:cell>
>
>    <tc:cell>
>     <jsp:include flush="true" page="phoneListBox.jsp" />
>    </tc:cell>
>
>    <tc:cell spanX="2">
>     <jsp:include flush="true" page="adressListBox.jsp" />
>    </tc:cell>
>
>   </tc:panel>
>  </tc:tab>
>
>
>
> <tc:tab label="#{i18n.contracts}">
> ...
>  </tc:tab>
>
> <tc:tab label="#{i18n.interventions}">
> ...
>  </tc:tab>
>
> </tc:tabGroup>
> I was expecting to have the contents of personDetailTabs.jsp on 650 pixels,
> but the whole page is on some 770 pixels (that leaves a small piece for the
> desired part and a big blanc under it: see image1.png).
>
> I've tried to avoid putting pixels by doing rows="250px;1*" instead of rows
> ="250px;400px", but that leads to have even less desired effects because the
> space reserved to the 1* is put under a scroll pane (see image2.png )
>
> In both cases the lower component is the same (even if it was set to
> rows="300px;20px;1*").
>
> It seems the server side computation supposes a certain size for the screen
> and doesn't take this property from the browser. If it's the case, what do
> you suggest please?
>
> Regards,
> Zied
>

Mime
View raw message