You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by LFung <lf...@ama.cu> on 2002/10/02 16:50:02 UTC

[Tiles] Conditional menu items. Help !!!!

Hi.

I'am using tiles from struts 1.1b1 and I need to add some menu items only for specific users.

Then my action forward take this sample path = forward.common.users.home

this is a define that use some default menu, now for example, some special users use this same menu, in fact the hole template, but with only a few more items in the menu.

Supose I have some bean loeded in the action that tells me if the agregate menu items need to be displayed.

Any idea.

Thanks in advance.

LFung.

Re: [Tiles] Conditional menu items. Help !!!!

Posted by LFung <lf...@ama.cu>.
Ok Cedric Thanks again.

LFung.

----- Original Message -----
From: "Cedric Dumoulin" <ce...@apache.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, October 04, 2002 9:59 AM
Subject: Re: [Tiles] Conditional menu items. Help !!!!


>
> There are samples in tiles-documentation war files, check how dynamic
> portal works. Also, the following document can help:
> http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf
>
>   Cedric
>
> LFung wrote:
>
> >Thanks a lot Cedric.
> >
> >I think the best solution is 3. Do you have some Controller Sample code,
> >I'am never have been worked with it.
> >
> >
>
>
> >Any way thanks for your reply.
> >
> >LFung.
> >
> >----- Original Message -----
> >From: "Cedric Dumoulin" <ce...@apache.org>
> >To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >Sent: Thursday, October 03, 2002 1:18 AM
> >Subject: Re: [Tiles] Conditional menu items. Help !!!!
> >
> >
> >
> >
> >>  Hello,
> >>
> >>  There is several solutions to have different menu for different users
> >>or profile.
> >>You need to have some logic that select or build the menu according to
> >>the current user profile.
> >>Solution 1:
> >>
> >>    * Create an action with one forward for each possible menu. The
> >>      action checks the user profile, and call forward to appropriate
> >>
> >>
> >menu.
> >
> >
> >>    * Create one tiles definition for each possible menu
> >>    * Associate forwards to definitions
> >>    * Call the action each time you need to render the menu
> >>
> >>Solution 2:
> >>
> >>    * Create one action that build dynamically the menu definition to be
> >>      rendered
> >>    * Action push the definition in request session (see examples in
> >>      tiles-doc/test)
> >>    * Action do its forward, which will use the pushed definition
> >>
> >>Solution 3:
> >>
> >>    * Associate a "controller" to your menu definition
> >>    * This controller build/modify the list of menu item
> >>
> >>  Hope this help,
> >>
> >>        Cedric
> >>
> >>LFung wrote:
> >>
> >>
> >>
> >>>Hi.
> >>>
> >>>I'am using tiles from struts 1.1b1 and I need to add some menu items
only
> >>>
> >>>
> >for specific users.
> >
> >
> >>>Then my action forward take this sample path =
forward.common.users.home
> >>>
> >>>this is a define that use some default menu, now for example, some
> >>>
> >>>
> >special users use this same menu, in fact the hole template, but with
only a
> >few more items in the menu.
> >
> >
> >>>Supose I have some bean loeded in the action that tells me if the
> >>>
> >>>
> >agregate menu items need to be displayed.
> >
> >
> >>>Any idea.
> >>>
> >>>Thanks in advance.
> >>>
> >>>LFung.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >>For additional commands, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Tiles] Conditional menu items. Help !!!!

Posted by Cedric Dumoulin <ce...@apache.org>.
There are samples in tiles-documentation war files, check how dynamic 
portal works. Also, the following document can help:
http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf

  Cedric

LFung wrote:

>Thanks a lot Cedric.
>
>I think the best solution is 3. Do you have some Controller Sample code,
>I'am never have been worked with it.
>  
>
 

>Any way thanks for your reply.
>
>LFung.
>
>----- Original Message -----
>From: "Cedric Dumoulin" <ce...@apache.org>
>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>Sent: Thursday, October 03, 2002 1:18 AM
>Subject: Re: [Tiles] Conditional menu items. Help !!!!
>
>
>  
>
>>  Hello,
>>
>>  There is several solutions to have different menu for different users
>>or profile.
>>You need to have some logic that select or build the menu according to
>>the current user profile.
>>Solution 1:
>>
>>    * Create an action with one forward for each possible menu. The
>>      action checks the user profile, and call forward to appropriate
>>    
>>
>menu.
>  
>
>>    * Create one tiles definition for each possible menu
>>    * Associate forwards to definitions
>>    * Call the action each time you need to render the menu
>>
>>Solution 2:
>>
>>    * Create one action that build dynamically the menu definition to be
>>      rendered
>>    * Action push the definition in request session (see examples in
>>      tiles-doc/test)
>>    * Action do its forward, which will use the pushed definition
>>
>>Solution 3:
>>
>>    * Associate a "controller" to your menu definition
>>    * This controller build/modify the list of menu item
>>
>>  Hope this help,
>>
>>        Cedric
>>
>>LFung wrote:
>>
>>    
>>
>>>Hi.
>>>
>>>I'am using tiles from struts 1.1b1 and I need to add some menu items only
>>>      
>>>
>for specific users.
>  
>
>>>Then my action forward take this sample path = forward.common.users.home
>>>
>>>this is a define that use some default menu, now for example, some
>>>      
>>>
>special users use this same menu, in fact the hole template, but with only a
>few more items in the menu.
>  
>
>>>Supose I have some bean loeded in the action that tells me if the
>>>      
>>>
>agregate menu items need to be displayed.
>  
>
>>>Any idea.
>>>
>>>Thanks in advance.
>>>
>>>LFung.
>>>
>>>
>>>
>>>      
>>>
>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>    
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Tiles] Conditional menu items. Help !!!!

Posted by LFung <lf...@ama.cu>.
Thanks a lot Cedric.

I think the best solution is 3. Do you have some Controller Sample code,
I'am never have been worked with it.

Any way thanks for your reply.

LFung.

----- Original Message -----
From: "Cedric Dumoulin" <ce...@apache.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, October 03, 2002 1:18 AM
Subject: Re: [Tiles] Conditional menu items. Help !!!!


>
>   Hello,
>
>   There is several solutions to have different menu for different users
> or profile.
> You need to have some logic that select or build the menu according to
> the current user profile.
> Solution 1:
>
>     * Create an action with one forward for each possible menu. The
>       action checks the user profile, and call forward to appropriate
menu.
>     * Create one tiles definition for each possible menu
>     * Associate forwards to definitions
>     * Call the action each time you need to render the menu
>
> Solution 2:
>
>     * Create one action that build dynamically the menu definition to be
>       rendered
>     * Action push the definition in request session (see examples in
>       tiles-doc/test)
>     * Action do its forward, which will use the pushed definition
>
> Solution 3:
>
>     * Associate a "controller" to your menu definition
>     * This controller build/modify the list of menu item
>
>   Hope this help,
>
>         Cedric
>
> LFung wrote:
>
> >Hi.
> >
> >I'am using tiles from struts 1.1b1 and I need to add some menu items only
for specific users.
> >
> >Then my action forward take this sample path = forward.common.users.home
> >
> >this is a define that use some default menu, now for example, some
special users use this same menu, in fact the hole template, but with only a
few more items in the menu.
> >
> >Supose I have some bean loeded in the action that tells me if the
agregate menu items need to be displayed.
> >
> >Any idea.
> >
> >Thanks in advance.
> >
> >LFung.
> >
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Tiles] Conditional menu items. Help !!!!

Posted by Cedric Dumoulin <ce...@apache.org>.
  Hello,

  There is several solutions to have different menu for different users 
or profile.
You need to have some logic that select or build the menu according to 
the current user profile.
Solution 1:

    * Create an action with one forward for each possible menu. The
      action checks the user profile, and call forward to appropriate menu.
    * Create one tiles definition for each possible menu
    * Associate forwards to definitions
    * Call the action each time you need to render the menu

Solution 2:

    * Create one action that build dynamically the menu definition to be
      rendered
    * Action push the definition in request session (see examples in
      tiles-doc/test)
    * Action do its forward, which will use the pushed definition

Solution 3:

    * Associate a "controller" to your menu definition
    * This controller build/modify the list of menu item

  Hope this help,

        Cedric

LFung wrote:

>Hi.
>
>I'am using tiles from struts 1.1b1 and I need to add some menu items only for specific users.
>
>Then my action forward take this sample path = forward.common.users.home
>
>this is a define that use some default menu, now for example, some special users use this same menu, in fact the hole template, but with only a few more items in the menu.
>
>Supose I have some bean loeded in the action that tells me if the agregate menu items need to be displayed.
>
>Any idea.
>
>Thanks in advance.
>
>LFung.
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>