You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Zied Hamdi <ja...@gmail.com> on 2007/12/19 10:10:47 UTC

[tobago] Layouting problem

Hi island people :-)

I have some trouble understanding how layouting works: (you can see the
trouble in images (attached)).
All the scrollbars you see result from the following simple snippet : (the
orange background can even be removed: I tried to remove the outer scroll by
enforcing the box to be smaller)


                  <tc:tabGroup>



                        <tc:tab label="#{i18n.planning}">

                             <f:facet name="layout">

                                   <tc:gridLayout rows="160px" />

                             </f:facet>



                             <tc:box id="taskTablePanel">

                                   <f:facet name="toolBar">

                                         <tc:toolBar>

                                               <tc:toolBarCommand

                                                     image="image/new.GIF"

                                                     action="#{
contractCtrl.newTaskCmd}"

                                                     tip="|nouvelle tache">

                                               </tc:toolBarCommand>

                                         </tc:toolBar>

                                   </f:facet>

                                   <f:facet name="layout">

                                         <tc:gridLayout rows="130px" />

                                   </f:facet>



                                   <ui:include src="/contract/taskTable.xhtml"
/>



                             </tc:box>

                        </tc:tab>

In my include I have directly a tc:sheet. I've also attempted to use
pagingLength="3" to have the table max size smaller, the table continues
to show more than 3 rows at a time.
Can you please send me to a doc where i can have a better understanding of
how sizes are computed?


Regards,
Zied

Re: [tobago] Layouting problem

Posted by Zied Hamdi <ja...@gmail.com>.
Hi again Volker,

At first view, do you think it doesn't behaves like it should? or is it more
a misuse?

I didn't try the snippet alone, do I have to check if happens also when no
other layouting is around? Anyway all layouting is done by Tobago.

Regards,
Zied


