[JBoss JIRA] Created: (RF-1838) togglePanel with switchType="ajax" renders wrong <a href> stuff after request response phase
by Thomas Wabner (JIRA)
togglePanel with switchType="ajax" renders wrong <a href> stuff after request response phase
--------------------------------------------------------------------------------------------
Key: RF-1838
URL: http://jira.jboss.com/jira/browse/RF-1838
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.3
Environment: tomcat 6.0.14, jdk 1.5
Reporter: Thomas Wabner
I have follow simple ui component created:
<rich:togglePanel stateOrder="closed,show" switchType="ajax">
<f:facet name="closed">
<h:panelGrid columns="1" width="100%">
<rich:toggleControl switchToState="show" >
<div style="background-color: aqua; width: 100%; cursor: pointer;"><h:outputText
value="#{uiMessages['panel_property_header']}" /><br />
<h:outputText value="#{property.currentProperty}"></h:outputText></div>
</rich:toggleControl>
</h:panelGrid>
</f:facet>
<f:facet name="show">
<h:panelGrid columns="1" width="100%">
<rich:toggleControl switchToState="closed">
<div style="background-color: aqua; width: 100%; cursor: pointer"><h:outputText
value="#{uiMessages['panel_property_header']}" /></div>
</rich:toggleControl>
</h:panelGrid>
</f:facet>
</rich:togglePanel>
</ui:component>
##################
Problem with this ui component is the switchType="ajax". If I set the type to "server" the component works as expected.
The component should show initial the "closed" facet, which should render a click able div element (with text some text e.g. "show").
After clicking the "show" text, the show facet should be rendered, which contains also a click able div element.
This element should switch the state to "closed" after clicking on the div element.
------
After looking into the rendered html output there is a <a href="...."> element is rendered which contains the div element for the close facet. The </a> comes correct after the facet output.
Now if the closed facet is rendered, the <a href="..."/> element is closed before the div element comes. Now the div element is no more click able. This happens only for the switchType="ajax".
I have not found any documentation or hint how to do this in another way. The toggleControl element works if I set only a value and not to include some other elements inside the toggleControl element. But if this is the only way to create a toggle control I was wondering how the simpleTogglePanel work. Because the documentation say for simpleTogglePanel "this panel is a simple solution for the togglePanel ...".
- Thomas Wabner
--
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
18 years, 2 months
[JBoss JIRA] Created: (RF-1134) 3.1.2RC2: <rich:treeNodesAdapter> produces error message
by Juergen Zimmermann (JIRA)
3.1.2RC2: <rich:treeNodesAdapter> produces error message
--------------------------------------------------------
Key: RF-1134
URL: http://jira.jboss.com/jira/browse/RF-1134
Project: RichFaces
Issue Type: Bug
Environment: RichFaces 3.1.2RC2, JBoss 4.2.1 with JSF 1.2_05RC3, Eclipse 3.1.1 with WTP 2.0.1, JDK 1.6.0_03
Reporter: Juergen Zimmermann
Fix For: 3.1.2
I have a tree with 2 levels resp. treeNodesAdapter as follows:
<h:form id="bestellungenForm">
<rich:tree id="bestellungenTree">
<f:facet name="icon">
<h:outputText value=""/>
</f:facet>
<f:facet name="iconLeaf">
<h:outputText value=""/>
</f:facet>
<rich:treeNodesAdaptor id="bestellungenAdapter"
nodes="#{kunden.detailsKunde.bestellungen}"
var="best">
<rich:treeNode id="bestellungKnoten">
<h:outputText value="#{i18n['bestellung']} #{i18n['nr']} #{best.id}"/>
</rich:treeNode>
<rich:treeNodesAdaptor id="bestposAdapter"
nodes="#{best.bestellpositionen}"
var="bp">
<rich:treeNode id="bestposKnoten">
<h:outputText value="#{bp.anzahl} #{bp.artikel.bezeichnung}"/>
</rich:treeNode>
</rich:treeNodesAdaptor>
</rich:treeNodesAdaptor>
</rich:tree>
</h:form>
When clicking either on the icon for expanded or collapsed visualization I get this error message on the JBoss console (same error message also with RF 3.1.1):
ERROR [STDERR] TreeRendererBase.encodeAjaxChildren()[bestellungenAdapter_:0]
Here are the relevant lines of the generated XHTML code:
<form id="bestellungenForm" name="bestellungenForm" method="post" action="/hska/faces/kundenverwaltung/panelGridDetails.xhtml" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="bestellungenForm" value="bestellungenForm" />
<div class="dr-tree rich-tree " id="bestellungenForm:bestellungenTree" xmlns:rich="http://richfaces.ajax4jsf.org/rich" rows="0"><div id="bestellungenForm:bestellungenTree:childs"><table border="0" cellpadding="0" cellspacing="0" class="dr-tree-full-width rich-tree-node" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten"><tbody><tr id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten:mainRow" onclick=" "><td class="dr-tree-h-ic rich-tree-node-handleicon dr-tree-h-ic-line-node"><div><a href="#" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten:handle" onclick="A4J.AJAX.Submit('_viewRoot','bestellungenForm',event,{'parameters':{'bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnotenNodeExpanded':'true','bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnotenAjaxExpanded':true} ,'actionUrl':'/hska/faces/kundenverwaltung/panelGridDetails.xhtml'} ); return false;"><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten:handle:img:collapsed" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreePlusImage/DATB/eAH7....72fXGBgYACWpBbU_" /><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten:handle:img:expanded" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreeMinusImage/DATB/eAH7....72fXGBgYACWpBbU_" style="display: none;" /></a></div></td><td class="dr-tree-h-ic rich-tree-node-icon dr-tree-h-ic-line-clp" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten:icon" rich:draggableoptions="{'parameters':{'dragSourceId':'bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten','bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten':'bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten'} } " rich:dropzoneoptions="{} "><span class="dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets"></span></td><td class="dr-tree-h-text rich-tree-node-text " id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten:text" rich:highlightedclass="dr-tree-i-hl rich-tree-node-highlighted" rich:selectedclass="dr-tree-i-sel rich-tree-node-selected">Bestellung Nr. 51</td></tr></tbody></table><div id="bestellungenForm:bestellungenTree:bestellungenAdapter_:0:bestellungKnoten:childs" style="display: none;" class="dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren dr-tree-h-ic-line"></div><table border="0" cellpadding="0" cellspacing="0" class="dr-tree-full-width rich-tree-node" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten"><tbody><tr id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten:mainRow" onclick=" "><td class="dr-tree-h-ic rich-tree-node-handleicon dr-tree-h-ic-line-node"><div><a href="#" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten:handle" onclick="A4J.AJAX.Submit('_viewRoot','bestellungenForm',event,{'parameters':{'bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnotenNodeExpanded':'true','bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnotenAjaxExpanded':true} ,'actionUrl':'/hska/faces/kundenverwaltung/panelGridDetails.xhtml'} ); return false;"><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten:handle:img:collapsed" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreePlusImage/DATB/eAH7....72fXGBgYACWpBbU_" /><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten:handle:img:expanded" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreeMinusImage/DATB/eAH7....72fXGBgYACWpBbU_" style="display: none;" /></a></div></td><td class="dr-tree-h-ic rich-tree-node-icon dr-tree-h-ic-line-clp" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten:icon" rich:draggableoptions="{'parameters':{'dragSourceId':'bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten','bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten':'bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten'} } " rich:dropzoneoptions="{} "><span class="dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets"></span></td><td class="dr-tree-h-text rich-tree-node-text " id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten:text" rich:highlightedclass="dr-tree-i-hl rich-tree-node-highlighted" rich:selectedclass="dr-tree-i-sel rich-tree-node-selected">Bestellung Nr. 52</td></tr></tbody></table><div id="bestellungenForm:bestellungenTree:bestellungenAdapter_:1:bestellungKnoten:childs" style="display: none;" class="dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren dr-tree-h-ic-line"></div><table border="0" cellpadding="0" cellspacing="0" class="dr-tree-full-width rich-tree-node" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten"><tbody><tr id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten:mainRow" onclick=" "><td class="dr-tree-h-ic rich-tree-node-handleicon dr-tree-h-ic-line-node"><div><a href="#" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten:handle" onclick="A4J.AJAX.Submit('_viewRoot','bestellungenForm',event,{'parameters':{'bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnotenNodeExpanded':'true','bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnotenAjaxExpanded':true} ,'actionUrl':'/hska/faces/kundenverwaltung/panelGridDetails.xhtml'} ); return false;"><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten:handle:img:collapsed" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreePlusImage/DATB/eAH7....72fXGBgYACWpBbU_" /><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten:handle:img:expanded" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreeMinusImage/DATB/eAH7....72fXGBgYACWpBbU_" style="display: none;" /></a></div></td><td class="dr-tree-h-ic rich-tree-node-icon dr-tree-h-ic-line-clp" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten:icon" rich:draggableoptions="{'parameters':{'dragSourceId':'bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten','bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten':'bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten'} } " rich:dropzoneoptions="{} "><span class="dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets"></span></td><td class="dr-tree-h-text rich-tree-node-text " id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten:text" rich:highlightedclass="dr-tree-i-hl rich-tree-node-highlighted" rich:selectedclass="dr-tree-i-sel rich-tree-node-selected">Bestellung Nr. 120</td></tr></tbody></table><div id="bestellungenForm:bestellungenTree:bestellungenAdapter_:2:bestellungKnoten:childs" style="display: none;" class="dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren dr-tree-h-ic-line"></div><p class="dr-tree-last-node-marker"></p><table border="0" cellpadding="0" cellspacing="0" class="dr-tree-full-width rich-tree-node" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten"><tbody><tr id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten:mainRow" onclick=" "><td class="dr-tree-h-ic rich-tree-node-handleicon dr-tree-h-ic-line-last"><div><a href="#" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten:handle" onclick="A4J.AJAX.Submit('_viewRoot','bestellungenForm',event,{'parameters':{'bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnotenAjaxExpanded':true,'bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnotenNodeExpanded':'true'} ,'actionUrl':'/hska/faces/kundenverwaltung/panelGridDetails.xhtml'} ); return false;"><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten:handle:img:collapsed" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreePlusImage/DATB/eAH7....72fXGBgYACWpBbU_" /><img border="0" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten:handle:img:expanded" src="/hska/faces/a4j_3_1_2.CR2org.richfaces.renderkit.html.images.TreeMinusImage/DATB/eAH7....72fXGBgYACWpBbU_" style="display: none;" /></a></div></td><td class="dr-tree-h-ic rich-tree-node-icon dr-tree-h-ic-line-clp" id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten:icon" rich:draggableoptions="{'parameters':{'dragSourceId':'bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten','bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten':'bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten'} } " rich:dropzoneoptions="{} "><span class="dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets"></span></td><td class="dr-tree-h-text rich-tree-node-text " id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten:text" rich:highlightedclass="dr-tree-i-hl rich-tree-node-highlighted" rich:selectedclass="dr-tree-i-sel rich-tree-node-selected">Bestellung Nr. 121</td></tr></tbody></table><div id="bestellungenForm:bestellungenTree:bestellungenAdapter_:3:bestellungKnoten:childs" style="display: none;" class="dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren"></div></div><input type="hidden" id="bestellungenForm:bestellungenTree:input" name="bestellungenForm:bestellungenTree:input" value="" /><script type="text/javascript">var Richfaces_Tree_bestellungenForm_bestellungenTree =
new Tree("bestellungenForm:bestellungenTree", "bestellungenForm:bestellungenTree:input", "ajax",
{
onselect: "",
onexpand: "",
oncollapse: ""
},
function(event) {
A4J.AJAX.Submit('_viewRoot','bestellungenForm',event,{'parameters':{'bestellungenForm:bestellungenTree:selectedNode':event.selectedNode} ,'actionUrl':'/hska/faces/kundenverwaltung/panelGridDetails.xhtml'} ); return false;
},
false,
true
);
Richfaces_Tree_bestellungenForm_bestellungenTree.drop = function(event,drag){var options = {'parameters':{'bestellungenForm:bestellungenTree':'bestellungenForm:bestellungenTree'} ,'actionUrl':'/hska/faces/kundenverwaltung/panelGridDetails.xhtml'} ;options.parameters['dropTargetId'] = 'bestellungenForm:bestellungenTree';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','bestellungenForm',event,options);};</script><div id="bestellungenForm:bestellungenTree:script"><script type="text/javascript"></script></div></div><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id5" />
</form>
--
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
18 years, 2 months