[
https://issues.jboss.org/browse/RF-12029?page=com.atlassian.jira.plugin.s...
]
Brian Leathem commented on RF-12029:
------------------------------------
Consider the dynamicly rendered tabs in the facelet:
{code}
<a4j:outputPanel id="output" ajaxRendered="true">
Validation failed:#{facesContext.validationFailed}
</a4j:outputPanel>
<h:form id="form">
<h1>Dynamic tab panel</h1>
<ou:tabPanel id="tabPanel" switchType="ajax"
value="#{dynamicTabPanelBean.ladies}" var="person"
rowKeyVar="index">
<ou:tab id="tab" name="#{person.name}">
#{person.name}
<h:inputText id="birthday"
value="#{person.birthDate}">
<f:convertDateTime pattern="yyyy-mm-dd"/>
</h:inputText>
</ou:tab>
</ou:tabPanel>
</h:form>
{code}
Switching tabs in ajax modes takes two clicks - the tab does not change until the 2nd
click.
The response on the first click:
{code:title="Response after the first click on tab 1 (formatted for clarity)}
<?xml version='1.0' encoding='UTF-8'?>
<partial-response>
<changes>
<update id="output"><![CDATA[<span
id="output">Validation failed:false</span>]]></update>
<update
id="javax.faces.ViewState"><![CDATA[3037308798212741137:-1743374825880192262]]></update>
</changes>
</partial-response>
{code}
the response on the second click:
{code:title="Response after the second click on tab 1 (formatted for clarity)}
<?xml version='1.0' encoding='UTF-8'?>
<partial-response>
<changes>
<update id="output"><![CDATA[<span
id="output">Validation failed:false</span>]]></update>
<update id="form:tabPanel:1:tab">
<![CDATA[
<div id="form:tabPanel:1:tab" class="rf-tab">
<div class="rf-tab-cnt"
id="form:tabPanel:1:tab:content">
Ayn Rand
<input id="form:tabPanel:1:birthday"
type="text" name="form:tabPanel:1:birthday"
value="1905-00-02" />
</div>
<script type="text/javascript">new
RichFaces.ui.Tab("form:tabPanel:1:tab",{"index":1,"leave":null,"togglePanelId":"form:tabPanel","switchMode":"ajax","name":"Ayn
Rand","enter":null,"disabled":false} )</script>
</div>
]]>
</update>
<update
id="javax.faces.ViewState"><![CDATA[3037308798212741137:-1743374825880192262]]></update>
<extension id="org.richfaces.extension">
<complete>RichFaces.$('form:tabPanel').onCompleteHandler('Ayn
Rand');;</complete>
</extension>
</changes>
</partial-response>
{code}
Notice how the response content only reflects the tab change in the response of the 2nd
click
Note: For both the first and second response, the executeIds in the
ExtendedPartialViewContext is:
{code}
form:tabPanel:1:tab
form:tabPanel
{code}
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