I actually had it like your example a, except instead of an "action", I defined and "actionListener". This is where the source component was the menu and not the UINavigationMenuItem, as I would have expected. I'll try it with the next nightly build and let you know how that works.
thanks. Richard -----Original Message----- From: Thomas Spiegl [mailto:[EMAIL PROTECTED] Sent: Tue 2/7/2006 6:09 PM To: MyFaces Discussion Subject: Re: JSCookMenu and <f:param> You can choose between 2 tags to create the menu tree: a) <t:navigationMenuItem itemLabel="..." action="..." /> This tag creates an UINavigationMenuItem component. Perfect, this one could be passed to the ActionListener b) <t:navigationMenuItems value="#{...}> where the value binds a List of NavigationMenuItem(s) (remember a NavigationMenuItem is not a component). As no component will be generated for a NavigationMenuItem in the render phase, the only component that can be passed to the ActionListener is the menu itself. Thomas On 2/7/06, Richard Frazer <[EMAIL PROTECTED]> wrote: > Thanks Thomas. I'll grab the nightly tomorrow and try it out. > > What do you mean that most of you are using the NavigationMenuItem(s) to > create the entire menu tree? Does that mean you aren't using the jscookMenu > tag, but some other tag? Does this allow you to achieve the parameter > passing approach? > > If there is a best practice type of approach that I'm not using, I would > love to hear it. > > Thanks, > Richard > > > > > From: Thomas Spiegl <[EMAIL PROTECTED]> > > Reply-To: MyFaces Discussion <[email protected]> > > Date: Tue, 7 Feb 2006 20:49:18 +0100 > > To: MyFaces Discussion <[email protected]> > > Subject: Re: JSCookMenu and <f:param> > > > > ty richard - this is a bug. I just fixed this issue. The item's value > > will be returned again instead of the label. I think most of us are > > using NavigationMenuItem(s) to create the entire menu tree. > > NavigationMenuItem is not an UIComponent, that's why it can't be > > passed by the event. > > > > regards > > Thomas > > > > Regarding your question, why the HtmlCommandJSCookMenu is returned as > > source component. Well > > > > On 2/7/06, Richard Frazer <[EMAIL PROTECTED]> wrote: > >> Thanks for your response. I downloaded the nightly yesterday and am > >> seeing > >> strange behavior. > >> > >> I tried adding an action listener to the navigationMenuItem and the event > >> I > >> get in my listener gives me the HtmlCommandJSCookMenu object as the source > >> instead of the MenuItem itself, so I can't determine which item was > >> selected. The strange thing is that the getValue method of the > >> HtmlCommandJSCookMenu returns the label of the selected item. I hate to > >> have to switch on the label though, because it's bound to change. > >> > >> Is this working as intended? > >> > >> Thanks, > >> Richard > >> > >> > >> ________________________________ > >> From: Eduardo Dudu Ivan Pichler <[EMAIL PROTECTED]> > >> Reply-To: MyFaces Discussion <[email protected]> > >> Date: Mon, 6 Feb 2006 14:25:46 -0200 > >> To: MyFaces Discussion <[email protected]> > >> Subject: Re: JSCookMenu and <f:param> > >> > >> not. > >> You need to use the nightly build of navigationMenuItem, such has > >> actionListener feature. > >> > >> > >> On 2/6/06, Richard Frazer < [EMAIL PROTECTED] > >> <mailto:[EMAIL PROTECTED]> > wrote: > >> > >> Is <f:param> supported in tandem with jsookMenu/navigationMenuItem? If > >> not, > >> is there a way to achieve the same result? > >> > >> thanks. > >> > >> > >> > >> > >> -- > >> Dudu > >> `P > >> > > > > > > -- > > http://www.irian.at > > > > Your JSF powerhouse - > > JSF Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces

