You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by James Reynolds <Ja...@ihc.com> on 2005/08/22 18:20:38 UTC

t:panelNavigation & t:JSCookMenu questions

Hello all,
 
I'm new to myfaces and a greenhorn with jsf.  I'm wondering if the
panelNavigation and JSCookMenu components support dynamic population.
For example, I have leaned to dynamically populate a selectOneListbox by
binding it to a SelectItem[] array.  Has anyone done this?
 
On a related note, I copied and pasted the navigation.jsp and related
code from the myfaces-example war and put them in a practice project (to
experiment with the t:panelNavigation).  Everything works great, except
that the CSS border around the panelNavigation component doesn't render
properly in firefox.  It's completely off the actual component, but it
looks fine in ie.  I find this is odd because there are no such problems
when I use firefox to view the un-altered myfaces-examples web app.  Is
there some CSS gotcha that I'm missing.
 
Thanks for your advice,
 
JR

Re: t:panelNavigation & t:JSCookMenu questions

Posted by Adrian Merrall <pi...@gmail.com>.
>  
> Hello all, 
>   
> I'm new to myfaces and a greenhorn with jsf.  I'm wondering if the
> panelNavigation and JSCookMenu components support dynamic population.  For
> example, I have leaned to dynamically populate a selectOneListbox by binding
> it to a SelectItem[] array.  Has anyone done this? 
>   
James,

Not quite dynamic population but I have acheived this by using the
rendered attribute on the commandNavigation tags.

The downside is you have to have a tag for every possible option and
just render the ones you want.  In my case it is for a nav menu with a
finite list of items so it works well for me and also means the logic
on what to display is in the backing bean but if you were using this
to simulate a tree it could get out of hand - enter tree2.

I have only tried this with panelNavigation and not the the JSCookMenu.

The menu has sections so I make sure the bean returns the rendered
flag for all the child commandNavigation tags as false if the parent
item is false.  Again, this is fine for a small list but doesn't
strike me as ideal for a lot of items.  I have it in an include which
means all the rendered calls have to be made for every page.

I'm very interested if Henri or anyone else has alternate solutions.

HTH

Adrian
Auckland, NZ

RE: panelNavigation & t:JSCookMenu questions

Posted by Henri Delbrouck <he...@skynet.be>.
Hi James,

 

I don’t have experience with the panelNavigation but with the JSCookMenu, it
should be possible to build dynamically menus. You can see the discussion
with subject help moving from public 1.0.9 to nightly build.

Unfotunately, my try does not work but it appears that some people make it
running.

Please let me know if you succeed.

 

Henri-Philippe Delbrouck

 

   _____  

From: James Reynolds [mailto:James.Reynolds@ihc.com] 
Sent: lundi 22 août 2005 18:21
To: users@myfaces.apache.org
Subject: t:panelNavigation & t:JSCookMenu questions

 

Hello all,

 

I'm new to myfaces and a greenhorn with jsf.  I'm wondering if the
panelNavigation and JSCookMenu components support dynamic population.  For
example, I have leaned to dynamically populate a selectOneListbox by binding
it to a SelectItem[] array.  Has anyone done this?

 

On a related note, I copied and pasted the navigation.jsp and related code
from the myfaces-example war and put them in a practice project (to
experiment with the t:panelNavigation).  Everything works great, except that
the CSS border around the panelNavigation component doesn't render properly
in firefox.  It's completely off the actual component, but it looks fine in
ie.  I find this is odd because there are no such problems when I use
firefox to view the un-altered myfaces-examples web app.  Is there some CSS
gotcha that I'm missing.

 

Thanks for your advice,

 

JR


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.14/79 - Release Date: 22/08/2005



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.14/79 - Release Date: 22/08/2005