[richfaces-issues] [JBoss JIRA] (RF-12977) a4j:queue breaks tabPanel

Juraj Húska (JIRA) jira-events at lists.jboss.org
Wed Oct 2 14:53:02 EDT 2013


    [ https://issues.jboss.org/browse/RF-12977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12809044#comment-12809044 ] 

Juraj Húska commented on RF-12977:
----------------------------------

Do know if it helps, but here is the comparison of *partial-response* for a working {{r:collapsiblePanel}} and not working one.

{code:xml}
<!--NOT WORKING-->
<?xml version="1.0" encoding="UTF-8"?>
<partial-response>
   <changes>
      <update id="tform:j_idt10"><![CDATA[<div id="tform:j_idt10" class="rf-cp rf-tgp"><input id="tform:j_idt10-value" name="tform:j_idt10-value" type="hidden" value="false" /><div id="tform:j_idt10:header" class="rf-cp-hdr rf-cp-hdr-colps"><table class="rf-cp-gr"><tbody><tr><td class="rf-cp-ico"><div class="rf-cp-ico-colps rf-ico-chevron-up-hdr"></div><div class="rf-cp-ico-exp rf-ico-chevron-down-hdr"></div></td><td class="rf-cp-lbl"><div class="rf-cp-lbl-exp">JSF 2 and RichFaces 4</div><div class="rf-cp-lbl-colps">JSF 2 and RichFaces 4</div></td></tr></tbody></table></div><div id="tform:j_idt10:content" style="display:none" ></div><div id="tform:j_idt10:empty" class="rf-cp-empty" style="display:block"></div></div>]]></update>
      <update id="javax.faces.ViewState"><![CDATA[4531748867361119240:3728238579879955425]]></update>
      <extension id="org.richfaces.extension">
         <complete>new RichFaces.ui.CollapsiblePanel("tform:j_idt10",{"switchMode":"ajax","ajax":{"incId":"1"} ,"activeItem":"false"} );RichFaces.component('tform:j_idt10').onCompleteHandler('false');;RichFaces.javascriptServiceComplete();;</complete>
         <render>tform:j_idt10 at activeItem</render>
      </extension>
   </changes>
</partial-response>
{code}

{code:xml}
<!--WORKING PARTIAL RESPONSE-->
<?xml version="1.0" encoding="UTF-8"?>
<partial-response>
   <changes>
      <update id="tform:j_idt9">&lt;div id="tform:j_idt9" class="rf-cp rf-tgp"&gt;&lt;input id="tform:j_idt9-value" name="tform:j_idt9-value" type="hidden" value="true" /&gt;&lt;div id="tform:j_idt9:header" class="rf-cp-hdr rf-cp-hdr-exp"&gt;&lt;table class="rf-cp-gr"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="rf-cp-ico"&gt;&lt;div class="rf-cp-ico-colps rf-ico-chevron-up-hdr"&gt;&lt;/div&gt;&lt;div class="rf-cp-ico-exp rf-ico-chevron-down-hdr"&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="rf-cp-lbl"&gt;&lt;div class="rf-cp-lbl-exp"&gt;JSF 2 and RichFaces 4&lt;/div&gt;&lt;div class="rf-cp-lbl-colps"&gt;JSF 2 and RichFaces 4&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div id="tform:j_idt9:content" class="rf-cp-b" style="display:block"&gt;<![CDATA[
					<p>bar</p></div><div id="tform:j_idt9:empty" style="display:none" ></div></div>]]></update>
      <update id="javax.faces.ViewState"><![CDATA[-7211397265450158879:-9082643170929635724]]></update>
      <extension id="org.richfaces.extension">
         <complete>new RichFaces.ui.CollapsiblePanel("tform:j_idt9",{"switchMode":"ajax","ajax":{"incId":"1"} ,"activeItem":"true"} );RichFaces.component('tform:j_idt9').onCompleteHandler('true');;RichFaces.javascriptServiceComplete();;</complete>
         <render>tform:j_idt9 at activeItem</render>
      </extension>
   </changes>
</partial-response>
{code}

Significant differences:
* not working example contains more content not intended for parser - {{![CDATA[}}
* not working example has {{"activeItem":"false"}}
* not working example has {{.onCompleteHandler('false')}}

Not sure whether something is relevant to this issue.
                
> a4j:queue breaks tabPanel
> -------------------------
>
>                 Key: RF-12977
>                 URL: https://issues.jboss.org/browse/RF-12977
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-output
>    Affects Versions: 4.3.2, 5.0.0.Alpha2
>         Environment: This happens in RF 4.3.2.CR1, but I can't select such version in JIRA.
>            Reporter: Bernard Labno
>            Priority: Critical
>             Fix For: 5-Tracking
>
>
> There is clearly a bug in tabPanel.js
> {code}
>         execAjax : function (oldPanel, newPanel) {
>             var options = $.extend({}, newPanel.getTogglePanel().options["ajax"], {});
>             this.__setActiveItem(newPanel);
>             rf.ajax(newPanel.id, null, options);
>             if (oldPanel) { // HERE IS THE BUG
>                 this.__setActiveItem(oldPanel);
>             }
>             return false;
>         },
> {code}
> If the tab panel works in ajax mode and we attach a4j:queue with requestDelay="1000" then rf.ajax... will just add request to queue, but meanwhile the active item will be changed to old value.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list