Hi!

Thank you for your response.

This is my first attempt to do some component-binding ... and it looks now like 
this:

jsp:

<t:panelTabbedPane binding="#{homeBean.tabPane}">
</t:panelTabbedPane>

bean:

public HtmlPanelTabbedPane getTabPane() {
        HtmlPanelTabbedPane hptp = new HtmlPanelTabbedPane();
                
        // tab 1
        HtmlPanelTab tab0 = new HtmlPanelTab();
        tab0.setParent(hptp);
        tab0.setId("panelTab0");
        tab0.getAttributes().put("label", "Tab 1");             
        hptp.getChildren().add(tab0);
                
        // tab 2
        HtmlPanelTab tab1 = new HtmlPanelTab();
        tab1.setParent(hptp);
        tab1.setId("panelTab1");
        tab1.getAttributes().put("label", "Tab 2");             
        hptp.getChildren().add(tab1);
        
        return hptp;
}

Ok ... this gives me two tabs on my page - so far so good.

But ... how can i fill up each tab with content now? Is there a way to do that 
from my jsp?

By the way ... somebody knows a good tutorial that could help me with 
component-binding?

Thanks,
Harry

-----Ursprüngliche Nachricht-----
Von: Dennis Byrne [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 08. Dezember 2005 08:05
An: MyFaces Discussion
Betreff: Re: panelTabbedPane with dynamic-tabs

Try using the the binding attribute with 
<t:panelTabbedPane> .  This will allow you to 
programmatically add or substract each tab.

---- Original message ----
>Date: Thu, 8 Dec 2005 00:39:28 +0100
>From: Harald Müller <[EMAIL PROTECTED]>  
>Subject: panelTabbedPane with dynamic-tabs  
>To: <users@myfaces.apache.org>
>
>Hi!
>
>I'd like to use the "panelTabbedPane" and create the tabs 
dynamically (reading from a xml-file).
>
>I'm getting a list of "objects" from my bean and for each 
list-item a new tab should be
>generated.
>
>My jsf-code looks like this:
>
><t:panelTabbedPane bgcolor="#FFFFCC" >
><c:forEach items="${homeBean.uiData}" var="tabDataValue">
>  <c:set var="tabData" scope="request" 
value="${tabDataValue}"/>
>  <t:panelTab id="tab1" label="#{tabData.tabName}" >
>       <h:outputText value="#{tabData.tabName}" /> 
>  </t:panelTab>
></c:forEach>
></t:panelTabbedPane>
>
>I think it's not a good idea to mix jstl with jsf ... so i 
tried the "dataList" from tomahawk too.
>
>Something like:
>
><t:panelTabbedPane bgcolor="#FFFFCC" >
><t:dataList value="${homeBean.uiData}" var="tabData">
>  <t:panelTab id="tab1" label="#{tabData.tabName}" 
rendered="true">
>       <h:outputText value="#{tabData.tabName}" /> 
>  </t:panelTab>
></t:dataList>
></t:panelTabbedPane>
>
>But I'm just getting weird results ... and nothing seems to 
work.
>
>What am I doing wrong? ... Thanks for advise!
>
>Is a possible solution for my problem mentioned here:
>http://www.mail-
archive.com/users@myfaces.apache.org/msg11352.html
>???
>
>regards
>Harry

Dennis Byrne

Reply via email to