[
http://jira.jboss.com/jira/browse/RF-2772?page=comments#action_12404670 ]
Adam Jenkins commented on RF-2772:
----------------------------------
More Information:
It seems that the divs for the dynamic components are being rendered ok, but they linked
to the panelBar in the javascript that follows. With the following code snipped
<t:panelGroup colspan="2">
<rich:panelBar id="claim-panel-bar">
<rich:panelBarItem id="t1" label="test1">
<h:outputText value="test"/>
</rich:panelBarItem>
<rich:panelBarItem id="t2" label="test2">
<h:outputText value="test"/>
</rich:panelBarItem>
<rich:panelBarItem id="t3" label="test3">
<h:outputText value="test"/>
</rich:panelBarItem>
<a4j:repeat id="claim-history-repeat"
value="#{generalInformation.claimHistory}" var="item"
binding="#{generalInformation.claimHistoryRepeat}">
<rich:panelBarItem id="claim-panel" label="some div">
some stuff
</rich:panelBarItem>
</a4j:repeat>
</rich:panelBar>
</t:panelGroup>
I get the following output:
<div class="dr-pnlbar rich-panelbar dr-pnlbar-b "
id="customerInformationForm:claim-panel-bar" style="padding: 0px; height:
100%; width: 100%; "><div class="dr-pnlbar rich-panelbar dr-pnlbar-ext
" id="customerInformationForm:t1"><div class="dr-pnlbar-h
rich-panelbar-header " style=";">test1</div><div
class="dr-pnlbar-h-act rich-panelbar-header-act " style=";;;;display:
none;">test1</div><div style="display: none; width:
100%;"><table cellpadding="0" style="height: 100%;"
width="100%"><tbody><tr><td class="dr-pnlbar-c
rich-panelbar-content "
style=";">test</td></tr></tbody></table></div></div><div
class="dr-pnlbar rich-panelbar dr-pnlbar-ext "
id="customerInformationForm:t2"><div class="dr-pnlbar-h
rich-panelbar-header " style=";">test2</div><div
class="dr-pnlbar-h-act rich-panelbar-header-act " style=";;;;display:
none;">test2</div><div style="display: none; width:
100%;"><table cellpadding="0" style="height: 100%;"
width="100%"><tbody><tr><td class="dr-pnlbar-c
rich-panelbar-content "
style=";">test</td></tr></tbody></table></div></div><div
class="dr-pnlbar rich-panelbar dr-pnlbar-ext "
id="customerInformationForm:t3"><div class="dr-pnlbar-h
rich-panelbar-header " style=";">test3</div><div
class="dr-pnlbar-h-act rich-panelbar-header-act " style=";;;;display:
none;">test3</div><div style="display: none; width:
100%;"><table cellpadding="0" style="height: 100%;"
width="100%"><tbody><tr><td class="dr-pnlbar-c
rich-panelbar-content "
style=";">test</td></tr></tbody></table></div></div><div
class="dr-pnlbar rich-panelbar dr-pnlbar-ext "
id="customerInformationForm:claim-history-repeat:0:claim-panel"><div
class="dr-pnlbar-h rich-panelbar-header " style=";">some
div</div><div class="dr-pnlbar-h-act rich-panelbar-header-act "
style=";;;;display: none;">some div</div><div style="display:
none; width: 100%;"><table cellpadding="0" style="height:
100%;" width="100%"><tbody><tr><td
class="dr-pnlbar-c rich-panelbar-content "
style=";"></td></tr></tbody></table></div></div><input
id="customerInformationForm:claim-panel-bar_panelBarInput"
name="customerInformationForm:claim-panel-bar" type="hidden"
/><script type="text/javascript"><!--
new
Richfaces.PanelBar('customerInformationForm:claim-panel-bar',{'onitemchange':'','items':[{'onleave':'','id':'customerInformationForm:t1','onenter':''}
,{'onleave':'','id':'customerInformationForm:t2','onenter':''}
,{'onleave':'','id':'customerInformationForm:t3','onenter':''}
] } );
//--></script></div>
(sorry for the code bomb)...
the important bit seems to be
<script type="text/javascript"><!--
new
Richfaces.PanelBar('customerInformationForm:claim-panel-bar',{'onitemchange':'','items':[{'onleave':'','id':'customerInformationForm:t1','onenter':''}
,{'onleave':'','id':'customerInformationForm:t2','onenter':''}
,{'onleave':'','id':'customerInformationForm:t3','onenter':''}
] } );
//--></script>
It links through the static items, but not the dynamic ones. I'm about to dive into
the code and see if I can see where and why this is. If anyone can offer some input now
about how and why this might be happening, what classes to look at an how you would like
it fixed I'd really appreciate it.
Cheers
Adam
Make panelBarItem accordion functionality work with a4j:repeat
--------------------------------------------------------------
Key: RF-2772
URL:
http://jira.jboss.com/jira/browse/RF-2772
Project: RichFaces
Issue Type: Feature Request
Affects Versions: 3.1.4
Environment: Tomcat 5.5, Java 5, Exadel Studio 4.0.4a
Reporter: Adam Jenkins
Hi All,
I'm trying to build a dynamic accordion (rich:panelBar) by enclosing the
panelBarItems in an a4j:repeat tag....it renders the panelBarItems, however the accordion
functionality doesn't work (IE 6). If I do a standard (static) accordion it works
fine, and, if I have a panelBar with static panelBarItems, followed by dynamic
panelBarItems (inside an a4j:repeat) the static panelBarItems work fine, but the others
don't (snippet below). Is this a limitation of this component or a bug?
In the below code, the panelBarItems labelled 'test' work perfectly, however the
ones labelled 'some div' don't work at all.
<t:panelGroup colspan="2">
<rich:panelBar id="claim-panel-bar">
<rich:panelBarItem id="bar1"
label="test"></rich:panelBarItem>
<rich:panelBarItem id="bar2"
label="test"></rich:panelBarItem>
<rich:panelBarItem id="bar3"
label="test"></rich:panelBarItem>
<rich:panelBarItem id="bar4"
label="test"></rich:panelBarItem>
<a4j:repeat id="claim-history-repeat"
value="#{generalInformation.myItems}" var="item"
binding="#{generalInformation.myItemsRepeat}">
<rich:panelBarItem id="claim-panel" label="some div">
some stuff
</rich:panelBarItem>
</a4j:repeat>
</rich:panelBar>
</t:panelGroup>
Is this a limitation of the component, a bug, or am I doing something wrong here?
Cheers
Adam
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira