[
http://jira.jboss.com/jira/browse/RF-1838?page=all ]
Alexej Kushunin resolved RF-1838.
---------------------------------
Resolution: Rejected
it's not a bug. Tidy filter moves <div>s from <a> tags, because
block-level elements aren't alloved inside inline elemets. Use <span
style="display:block"> instead of <div>.
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
Assigned To: Alexej Kushunin
Fix For: 3.2.0
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