Hi Boris,

another thing: you are using to much cells.

in general tc:cell is only needed if you need the spanX or spanY
attribute, in all other cases a tc:panel does the same.

if you have just one component inside your cell/panel you can omit this panel.

e.g.:
      <tc:cell>
          <tc:out value="Footer"/>
      </tc:cell>

renders visualy exact like a simple

      <tc:out value="Footer"/>

but the first has mutch overhead in processing and html output.

Regards,
 Volker

2007/3/22, Boris Kovalenko <[EMAIL PROTECTED]>:
Hello!

    How to do aligments with Tobago? With attached peace of code the
tc:box is rendered in center of cell, but I want it be top aligned. Is
this possible? Am I using layout wrong way?

<f:view
    xmlns:f="http://java.sun.com/jsf/core";
    xmlns:ui="http://java.sun.com/jsf/facelets";
    xmlns:tc="http://myfaces.apache.org/tobago/component";
    xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension";>
    <tc:page width="800px" height="600px">
        <f:facet name="layout">
            <tc:gridLayout border="0" margin="10px" columns="*;4*"
rows="100px;*;20px"/>
        </f:facet>
        <tc:cell spanX="2">
            <tc:out value="Header"/>
        </tc:cell>
        <tc:cell spanY="2">
            <tc:out value="Menu"/>
        </tc:cell>
        <tc:cell>
            <tc:panel>
            <f:facet name="layout">
                <tc:gridLayout border="0" rows="fixed"/>
            </f:facet>
            <tc:box label="Test box">
                <f:facet name="layout">
                    <tc:gridLayout border="0" columns="1*;1*" />
                </f:facet>
                <tx:in value="5" required="true" label="Test 1"
tip="test" />
                <tx:in value="6" required="true" label="Test 2"
tip="test" />
            </tc:box>
            </tc:panel>
        </tc:cell>
        <tc:cell>
            <tc:out value="Footer"/>
        </tc:cell>
    </tc:page>
</f:view>

With respect,
    Boris


Reply via email to