-
1. Re: tabPanel error while iterating tabs
alexanderbelov Apr 10, 2007 8:45 AM (in response to alexanderbelov)It seems the problem is in TabsIterator. It takes tab components as children of the tabPanel.
But it is wrong. It should iterate all child components and check them. If it is not tab, it should check, if the component has children and then check them. It is very simple to correct this mistake, I think... -
2. Re: tabPanel error while iterating tabs
alexanderbelov Apr 10, 2007 8:46 AM (in response to alexanderbelov)It seems the problem is in TabsIterator. It takes tab components as children of the tabPanel.
But it is wrong. It should iterate all child components and check them. If it is not tab, it should check, if the component has children and then check them. It is very simple to correct this mistake, I think... -
3. Re: tabPanel error while iterating tabs
ilya_shaikovsky Apr 10, 2007 9:01 AM (in response to alexanderbelov)http://jira.jboss.com/jira/browse/RF-89 RFC created.
-
4. Re: tabPanel error while iterating tabs
nbelaevski Apr 10, 2007 3:03 PM (in response to alexanderbelov)Alexander,
the problem can't be solved so easy :(. If implemented the way you've described, than we will discover just the single tab component inside tabPanel and that's all. The problem can be solved only if tabs are made self-rendered. I'll plan this to 3.0.2 for now. You can try to use c:if as a possible workaround. -
5. Re: tabPanel error while iterating tabs
alexanderbelov Apr 11, 2007 1:49 AM (in response to alexanderbelov)Thanks, but it is not possible. I don't know how many languages will I have.
-
6. Re: tabPanel error while iterating tabs
alexanderbelov Apr 17, 2007 6:02 AM (in response to alexanderbelov)Thank you. I resolved the problem by using c:forEach. But I think that a4j:repeat should work this way, too.
-
7. Re: tabPanel error while iterating tabs
sergeysmirnov Apr 17, 2007 10:40 AM (in response to alexanderbelov)From the first glance, those two approaches (using c:forEach and using a4j:repeat look similar. However, they have a fundamental difference.
Let's abstract from tabPanel and even from richfaces. There are two cases -
<h:panelGrid column="2" border="1"> has:
a) 6 children (simple h:outputText, for example) inserted by c:forEach
b) 6 children inserted by ui:repeat (from facelets lib)
In case #a you will have 3 rows in 2 columns as expected.
However, in case #b, you will have only one united column with all six children inside.
Why?
in case #b, h:panelGrid recognizes that it has only one direct component - ui:repeat. So, only one column appears -
8. Re: tabPanel error while iterating tabs
james_hays Aug 10, 2007 5:47 PM (in response to alexanderbelov)If this is the approach, can we bump the release date to be much sooner than 3.2? The JSTL tags are in a state of suck and I'd rather not use them. My next 3 apps that I'm working on will be able to utilize this feature/bug fix.
-
9. Re: tabPanel error while iterating tabs
gena777 Jan 14, 2008 3:19 PM (in response to alexanderbelov)Is anything done on the way to implement the rich:tabSet component?
I think, the majority of developers needs those things as (dynamic) tabbed panes or paginators (simple and intuitive to use!) almost every day!!!
Gena -
10. Re: tabPanel error while iterating tabs
ilya_shaikovsky Jan 16, 2008 2:18 AM (in response to alexanderbelov)Just use c:forEach to iterate over some collection and build tabs.
-
11. Re: tabPanel error while iterating tabs
h0ppy Feb 19, 2008 5:00 AM (in response to alexanderbelov)Maybe I'm doing something wrong, but using c:forEach is no good for me.
I need to have form elements with validation messages included in each tab:... ... <rich:tabPanel> <c:forEach items=#{bean.collection}" var="#{var}"> <rich:tab name="#{var.name}"> <h:inputText id="someid" value="var.firstInput" /> <rich:message for="someid" /> ... ... </rich:tab> </c:forEach> </rich:tabPanel> ... ...
Doing this throws up a duplicate id error. i'm using RichFaces 3.1.4GA and facelets 1.1.14. This is driving me crazy, any help would be greatly appreciated. -
12. Re: tabPanel error while iterating tabs
ilya_shaikovsky Feb 19, 2008 6:10 AM (in response to alexanderbelov)in JSP iteration id added to client id.. so no such problems should occur.
If you use facelets - It will be better to browse their knowledgebase to check if there are such poblems with c:forEach. -
13. Re: tabPanel error while iterating tabs
h0ppy Feb 19, 2008 8:54 AM (in response to alexanderbelov)I couldn't find anything in the faces bug/knowledgebase. I found a solution, although its not very elegent:
... ... <rich:tabPanel> <c:forEach items=#{bean.collection}" var="#{var}" varStatus="someStatus"> <rich:tab name="#{var.name}"> <h:inputText id="someid_#{someStatus.index}" value="var.firstInput" /> <rich:message for="someid" /> ... ... </rich:tab> </c:forEach> </rich:tabPanel> ... ...
-
14. Re: tabPanel error while iterating tabs
h0ppy Feb 19, 2008 8:55 AM (in response to alexanderbelov)sorry, I do mean the facelets bug/knowledgebase not faces :)