Hi Volker,
thanks for your hints, I am making good progress.
In the meantime I did figure out how to write the controller, but the hint with
the ids is quite valuable.
Can you point me to some kind of documentation, since valueBinding is not a
feature specific to Tobago, but rather to JSF ?
I took me quite a while to realise how to add components, (no add method and
the setParent is forbidden) but instead, getChildren.add() ...
How do I add a facet, or rather a Layout Manager. I tried adding it, but it had
no effect e.g.:
UIPanel rootPanel = new UIPanel();
List childList = rootPanel.getChildren();
UIOutput someText = new UIOutput();
someText.setValue("Hello World !");
UIOutput some2 = new UIOutput();
some2.setValue("Line 2");
UIGridLayout layout = new UIGridLayout();
layout.setRows( "2");
layout.setColumns("1");
childList.add( layout);
childList.add( someText);
childList.add( some2);
I would have thought that this should render as 2 lines, but I renders
everything on a single line.
Thanks for your help,
Peter
> Hi Peter,
>
> the bindig must be a valueBinding not a methodBinding!
>
> e.g. with
>
> > <tc:panel id="content" binding="#{myBean.contentPanel}">
> > <%-- content filled by application --%>
> > </tc:panel>
>
> your bean should provide a method
>
> public UIPanel getContentPanel() {
> if (contentPanel == null) {
> createPanel();
> }
> return contentPanel
> }
>
> and in createPanel() you should create the content subtree:
>
> public void createPanel() {
> // create the panel
> contentPanel = new UIPanel();
> contentPanel.setId("contentPanel");
> // IMPORTANT set a unique id to each code created UIComponent
> contentPanel.setRendererType(TobagoConstants.RENDERER_TYPE_PANEL);
>
> // create panel content
> UIOutput text = new UIOutput();
> text.setId("text");
> text.setRendererType(TobagoConstants.RENDERER_TYPE_OUT);
> text.setValue("some text value here");
>
> // add content to panel
> contentPanel.getChildren().add(text);
> }
>
>
> Regards
> Volker
>
>
>
>
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer