• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invoking navigation rule from custom control

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to create a custom control that acts like a menu. I have a XML file that contains the caption for each menu item + an action conform the navigation rule in the faces-config file.
THe problem is... i don't know how to invoke the action from my custom control.
I really don't know how to add for example a <h:CommandLink action=... to a custom control.
I tryied creating a new instance of a HtmlCommandLink but don't know what to do with the methodbinding stuff...
Can someone point me in the right direction please?
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rather than creating a custom control, you might want to use someone else's. There's a menu tag that's part of the Tomahawk JSF package that's quite well-documented for creating menus dynamically.

If you really want the menu structure in an XML file, you can use this control and one of the various useful XML utilities - the Apache Digester is often a good choice, though a little confusing at first. Or, if your XML structure is simple enough, just implement a small SAX parser.
 
Yannick Ongena
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, i really want to create one myself because i want to learn it... That's the only reason
In october i start as a consultant where i have to work with jsf alot and i want to learn something in advance before i get my education there...
I know there are a lot of menu controls... i used the myFaces menu or the menu controls from the ADF from oracle but i was wondering how i could write such a control myself... you see
 
They weren't very bright, but they were very, very big. Ad contrast:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic