You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Alberto Molpeceres <al...@gmail.com> on 2005/11/07 13:19:53 UTC

ListDataModel in PanelNavigation2?

Hi,

I'm new to this list, so, I don't know if this is the correct place to
talk about this issue, or I should talk first to component's developer
directly or if there are a list for tomahawk component's issues that
I've found yet.

Well. I'm trying to use PanelNavigation2, and it works fine. My
problem is that since I create the menu dinamically, I can't define a
diferent outcome for every item (I'll have 3-5 different outcomes at
most). So, I need to know which entry has been clicked exactly.

I have been looking at the code of the component, and I have found in
org.apache.myfaces.custom.navmenu.NavigationMenuUtils, method
addNavigationMenuItems (line 96+), that it checks if the components to
be added are instances on NavigationMenuItem, NavigationMenuItem[] or
Collection.

I would like to use ListDatAmodel instead, so I can get which item has
been selected, but I supposed it's not so easy like adding a new "if
value instanceof ListDataModel" and the component will need some extra
coding.

Thank you for your attention,

    al.

Re: ListDataModel in PanelNavigation2?

Posted by Alberto Molpeceres <al...@gmail.com>.
On 11/7/05, Thomas Spiegl <th...@gmail.com> wrote:
> I think an ActionListener would be the appropriate solution for your
> problem - right?.

Yes, that could be a solution.

But again about using a ListDataModel... and excuse me because I'm
sure there are many good reasongs. Why use a List or any other custom
classes if JSF offers us a set of classes in the "model" package?.
These classes already have support for listeners and everithing JSF
needs.

> At the moment you can't define an ActionLister for
> NavigationMenuItem(s), but i'm working on this.

Ok, just tell me if I can help.

    al.

Re: ListDataModel in PanelNavigation2?

Posted by Thomas Spiegl <th...@gmail.com>.
I think an ActionListener would be the appropriate solution for your
problem - right?. At the moment you can't define an ActionLister for
NavigationMenuItem(s), but i'm working on this.

regards
Thomas

On 11/7/05, Alberto Molpeceres <al...@gmail.com> wrote:
> Hi,
>
> I'm new to this list, so, I don't know if this is the correct place to
> talk about this issue, or I should talk first to component's developer
> directly or if there are a list for tomahawk component's issues that
> I've found yet.
>
> Well. I'm trying to use PanelNavigation2, and it works fine. My
> problem is that since I create the menu dinamically, I can't define a
> diferent outcome for every item (I'll have 3-5 different outcomes at
> most). So, I need to know which entry has been clicked exactly.
>
> I have been looking at the code of the component, and I have found in
> org.apache.myfaces.custom.navmenu.NavigationMenuUtils, method
> addNavigationMenuItems (line 96+), that it checks if the components to
> be added are instances on NavigationMenuItem, NavigationMenuItem[] or
> Collection.
>
> I would like to use ListDatAmodel instead, so I can get which item has
> been selected, but I supposed it's not so easy like adding a new "if
> value instanceof ListDataModel" and the component will need some extra
> coding.
>
> Thank you for your attention,
>
>     al.
>