myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <>
Subject Re: tomahawk dynamic tabbedPane
Date Thu, 13 Oct 2011 16:13:51 GMT

Unfortunately we can't change too much the way how <t:tabbedPane>
works. The reason is backward compatibility must be preserved.

But I don't believe what you're trying to do with ui:repeat can work.
Instead, you should try to use c:forEach instead ui:repeat and inside
that tag use t:panelTab:

<t:tabbedPane groupBy="h:panelGroup">
       <c:forEach items="#{list} var="item">
       <t:panelTab .... >
               <h:outputText value="#{}"/>

c:forEach is executed on "build view time". So it creates as many
t:panelTab components as elements on the list. If you need to use ids
inside each panelTab, use f:subview to wrap t:panelTab content so the
algorithm can generate unique ids. That strategy should work in
primefaces too.

If you need to hide some panelTab, you can use rendered property. The
important thing to remember is the items that iterates c:forEach
should not be changed between the life of the page, otherwise it will
break pss algorithm.

In conclusion, I don't see why c:forEach can do the job. You have to
be more specific about what are you trying to do. I suppose you need
to add/remove tabs dynamically, but I don't remember a component that
can do that.


Leonardo Uribe

2011/10/13 <>:
> Hi,
> In PrimeFaces, tab component is shared among components like tabview,
> accordion, wizard and carousel so tab has no renderer as these components
> render the tabs with specific markup.
> PF has builtin support for dynamic tabs btw.
> Cheers,
> Cagatay
> ----- Reply message -----
> From: "Adam Furmanczuk" <>
> Date: Thu, Oct 13, 2011 09:55
> Subject: tomahawk dynamic tabbedPane
> To: <>
> Hash: SHA1
> Hello,
> the tabbedPane in tomahawk is a bit rusty now. I noticed no real
> progress recently. In mail archives people complained about tabbedPane
> issues years before. And using c:forEach is no good workarround.
> I wonder why all tabbedpanes have the inherent inabillity to support
> ui:repeat?
> I read this post on how to make a "tabbed pane" [1].
> May brilliant idea is: you define in tabbedPane a sepecial tag handler
> on what items to group by. say:
> <t:tabbedPane groupBy="h:panelGroup">
> <ui:repeat value="#{list} var="item">
> <h:panelGroup>
> <h:outputText value="#{}"/>
> </h:panelGroup>
> </:uirpeat>
> </:tabbedPane>
> Now tabbedPane notices: Oh, I have sone h:panelGroups inside next to
> each other and i should groupBy panelGroups: ok i make the tabs.. ??
> tabbePane knows panelTab can't it be thought to know ui:repeats as well?
> Is it difficult to rewrite the tabbedpane to enable ui:repeat?
> What would be the steps to make it work?
> I tested many alternatives: primefaces:tabView, openfaces:tabset..
> Most promising is openfaces:tabbedpane, but cannot make it work properly
> somehow..
> Thanks for feedback.
> Greets,
> Adam
> [1] =
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> iEYEARECAAYFAk6Wi0wACgkQefEEI87R1DfFBwCfdqlD9W5vmHsDg6/s5aBgh49b
> 1A8AnRHYQNe2xTVaAax1/Qgwsxnng6Ok
> =g02n

View raw message