You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Harald Müller <ha...@wimaxtelecom.at> on 2005/12/08 00:39:28 UTC

panelTabbedPane with dynamic-tabs

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