Hi all, I'm working on a custom ViewHandler like is presented in Hans Bergsten JSF book chapter 15. For that I need to programmatically create a command button. I have buttons that need method bindings to talk to method in my managed beans. But I also need command buttons that simply return a String value, for example "cancel" like this in JSP:
<h:commandButton value="Cancel" action="cancel"/> using this code: UICommand command = new UICommand(); command.setValue("Cancel"); MethodBinding action = application.createMethodBinding("cancel", null); command.setAction(action); but I get this exception: javax.faces.el.ReferenceSyntaxException: cancel I know that cancel is not really a method but I don't know what other method to call set the command button to return the String "cancel". Anybody any idea? Thanks and regards, Jeroen