Toggle Control Render differently between initial request and an Ajax request
-----------------------------------------------------------------------------
Key: RF-7153
URL: https://jira.jboss.org/jira/browse/RF-7153
Project: RichFaces
Issue Type: Bug
Components: component-output
Affects Versions: 3.3.0
Environment: Richfaces 3.3.0.GA, JBoss 4.2.2. Facelets, Java 1.5
Reporter: Dirk Pitt
Our xhtml code look like this
<rich:togglePanel id="contacts"
value="closed" switchType="client"
stateOrder="closed,opened" styleClass="customerviewDetails"
rendered="#{controller.permitted">
<f:facet name="closed">
<rich:toggleControl id="contacts_tgc_closed">
<h:panelGrid width="100%" cellpadding="0" cellspacing="0"
columns="2"
columnClasses="switcherContactList, headContactList">
<h:graphicImage id="picOpenContactDetails"
style="border:none;"
value="/images/e3pos.png" />
<h:panelGroup>
letzter Kontakt: 
<h:outputText value="#{controller.lastContact.date}">
<f:convertDateTime timeZone="Europe" type="date"
dateStyle="medium" />
</h:outputText>, #{controller.lastContact.reason}
</h:panelGroup>
</h:panelGrid>
</rich:toggleControl>
In our page design, when we initially render the page we are getting the
following html snippet
<a class="dr-tglctrl rich-tglctrl" href="#"
id="_jbpns_2ftvpp_2fCustomerview_2fCustomer:_viewRoot:j_id351"
onclick="TogglePanelManager.toggleOnClient('_jbpns_2ftvpp_2fCustomerview_2fCustomer:_viewRoot:contacts',null);;
return false;">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="switcherCustomerviewContactList">
<img
id="_jbpns_2ftvpp_2fCustomerview_2fCustomer:_viewRoot:picOpenContactDetails"
src="/customer-9.1.0/images/e3pos.png" style="border: medium none ;"/>
</td>
<td class="headContactList">
Kontakthistorie einblenden - letzter Kontakt: 12.05.2009</td>
</tr>
</tbody>
</table>
</a>
As you may see all the components defined under the <a> tag which is correct....
Now if the same xhtml code gets an Ajax request and Toggle Panel is defined in
any reRender attribute this is the html snippet we are getting..
<a class="dr-tglctrl rich-tglctrl" href="#"
id="_jbpns_2ftvpp_2fCustomerview_2fCustomer:_viewRoot:j_id351"
onclick="TogglePanelManager.toggleOnClient('_jbpns_2ftvpp_2fCustomerview_2fCustomer:_viewRoot:contacts',null);;
return false;"/>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td
class="switcherCustomerviewContactList">
<img
id="_jbpns_2ftvpp_2fCustomerview_2fCustomer:_viewRoot:picOpenContactDetails"
src="/customer-9.1.0/images/e3pos.png" style="border:none;"/>
</td>
<td
class="headContactList">Kontakthistorie einblenden - letzter
Kontakt: 12.05.2009</td>
</tr>
</tbody>
</table>
As you might the components under the ToggleControl are not capsulated with <a>
anymore and the GUI is not functioning...
Now I placed breakpoint in ToogleControlTemplate and ToggleControlRender
classes and I debuged for a normal request and ajax request, I see no obvious
difference, it looks like child components are rendered under the <a> tag, but
you are seeing the html snippet that firefox gets (I get the snippet with
firebug and also with a4j:log they are identical....)
Now I am little bit cluessless what to look next..
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues