how use a <li>with <h:commandLink> ?

I have a problem, need to do a menu bar with some items, I'm using <li>.. then when somebody click on the item o element from menu, catch the event and sent it to a Bean made in Java... this is my code.. an some picture of the page, I'm only coding the firts list <li>, also isn't apper the name that I'm assingin to the <li>

PeriodicoBean.java is the name of the bean, it has 2 methods setEvento, getEvento y share de bean code

Hi, the way you're using li looks ok to me, but here are some suggestions:

1. Move f:view to before <head>. It's better to use f:view contentType="text/html" - this keeps webkit browsers
like chrome happy.

2. Change <head> to <h:head>, and <body> to <h:body>. Although this may not affect your specific code, it
can be important and is a good idea to get into the habit of specifying the header and body like this.

3. What's likely to be the biggest problem is that you are not specifying an action method correctly, you have:
action="#{periodicoBean} where I would expect you to have something like action="#{periodicoBean.someMethod},
where you have public String someMethod() in periodicoBean.

4. You don't specify a bean scope (i.e. @RequestScoped). I can't remember if request scope if the default or
@NoneScoped is?

5. You are using setPropertyActionListener to set periodicoBean.evento to "per" (the id of the commandLink). This
will simply set evento to the string value "per", which may not be what you want.

More specifically, however, I'd really recommend looking at some of the extension tagsets such as Apache Tomahawk, RichFaces, PrimeFaces, IceFaces, and so forth. Many of those tagsets include tags specifically designated to construct menus using JSF.