myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Weber" <>
Subject Re: Using Tobago dynamically from jsp ??
Date Thu, 05 Oct 2006 21:12:47 GMT
HI Peter,

There is no docu for the TobagoConstants, to find out how to use you
neet to look into the sources.

to create the component structure programatically you need to know the
structure your resulting tree should have.

if in doubt create the structure in jsf tags and rebuild this in java.

each tag could have attributes and subtags as children and facets.

attributes must set at the UIComponent object, take a look at the
Tag-class source code to see how this must done.

subtags, if not the facet tag, are own UIComponent objects which must
added to che children list of the parent.

a facet has only one subtag which is a UIComponent and must added to
the parents facetMap with the name attribute as key.

so far the general steps.
In your case:
the value attribute of selectOneChoice (or any other UISelectOne) mut
be the same type as the selectItems objects (first argument in
the SelectItem array must set as value of a UISelectItems subcomponent.


2006/10/5, Peter Rabing <>:
> Hi Volker,
> I am steadily making progress with the component tree but I am still battling with a
lot of basics. Maybe you can give me a hint:
> 1. Where do I find some documentation on which TobagoConstants.ATTR_* work on which component
? Is it along the lines of HTML ?
> 2. I create a combo box:
>  UISelectOne combo = new UISelectOne();
>  combo.setId( id);
>  combo.setRendererType( TobagoConstants.RENDERER_TYPE_SELECT_ONE_CHOICE);
>  SelectItem[] items = new SelectItem [ 3];
>  for( int i=0; i < 3; i++)
>     items[i] = new SelectItem( ""+i, ""+i);
>  combo.setValue( items);
> The combo box is displayed, but disabled and does not contain any values.
> In general, what steps do I take to discover what the problem is ?
> Thanks,
> Peter
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN:
View raw message