2007/12/19, Zied Hamdi <ja...@gmail.com>:
>
> Hi Volker :-)
>
> ui:include behaves as if it just "pastes" the content of the included file
> (you probably answered by your question to a bahavior that seemed strange to
> me: "why ui:include doesn't create a f:subview behind the scene". The answer
> is maybe: to avoid side effects like the one that could occur with
> layouting).
>
> Anyway, I inserted the content of the sheet directly into the page (who
> knows), the result is the same.
>
> so here's the content of /contract/taskTable.xhtml directly included
>
>
>                              <tc:box id="taskTablePanel" >
>
>                                    <f:facet name="toolBar" >
>
>                                          <tc:toolBar >
>
>                                                <tc:toolBarCommand
>
>                                                      image="image/new.GIF"
>
>                                                      action= "#{
> contractCtrl.newTaskCmd}"
>
>                                                      tip= "|nouvelle
> tache">
>
>                                                </tc:toolBarCommand >
>
>                                          </tc:toolBar >
>
>                                    </f:facet >
>
>                                    <f:facet name="layout" >
>
>                                          <tc:gridLayout rows="130px" />
>
>                                    </f:facet >
>
>
>
>                                    < tc:sheet
>
>                                          xmlns ="
> http://www.w3.org/1999/xhtml"
>
>                                          xmlns:jsp ="
> http://java.sun.com/JSP/Page"
>
>                                          xmlns:tc ="
> http://myfaces.apache.org/tobago/component"
>
>                                          xmlns:tx ="
> http://myfaces.apache.org/tobago/extension"
>
>                                          xmlns:ui ="
> http://java.sun.com/jsf/facelets"
>
>                                          xmlns:h ="
> http://java.sun.com/jsf/html"
>
>                                          xmlns:f ="
> http://java.sun.com/jsf/core"
>
>                                          id ="workTaskTable"
>
>                                          pagingLength ="3"
>
>                                          columns =
> "18px;*;*;105px;75px;75px;105px;*"
>
>                                          value ="#{contractCtrl.planning}"
>
>                                          var ="intervention">
>
>
>
>                                          < tc:column>
>
>                                                < tc:link
>
>                                                      id =
> "workTaskDetailLink"
>
>                                                      image =
> "image/edit.PNG"
>
>                                                      action ="#{
> contractCtrl.workTaskController.editTaskCmd}"
>
>                                                      actionListener ="#{
> contractCtrl.editTaskLsnr}" />
>
>                                          </ tc:column>
>
>
>
>                                          < tc:column label= "|Categorie">
>
>                                                < tc:link
>
>                                                      id ="category"
>
>                                                      label ="#{
> intervention.category.name}"
>
>                                                      action ="
> contractCtrl.workTaskController.editTaskCmd" />
>
>                                          </ tc:column>
>
>
>
>                                          < tc:column label= "#{
> i18n.intervenant}">
>
>                                                < tc:link
>
>                                                      id ="intervenant"
>
>                                                      label ="#{
> intervention.intervenant.firstName} #{intervention.intervenant.lastName}"
>
>                                                      action ="contract" />
>
>                                          </ tc:column>
>
>
>
>                                          < tc:column label ="#{
> i18n.workStartDate}" >
>
>                                                < tx:date
>
>                                                      id = "workStartDate"
>
>                                                      value = "#{
> intervention.workStartDate}"
>
>                                                      labelWidth = "0px">
>
>                                                      < f:convertDateTime
> pattern= "dd.MM.yyyy" />
>
>                                                </ tx:date >
>
>                                          </ tc:column>
>
>
>
>                                          < tc:column label ="#{
> i18n.workStartTime}" >
>
>                                                < tc:time
>
>                                                      id = "workStart"
>
>                                                      value = "#{
> intervention.workStartTime}" />
>
>                                          </ tc:column>
>
>
>
>                                          < tc:column label ="#{
> i18n.workEndTime}" >
>
>                                                < tc:time
>
>                                                      id = "workEnd"
>
>                                                      value = "#{
> intervention.workEndTime}" />
>
>                                          </ tc:column>
>
>
>
>                                          < tc:column label ="#{
> i18n.workEndDate}" >
>
>                                                < tx:date
>
>                                                      id = "workEndDate"
>
>                                                      value = "#{
> intervention.workEndDate}"
>
>                                                      labelWidth = "0px">
>
>                                                      < f:convertDateTime
> pattern= "dd.MM.yyyy" />
>
>                                                </ tx:date >
>
>                                          </ tc:column>
>
>
>
>                                          < tc:column label ="#{i18n.note}">
>
>                                                < tc:in value= "#{
> intervention.note}" />
>
>                                          </ tc:column>
>
>                                    </ tc:sheet>
>
>
>
>
>
>                              </ tc:box>
>
>                         </ tc:tab>
>
>
> Thanks for your interest Volker.
> Regards,
> Zied
>
>
> 2007/12/19, Volker Weber <v....@inexso.de>:
> >
> > Hi Zied,
> >
> > i didn't know the ui:include (i know its facelets but thats all :-))
> > can you try to replace the
> > ui:include with the content of /contract/taskTable.xhtml to see what
> > happens then?
> >
> > If the ui:include creates a UIComponent there may be a problem in
> > tobago.
> >
> > can you post the  /contract/taskTable.xhtml (you may remove the sheets
> > inner content, which is nor relevant here).
> >
> >
> > Regards,
> >    Volker
> >
> >
> >
> > 2007/12/19, Zied Hamdi <ja...@gmail.com>:
> > > Hi island people :-)
> > >
> > > I have some trouble understanding how layouting works: (you can see
> > the
> > > trouble in images (attached)).
> > >
> > > All the scrollbars you see result from the following simple snippet :
> > (the
> > > orange background can even be removed: I tried to remove the outer
> > scroll by
> > > enforcing the box to be smaller)
> > >
> > >
> > >                   < tc:tabGroup>
> > >
> > >
> > >
> > >                          < tc:tab label ="#{i18n.planning}" >
> > >
> > >                               < f:facet name ="layout" >
> > >
> > >                                     < tc:gridLayout rows
> > > ="160px" />
> > >
> > >                               </ f:facet>
> > >
> > >
> > >
> > >                               < tc:box id ="taskTablePanel" >
> > >
> > >                                     < f:facet name
> > > ="toolBar" >
> > >
> > >                                           < tc:toolBar>
> > >
> > >                                                 <
> > > tc:toolBarCommand
> > >
> > >                                                       image
> > > ="image/new.GIF"
> > >
> > >
> > > action ="#{contractCtrl.newTaskCmd}"
> > >
> > >                                                      tip=
> > > "|nouvelle tache">
> > >
> > >                                                </
> > > tc:toolBarCommand>
> > >
> > >                                           </ tc:toolBar>
> > >
> > >                                     </ f:facet>
> > >
> > >                                     < f:facet name
> > > ="layout" >
> > >
> > >                                           < tc:gridLayout
> > > rows ="130px" />
> > >
> > >                                     </ f:facet>
> > >
> > >
> > >
> > >                                     < ui:include src
> > > ="/contract/taskTable.xhtml" />
> > >
> > >
> > >
> > >                               </tc:box >
> > >
> > >                         </tc:tab>
> > >
> > > In my include I have directly a tc:sheet. I've also attempted to use
> > > pagingLength="3" to have the table max size smaller, the table
> > continues to
> > > show more than 3 rows at a time.
> > > Can you please send me to a doc where i can have a better
> > understanding of
> > > how sizes are computed?
> > >
> > >
> > > Regards,
> > > Zied
> > >
> >
> >
> > --
> > inexso - information exchange solutions GmbH
> > Bismarckstraße 13      | 26122 Oldenburg
> > Tel.: +49 441 4082 356 |
> > FAX:  +49 441 4082 355 | www.inexso.de
> >
>
>
>
> --
> Zied Hamdi
> zatreex.sourceforge.net




