You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Renzo Tomaselli <re...@tecnotp.it> on 2007/01/17 16:15:51 UTC

[Trinidad] NavigationPanelRenderer - another bug

Hi, I noticed that component NavigationPane does not yield events when used
through stamping (e.g. MenuModel), nor it calls action methods. However
rendering is ok.  
Also I noticed that this is due to a difference between id assigned to
CommandNavigationItems while rendered and those assigned during restore_view
phase. In next fragment:  
  
    <h:form id="tabberForm">  
         <tr:navigationPane id="tabber" hint="tabs" value="#{tabBean.tabData}" var="tab">  
            <f:facet name="nodeStamp">  
                 <tr:commandNavigationItem text="#{tab.label}" actionListener="#{tabBean.navigation}" id="tab"/>  
             </f:facet>  
             <tr:commandNavigationItem/>  
        </tr:navigationPane>  
    </h:form>  
  
all tabs are rendered as "tabberForm:tabber:tab", while restore_view expects
"tabberForm:tabber:x:tab", where x = 0, 1, 2, ...  
This is due to another bug in method NavigationPanelRender.renderContent(),
which in case of stamping performs a children loop twice. The first time, each
round sets a proper collection index through component.setRowIndex(i), but the
second time it does not. As a consequence, tab index will be missing at any
following getRowKey(), thus building wrong ids.  
  
\-- Renzo  
  
  
  


Re: [Trinidad] NavigationPanelRenderer - another bug

Posted by Matthias Wessendorf <ma...@apache.org>.
thanks for the patch,

can you provide a diff?

that makes applying patches much more easy,

thx,
M

On 1/19/07, Renzo Tomaselli <re...@tecnotp.it> wrote:
>
>  Done. I attached the patched NavigationPanelRenderer.java to ADFFACES-275,
> I'm using it  and  both issues  look fixed.
>  -- Renzo
>
>
>  Chris Hansen wrote:
>  Thanks Renzo. Will you please provide a patch to ADFFACES-275 (
> https://issues.apache.org/jira/browse/ADFFACES-275). If it
> works as you say,
> this may fix other issues with tr:navigationPane as well.
>
> Thanks,
> -Chris Hansen
>
> On 1/17/07 9:15 AM, "Renzo Tomaselli" <re...@tecnotp.it> wrote:
>
>
>
>  Hi, I noticed that component NavigationPane does not yield events when used
> through stamping (e.g. MenuModel), nor it calls action methods. However
> rendering is ok.
> Also I noticed that this is due to a difference between id assigned to
> CommandNavigationItems while rendered and those assigned during restore_view
> phase. In next fragment:
>
>  <h:form id="tabberForm">
>  <tr:navigationPane id="tabber" hint="tabs" value="#{tabBean.tabData}"
> var="tab">
>  <f:facet name="nodeStamp">
>  <tr:commandNavigationItem text="#{tab.label}"
> actionListener="#{tabBean.navigation}" id="tab"/>
>  </f:facet>
>  <tr:commandNavigationItem/>
>  </tr:navigationPane>
>  </h:form>
>
> all tabs are rendered as "tabberForm:tabber:tab", while restore_view expects
> "tabberForm:tabber:x:tab", where x = 0, 1, 2, ...
> This is due to another bug in method
> NavigationPanelRender.renderContent(),
> which in case of stamping performs a children loop twice. The first time,
> each
> round sets a proper collection index through component.setRowIndex(i), but
> the
> second time it does not. As a consequence, tab index will be missing at any
> following getRowKey(), thus building wrong ids.
>
> -- Renzo
>
>
>
>
>
>
>
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: [Trinidad] NavigationPanelRenderer - another bug

Posted by Renzo Tomaselli <re...@tecnotp.it>.
Done. I attached the patched NavigationPanelRenderer.java to ADFFACES-275, I'm
using it  and  both issues  look fixed.  
\-- Renzo  
  
Chris Hansen wrote:

>
>     Thanks Renzo. Will you please provide a patch to ADFFACES-275 (
>     <https://issues.apache.org/jira/browse/ADFFACES-275>). If it works as
> you say,
>     this may fix other issues with tr:navigationPane as well.
>  
>     Thanks,
>     -Chris Hansen
>  
>     On 1/17/07 9:15 AM, "Renzo Tomaselli"
> [<re...@tecnotp.it>](mailto:renzo.tomaselli@tecnotp.it) wrote:
>  
>  
>

>>

>>     Hi, I noticed that component NavigationPane does not yield events when
used

>>     through stamping (e.g. MenuModel), nor it calls action methods. However

>>     rendering is ok.

>>     Also I noticed that this is due to a difference between id assigned to

>>     CommandNavigationItems while rendered and those assigned during
restore_view

>>     phase. In next fragment:

>>  
>>         <h:form id="tabberForm">

>>              <tr:navigationPane id="tabber" hint="tabs"
value="#{tabBean.tabData}"

>>     var="tab">

>>                 <f:facet name="nodeStamp">

>>                      <tr:commandNavigationItem text="#{tab.label}"

>>     actionListener="#{tabBean.navigation}" id="tab"/>

>>                  </f:facet>

>>                  <tr:commandNavigationItem/>

>>             </tr:navigationPane>

>>         </h:form>

>>  
>>     all tabs are rendered as "tabberForm:tabber:tab", while restore_view
expects

>>     "tabberForm:tabber:x:tab", where x = 0, 1, 2, ...

>>     This is due to another bug in method
NavigationPanelRender.renderContent(),

>>     which in case of stamping performs a children loop twice. The first
time, each

>>     round sets a proper collection index through component.setRowIndex(i),
but the

>>     second time it does not. As a consequence, tab index will be missing at
any

>>     following getRowKey(), thus building wrong ids.

>>  
>>     -- Renzo

>>  
>>  
>>  
>>  
>>  
>  
>  
>  
>  
>  


Re: [Trinidad] NavigationPanelRenderer - another bug

Posted by Chris Hansen <ch...@overstock.com>.
Thanks Renzo. Will you please provide a patch to ADFFACES-275 (
https://issues.apache.org/jira/browse/ADFFACES-275). If it works as you say,
this may fix other issues with tr:navigationPane as well.

Thanks,
-Chris Hansen

On 1/17/07 9:15 AM, "Renzo Tomaselli" <re...@tecnotp.it> wrote:

> Hi, I noticed that component NavigationPane does not yield events when used
> through stamping (e.g. MenuModel), nor it calls action methods. However
> rendering is ok.
> Also I noticed that this is due to a difference between id assigned to
> CommandNavigationItems while rendered and those assigned during restore_view
> phase. In next fragment:
> 
>     <h:form id="tabberForm">
>          <tr:navigationPane id="tabber" hint="tabs" value="#{tabBean.tabData}"
> var="tab">
>             <f:facet name="nodeStamp">
>                  <tr:commandNavigationItem text="#{tab.label}"
> actionListener="#{tabBean.navigation}" id="tab"/>
>              </f:facet>
>              <tr:commandNavigationItem/>
>         </tr:navigationPane>
>     </h:form>
> 
> all tabs are rendered as "tabberForm:tabber:tab", while restore_view expects
> "tabberForm:tabber:x:tab", where x = 0, 1, 2, ...
> This is due to another bug in method NavigationPanelRender.renderContent(),
> which in case of stamping performs a children loop twice. The first time, each
> round sets a proper collection index through component.setRowIndex(i), but the
> second time it does not. As a consequence, tab index will be missing at any
> following getRowKey(), thus building wrong ids.
> 
> -- Renzo
> 
> 
> 
>