myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phuu Tek <phuu....@gmail.com>
Subject Re: [Trinidad] Possible to skip certain stops in a train model?
Date Thu, 03 Nov 2011 05:07:01 GMT
Hi Pavitra,

Thanks for replying.  I just would like to learn more on how I could
implement my use case if you may.

          <tr:train binding="#{editor.component}" var="foo"
value="#{processTrainMenuModel}">
            <f:facet name="nodeStamp">
              <tr:commandNavigationItem text="#{foo.label}"
action="#{foo.getOutcome}"

immediate="#{processTrainMenuModel.immediate}"

disabled="#{processTrainMenuModel.readOnly}"

visited="#{processTrainMenuModel.visited}"/>
            </f:facet>
          </tr:train>

I have look at the Demo app of the Apache Trinidad component guide and I
notice those code above.
The disabled property of the commandNavigationItem points to the readOnly
method of the underlying ProcessMenuModel.

My question are these:
1.  How  will I get a handle to the currently active navigation item?
2.  My question 2 is related to question 1, after getting a handle to the
current navigation item, how can I override the ProcessMenuModel
     so that I could disable the other navigation item so that I could
prevent the user from navigating thru them.

I have attached also a sample pseudocode of what I want to accomplish.
Please see my attached file.

Kindly advise if my question is unclear and I'll be glad to supply more
info.
I tried posting with forums but I had no luck so I just tried the mailing
list. [?]

Thanks for sharing your time as it is higly regarded.

Regards,
Phuu



On Thu, Nov 3, 2011 at 2:35 AM, Pavitra Subramaniam <
pavitra.subramaniam@oracle.com> wrote:

> Hello Phuu,
>
>
> On 11/2/2011 2:44 AM, Phuu Tek wrote:
>
>> Hi,
>>
>> I am looking at implementing my own custom Train Model using my custom
>> ProcessMenuModel
>>
>> public ProcessMenuModel getTrainModel() {
>>
>> }
>>
>> However, I have a specific use case wherein I should be able to skip
>> certain stops in my train.
>> Say for example, I have seven stops then on Step 2, I choose something
>> from that page.
>> Is it possible to disable Steps 3 and 4 programatically so that user wont
>> be able to navigate to that page?
>> Step 5, 6 and 7 should still be available.
>>
> You most certainly can, by setting an EL for the disabled attribute of the
> tr:commandNavigationItem .The EL will obviously return 'true' for the stops
> you want disabled.
>
> Thanks
> Pavitra
>
>
>
>> Thanks
>>
>

Mime
View raw message