-- 
Zied Hamdi
zatreex.sourceforge.net

Re: [tobago] Layouting problem

Posted by Zied Hamdi <ja...@gmail.com>.
Hi Volker :-)

ui:include behaves as if it just "pastes" the content of the included file
(you probably answered by your question to a bahavior that seemed strange to
me: "why ui:include doesn't create a f:subview behind the scene". The answer
is maybe: to avoid side effects like the one that could occur with
layouting).

Anyway, I inserted the content of the sheet directly into the page (who
knows), the result is the same.

so here's the content of /contract/taskTable.xhtml directly included


                             <tc:box id="taskTablePanel">

                                   <f:facet name="toolBar">

                                         <tc:toolBar>

                                               <tc:toolBarCommand

                                                     image="image/new.GIF"

                                                     action="#{
contractCtrl.newTaskCmd}"

                                                     tip="|nouvelle tache">

                                               </tc:toolBarCommand>

                                         </tc:toolBar>

                                   </f:facet>

                                   <f:facet name="layout">

                                         <tc:gridLayout rows="130px" />

                                   </f:facet>



                                   <tc:sheet

                                         xmlns="http://www.w3.org/1999/xhtml
"

                                         xmlns:jsp="
http://java.sun.com/JSP/Page"

                                         xmlns:tc="
http://myfaces.apache.org/tobago/component"

                                         xmlns:tx="
http://myfaces.apache.org/tobago/extension"

                                         xmlns:ui="
http://java.sun.com/jsf/facelets"

                                         xmlns:h="
http://java.sun.com/jsf/html"

                                         xmlns:f="
http://java.sun.com/jsf/core"

                                         id="workTaskTable"

                                         pagingLength="3"

                                         columns=
"18px;*;*;105px;75px;75px;105px;*"

                                         value="#{contractCtrl.planning}"

                                         var="intervention">



                                         <tc:column>

                                               <tc:link

                                                     id="workTaskDetailLink"

                                                     image="image/edit.PNG"

                                                     action="#{
contractCtrl.workTaskController.editTaskCmd}"

                                                     actionListener="#{
contractCtrl.editTaskLsnr}" />

                                         </tc:column>



                                         <tc:column label="|Categorie">

                                               <tc:link

                                                     id="category"

                                                     label="#{
intervention.category.name}"

                                                     action="
contractCtrl.workTaskController.editTaskCmd" />

                                         </tc:column>



                                         <tc:column label="#{
i18n.intervenant}">

                                               <tc:link

                                                     id="intervenant"

                                                     label="#{
intervention.intervenant.firstName} #{intervention.intervenant.lastName}"

                                                     action="contract" />

                                         </tc:column>



                                         <tc:column label="#{
i18n.workStartDate}">

                                               <tx:date

                                                     id="workStartDate"

                                                     value="#{
intervention.workStartDate}"

                                                     labelWidth="0px">

                                                     <f:convertDateTime
pattern="dd.MM.yyyy" />

                                               </tx:date>

                                         </tc:column>



                                         <tc:column label="#{
i18n.workStartTime}">

                                               <tc:time

                                                     id="workStart"

                                                     value="#{
intervention.workStartTime}" />

                                         </tc:column>



                                         <tc:column label="#{
i18n.workEndTime}">

                                               <tc:time

                                                     id="workEnd"

                                                     value="#{
intervention.workEndTime}" />

                                         </tc:column>



                                         <tc:column label="#{
i18n.workEndDate}">

                                               <tx:date

                                                     id="workEndDate"

                                                     value="#{
intervention.workEndDate}"

                                                     labelWidth="0px">

                                                     <f:convertDateTime
pattern="dd.MM.yyyy" />

                                               </tx:date>

                                         </tc:column>



                                         <tc:column label="#{i18n.note}">

                                               <tc:in value="#{
intervention.note}" />

                                         </tc:column>

                                   </tc:sheet>





                             </tc:box>

                        </tc:tab>


Thanks for your interest Volker.
Regards,
Zied


