myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavitra Subramaniam (JIRA)" <>
Subject [jira] Commented: (TRINIDAD-1844) Issue in org.apache.myfaces.trinidad.model.ProccessUtils.getMaxVisitedRowKey
Date Fri, 24 Sep 2010 00:51:34 GMT


Pavitra Subramaniam commented on TRINIDAD-1844:

Josu, thanks for verifying! Did you want this fix to go into Any other branches
on trinidad?
I have also logged issue, so that the
issue can be fixed in trinidad


> Issue in org.apache.myfaces.trinidad.model.ProccessUtils.getMaxVisitedRowKey
> ----------------------------------------------------------------------------
>                 Key: TRINIDAD-1844
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions:  1.2.12-plugins 
>         Environment: Mac OSX 10.5 with JVM 1.6.0_20.
> Running using ADF with JDeveloper
>            Reporter: Josu Vergara
>            Priority: Minor
>         Attachments:,
> I have been running the following example:
> I just changed the view.train.TrainIdMenuModel class constructor to:
>     public TrainIdMenuModel() {
>         super();
>         super.setMaxPathKey("MyMaxPathKey");
>     }
> This is done to get a max visited node behavior.  However when I click on the button
'Next' to navigate on the tree the nodes are not enabled as expected and the user has to click
on 'Back' and then 'Next' twice to get the nodes enabled correctly.
> The example can be found in this blog entry:
 which is based on the ADF rich client demo (
 The rich client demo can also be used to reproduce the issue.
> I accept that using a case test that relies in a whole framework like ADF is not ideal,
but looking at the code of org.apache.myfaces.trinidad.model.ProcessUtils I think that the
problem lies there.  In the javadoc it is stated: "If set but the focus rowKey is after maxVisitedRowKey,
set maxVisitedRowKey to the focus rowKey."
> However if we look at the code, we can see that this is not respected since the maxPath
variable is 'cached' at the request map.
> If we assume that a MenuModel is going to be updated during the processing of a request
 BUT that the ProccessUtils.getMaxVisitedRowKey is invoked BEFORE the model is actually updated,
the maxPath value will be calculated (and cached) using the non updated model.  In particular
the maxPath will be calculated incorrectly if the focusRowKey of the model is NOT updated
before the first call to ProccessUtils.getMaxVisitedRowKey occurs during the request.  After
this, if the focusRowKey is updated in the model and ProccessUtils.getMaxVisitedRowKey is
called (always being in the context of the same request), the contract will not be respected
and the cached maxPath value will be returned (which can correspond to a node BEFORE the current
focus node, which is wrong).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message