JSF 2.0: Action doesn't work
I set up a JSF2.0 project with maven. Everything works fine exept action handling :-(
Here is my .xhtml page:
<h:form>
<h:commandButton
id="submit"
value="Absenden"
action="#(projectController.saveProject)">
</h:commandButton>
</h:form>
and 开发者_高级运维here my managed bean:
@ManagedBean
@SessionScoped
public class ProjectController {
public String saveProject(){
System.out.println("test");
return("/newProject.xhtml");
}
...
When I try pushing the button nothing happens. No error-message...nothing. But data-binding works! Only actions/actionlisteners don't work
Maybe somebody has an answer for me :-) Cheers
Your action is misspelled. Use curly brackets, then it should work:
action="#{projectController.saveProject}">
精彩评论