[
https://issues.jboss.org/browse/RF-12029?page=com.atlassian.jira.plugin.s...
]
Brian Leathem commented on RF-12029:
------------------------------------
Summary of a discussion in IRC:
{quote}
(02:35:14 AM) blabno: AbstractTogglePanel was extending UIOutput (i guess for holding info
about selected tab), i've changed this (basically c'n'p necessary stuff from
UIOutput to ATogP) and now ATogP extends UIRepeat
...
(08:31:55 AM) blabno: ok, I understand, well, as with carousel component i've noticed
that there are use cases where component may be used as iterative or non-iterative
(08:32:26 AM) blabno: i.e. we want to have fixed 3 tabs, so we hardcode
<tabPanel><tab/><tab/><tab/></tabPanel
(08:32:50 AM) blabno: but sometimes we want to have many tabs
(08:33:03 AM) blabno: so we do <tabPanel value=""
var=""><tab/></tabPanel>
(08:33:22 AM) blabno: this is how i've done it for carousel and it works like a charm
(08:33:42 AM) blabno: however here with those tabs it's very hard
(08:34:17 AM) blabno: especiale because of that getActiveItem method (used in many places
to see if tab should be executed,updated,validated,etc)
(08:35:18 AM) blabno: so the datamodel (in case of iterative case) is being visited over
and over again
(08:36:33 AM) blabno: the impl of that method is very annoying
(08:36:51 AM) blabno: first it gets activeItem which is string
(08:37:12 AM) blabno: then runs over all tabs to see if that tab is disabled
(08:37:29 AM) blabno: and in such case it switches to the first item
(08:37:46 AM) blabno: but anyways, optimization can be done later, right now i'm
having problem with ajax
(08:37:54 AM) blabno: client and server switches work great
(08:40:25 AM) blabno: in short the problem is with switching tab in ajax mode
(08:41:18 AM) bleathem: what goes wrong?
(08:41:26 AM) blabno: partialContext first wants to estblish which components should be
executed, and only later it sets submited value (selected tab) so the new tab is not
rendered in response
(08:41:56 AM) blabno: because (i suspect) getActiveItem points to old tab and is changed
when submitted value is set
(08:42:23 AM) blabno: and that getActiveItem is used in determining if tab should be
processed
(08:43:07 AM) blabno: i must have messed sth up, cause old version of component worked,
but i'm stuck and fresh eye would be handy
{quote}
AbstractTogglePanel should extend UIRepeat, instead of UIOutput
---------------------------------------------------------------
Key: RF-12029
URL:
https://issues.jboss.org/browse/RF-12029
Project: RichFaces
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: component-output
Reporter: Brian Leathem
Assignee: Bernard Labno
Valid uses exist for dynamically generating rich:tab, rich:togglePanelItem,
rich:accordionItem. Current techniques for supporting this use case involve using
c:forEach, which is a problem since c: tags are processed too early to nicely support
dynamic use cases.
One idea to support this use case, is to have AbstractTogglePanel extend UIRepeat,
instead of UIOutput to better dynamic child components.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira