Hi! I'm trying to programmatically create a jsFunction and pass parameters to a bean. The call to the corresponding action in the bean works alright, but I couldn't find a way to get the params assigned to properties in it.
I'll show you a simplified example of the code I'm using:
First, I have a custom component, let's call it MyComponent. In the setProperties method of the corresponding MyComponentTag class I have the following code:
HtmlAjaxFunction myFunction = new HtmlAjaxFunction(); myFunction.setName("myFunction"); myFunction.setAction(application.createMethodBinding("#{myBean.myFunctionAction}", null)); HtmlActionParameter htmlActionParam = new HtmlActionParameter(); htmlActionParam.setName("myParam"); htmlActionParam.setAssignToBinding(application.createValueBinding("#{myBean.myParam}")); myFunction.getChildren().add(htmlActionParam); component.getChildren().add(myFunction);