Thank you for reply. In my case menu is completely dynamic and i should build it in a dynamic manner. what i will do is : -in a session scope bean create a property which is a list of navigationMenuItem and in menu page, i should bind this property to my PanelNavigation2 . I will report back in case of success or failure.
Madhav Bhargava wrote: > > I can tell you what i have done. Probably you can take a hint from that > and > proceed. > > I have defined an XML which will have the complete structure of all the > possible menu items in a hierarchical manner. > > I have a custom component which will parse the XML. I will apply some > rules > and decide what to show and what not to show. > > Simultaneously, construct a t:panelNavigation2 component programmatically > and then keep on adding children in recursive manner. These child > components > can either be <t:navigationMenuItem> or <t:commandNavigation2>. > > Once the tree is complete you render it. > > Again - this will make sense if you have the menu which is dynamic. If you > have a static menu then just code everything in the JSP. > > If you are not comfortable with creating custom components then i suggest > that you code the entire menu tree in the JSP. Define a controller for the > same which will remain in the session and then render stuff based on rules > that you might have. > > ~madhav > > > On 1/24/07, Madhav Bhargava <[EMAIL PROTECTED]> wrote: >> >> Is your menu static? If yes then I would suggest keeping everything in a >> JSP page and use rendered attribute to decide what is shown and what is >> not. >> >> If you have a dynamic menu which might change based on some business >> rule then you will have to create a custom component to achieve the >> same. >> >> > -----Original Message----- >> > From: legolas [mailto:[EMAIL PROTECTED] >> > Sent: Wednesday, January 24, 2007 6:02 PM >> > To: users@myfaces.apache.org >> > Subject: RE: can we make PanelNavigation to have scroll? >> > >> > >> > Thank you very much for reply. >> > Can we define parent and child relation between menu items in a >> > NavigationMenuItem ? >> > Thanks >> > >> > >> > >> > >> > >> > Madhav Bhargava-2 wrote: >> > > >> > > >> > > I think that t:panelNavigation will not support what you are looking >> > > for. You need to switch to t:panelNavigation2 which has some >> support. >> > > The latter accepts a list of NavigationMenuItem >> > > >> > > >> > > One more thing - If you want your categories to have text as well as >> an >> > > Image icon then you will not be able to use <t:navigationMenuItem> >> as it >> > > does not work even though it has a constructor which is suppose to >> do >> > > that (Bottom line it does not do it). You will have to use >> > > <t:commandNavigation2> inside <t:panelNavigation2> >> > > >> > > To achieve the same I have programmatically created the entire left >> nav >> > > using <t:panelNavigation2> and <t:commandNavigation2> >> > > >> > > ~madhav >> > > >> > >> -----Original Message----- >> > >> From: legolas [mailto:[EMAIL PROTECTED] >> > >> Sent: Wednesday, January 24, 2007 2:18 AM >> > >> To: users@myfaces.apache.org >> > >> Subject: Re: can we make PanelNavigation to have scroll? >> > >> >> > > >> > >> >> > > >> > >> Thank you for your reply. >> > >> can you please give me a hint about binding this PanelNavigation >> > > component >> > >> to a database table? >> > >> I have a table of categories, each category can have some childs >> and / >> > > or >> > >> one category. >> > >> >> > > >> > >> >> > > >> > >> here is what my database table looks like >> > >> [code] >> > >> CREATE TABLE categories ( >> > >> categoryid int(11) unsigned AUTO_INCREMENT NOT >> > > NULL, >> > >> categoryname varchar(255) NULL, >> > >> categorydescription varchar(255) NOT NULL, >> > >> parentcategory int(11) unsigned NOT NULL, >> > >> clickcount bigint(20) NULL, >> > >> categoryimage varchar(255) NULL, >> > >> categoryurl varchar(255) NULL, >> > >> ) >> > >> >> > > >> > >> [/code] >> > >> >> > > >> > >> I can extract all records of this table and put them into some data >> > >> structure in a backing bean. >> > >> what i can not understand is how does the structure looks like ? >> > >> >> > > >> > >> >> > > >> > >> Thanks >> > >> >> > > >> > >> >> > > >> > >> >> > > >> > >> >> > > >> > >> Andrew Robinson-5 wrote: >> > >> > >> > >> > Put it in a DIV with CSS to limit the height and use overflow: >> auto; >> > >> > >> > >> > On 1/22/07, legolas <[EMAIL PROTECTED]> wrote: >> > >> >> >> > >> >> >> > >> >> >> > >> >> legolas wrote: >> > >> >> > >> > >> >> > Hi >> > >> >> > thank you for reading my post. >> > >> >> > can we make http://www.irian.at/myfaces/panelnavigation_5.jsf >> to >> > > have >> > >> >> > vertical scroll when it emerge? >> > >> >> > >> > >> >> > my problem is that i have a fixed area that i should show some >> > >> >> categories >> > >> >> > and their childs, >> > >> >> > i want to use this component but problem is that i can not do >> it >> > >> >> because >> > >> >> > it emerges and grow bigger than my available space. >> > >> >> > >> > >> >> > is there any way that we add some kind of scroll around it to >> > > make >> > >> sure >> > >> >> > that it does not grow more than alowed space and instead it >> grows >> > >> >> inside >> > >> >> > its own frame? >> > >> >> > >> > >> >> > Thanks >> > >> >> > >> > >> >> >> > >> >> >> > >> >> any comment ? >> > >> >> even if i could make tree2 to works inside its own frame when it >> > > grows >> > >> my >> > >> >> problem will resolve. >> > >> >> >> > >> >> thanks >> > >> >> >> > >> >> -- >> > >> >> View this message in context: >> > >> >> >> http://www.nabble.com/can-we-make-PanelNavigation-to-have-scroll-- >> > >> tf3050635.html#a8510992 >> > >> >> Sent from the MyFaces - Users mailing list archive at >> Nabble.com. >> > >> >> >> > >> >> >> > >> > >> > >> > >> > >> >> > > >> > >> -- >> > >> View this message in context: http://www.nabble.com/can-we-make- >> > >> PanelNavigation-to-have-scroll--tf3050635.html#a8539751 >> > >> Sent from the MyFaces - Users mailing list archive at Nabble.com. >> > > >> > > >> > > **************** CAUTION - Disclaimer ***************** >> > > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION >> intended >> > > solely for the use of the addressee(s). If you are not the intended >> > > recipient, please notify the sender by e-mail and delete the >> original >> > > message. Further, you are not to copy, disclose, or distribute this >> e- >> > mail >> > > or its contents to any other person and any such actions are >> unlawful. >> > > This e-mail may contain viruses. Infosys has taken every reasonable >> > > precaution to minimize this risk, but is not liable for any damage >> you >> > may >> > > sustain as a result of any virus in this e-mail. You should carry >> out >> > your >> > > own virus checks before opening the e-mail or attachment. Infosys >> > reserves >> > > the right to monitor and review the content of all messages sent to >> or >> > > from this e-mail address. Messages sent to or from this e-mail >> address >> > may >> > > be stored on the Infosys e-mail system. >> > > ***INFOSYS******** End of Disclaimer ********INFOSYS*** >> > > >> > > >> > >> > -- >> > View this message in context: http://www.nabble.com/can-we-make- >> > PanelNavigation-to-have-scroll--tf3050635.html#a8559547 >> > Sent from the MyFaces - Users mailing list archive at Nabble.com. >> >> > > > -- > When I tell the truth, it is not for the sake of convincing those who do > not > know it, but for the sake of defending those that do > > -- View this message in context: http://www.nabble.com/can-we-make-PanelNavigation-to-have-scroll--tf3050635.html#a8571509 Sent from the MyFaces - Users mailing list archive at Nabble.com.