2007/12/19, Volker Weber <v....@inexso.de>:
>
> Hi Zied,
>
> i didn't know the ui:include (i know its facelets but thats all :-))
> can you try to replace the
> ui:include with the content of /contract/taskTable.xhtml to see what
> happens then?
>
> If the ui:include creates a UIComponent there may be a problem in tobago.
>
> can you post the  /contract/taskTable.xhtml (you may remove the sheets
> inner content, which is nor relevant here).
>
>
> Regards,
>    Volker
>
>
>
> 2007/12/19, Zied Hamdi <ja...@gmail.com>:
> > Hi island people :-)
> >
> > I have some trouble understanding how layouting works: (you can see the
> > trouble in images (attached)).
> >
> > All the scrollbars you see result from the following simple snippet :
> (the
> > orange background can even be removed: I tried to remove the outer
> scroll by
> > enforcing the box to be smaller)
> >
> >
> >                   < tc:tabGroup>
> >
> >
> >
> >                          < tc:tab label ="#{i18n.planning}" >
> >
> >                               < f:facet name ="layout" >
> >
> >                                     < tc:gridLayout rows
> > ="160px" />
> >
> >                               </ f:facet>
> >
> >
> >
> >                               < tc:box id ="taskTablePanel" >
> >
> >                                     < f:facet name
> > ="toolBar" >
> >
> >                                           < tc:toolBar>
> >
> >                                                 <
> > tc:toolBarCommand
> >
> >                                                       image
> > ="image/new.GIF"
> >
> >
> > action ="#{contractCtrl.newTaskCmd}"
> >
> >                                                      tip=
> > "|nouvelle tache">
> >
> >                                                </
> > tc:toolBarCommand>
> >
> >                                           </ tc:toolBar>
> >
> >                                     </ f:facet>
> >
> >                                     < f:facet name
> > ="layout" >
> >
> >                                           < tc:gridLayout
> > rows ="130px" />
> >
> >                                     </ f:facet>
> >
> >
> >
> >                                     < ui:include src
> > ="/contract/taskTable.xhtml" />
> >
> >
> >
> >                               </tc:box >
> >
> >                         </tc:tab>
> >
> > In my include I have directly a tc:sheet. I've also attempted to use
> > pagingLength="3" to have the table max size smaller, the table continues
> to
> > show more than 3 rows at a time.
> > Can you please send me to a doc where i can have a better understanding
> of
> > how sizes are computed?
> >
> >
> > Regards,
> > Zied
> >
>
>
> --
> inexso - information exchange solutions GmbH
> Bismarckstraße 13      | 26122 Oldenburg
> Tel.: +49 441 4082 356 |
> FAX:  +49 441 4082 355 | www.inexso.de
>



-- 
Zied Hamdi
zatreex.sourceforge.net

Re: [tobago] Layouting problem

Posted by Volker Weber <v....@inexso.de>.
Hi Zied,

i didn't know the ui:include (i know its facelets but thats all :-))
can you try to replace the
ui:include with the content of /contract/taskTable.xhtml to see what
happens then?

If the ui:include creates a UIComponent there may be a problem in tobago.

can you post the  /contract/taskTable.xhtml (you may remove the sheets
inner content, which is nor relevant here).


Regards,
    Volker



2007/12/19, Zied Hamdi <ja...@gmail.com>:
> Hi island people :-)
>
> I have some trouble understanding how layouting works: (you can see the
> trouble in images (attached)).
>
> All the scrollbars you see result from the following simple snippet : (the
> orange background can even be removed: I tried to remove the outer scroll by
> enforcing the box to be smaller)
>
>
>                   < tc:tabGroup>
>
>
>
>                          < tc:tab label ="#{i18n.planning}" >
>
>                               < f:facet name ="layout" >
>
>                                     < tc:gridLayout rows
> ="160px" />
>
>                               </ f:facet>
>
>
>
>                               < tc:box id ="taskTablePanel" >
>
>                                     < f:facet name
> ="toolBar" >
>
>                                           < tc:toolBar>
>
>                                                 <
> tc:toolBarCommand
>
>                                                       image
> ="image/new.GIF"
>
>
> action ="#{contractCtrl.newTaskCmd}"
>
>                                                      tip=
> "|nouvelle tache">
>
>                                                </
> tc:toolBarCommand>
>
>                                           </ tc:toolBar>
>
>                                     </ f:facet>
>
>                                     < f:facet name
> ="layout" >
>
>                                           < tc:gridLayout
> rows ="130px" />
>
>                                     </ f:facet>
>
>
>
>                                     < ui:include src
> ="/contract/taskTable.xhtml" />
>
>
>
>                               </tc:box >
>
>                         </tc:tab>
>
> In my include I have directly a tc:sheet. I've also attempted to use
> pagingLength="3" to have the table max size smaller, the table continues to
> show more than 3 rows at a time.
> Can you please send me to a doc where i can have a better understanding of
> how sizes are computed?
>
>
> Regards,
> Zied
>


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13      | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de