You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Linke <mi...@me.com> on 2014/04/23 10:36:37 UTC

[TOBAGO] Problem with building a UISheet

Hello!

I'm have some problems with creating a Table. I want to create a dynamic table with some columns in it.

Here is my simplified code:

UIColumn col = (UIColumn) FacesContext.getCurrentInstance().getApplication().createComponent(UIColumn.COMPONENT_TYPE);
col.setBorderLeft(Measure.valueOf(1));
col.setBorderRight(Measure.valueOf(1));
col.setPaddingLeft(Measure.valueOf(1));
col.setPaddingRight(Measure.valueOf(1));
col.setId("ID");
col.setLabel("Label");

UIOut element = (UIOut) FacesContext.getCurrentInstance().getApplication().createComponent(UIOut.COMPONENT_TYPE);
element.setId("ID_Element");
element.setValue("Test");

col.getChildren().add(element);

sheet.getChildren().add(col);
sheet.setColumns("150px");



The result is that I get a Table with one column (as expected) but without the out-Element.
Any Ideas whats wrong?

I'm using Tobago 1.5.10.


Bets Regards,

Michael

Re: [TOBAGO] Problem with building a UISheet

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

the sheet iterates over a collection of objects. You need to set the sheets
value with this collection.

regards,

  Volker



2014-04-23 10:36 GMT+02:00 Michael Linke <mi...@me.com>:

> Hello!
>
> I'm have some problems with creating a Table. I want to create a dynamic
> table with some columns in it.
>
> Here is my simplified code:
>
> UIColumn col = (UIColumn)
> FacesContext.getCurrentInstance().getApplication().createComponent(UIColumn.COMPONENT_TYPE);
> col.setBorderLeft(Measure.valueOf(1));
> col.setBorderRight(Measure.valueOf(1));
> col.setPaddingLeft(Measure.valueOf(1));
> col.setPaddingRight(Measure.valueOf(1));
> col.setId("ID");
> col.setLabel("Label");
>
> UIOut element = (UIOut)
> FacesContext.getCurrentInstance().getApplication().createComponent(UIOut.COMPONENT_TYPE);
> element.setId("ID_Element");
> element.setValue("Test");
>
> col.getChildren().add(element);
>
> sheet.getChildren().add(col);
> sheet.setColumns("150px");
>
>
>
> The result is that I get a Table with one column (as expected) but without
> the out-Element.
> Any Ideas whats wrong?
>
> I'm using Tobago 1.5.10.
>
>
> Bets Regards,
>
> Michael
>



-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de