jsf 2 - Passing parameter in EL action doesn't work with RequestScoped bean -
edit: using jsf scopes , jsf managedbean instead of cdi doesn't work cdi beans regardless of requestscoped, conversationscoped or sessionscoped.
i'm trying pass parameter function on bean this:
<h:commandbutton action="#{bean.update(wp.nr)}" value="update" />
however update function called if make bean viewscoped, not when requestscoped. using viewscoped doesn't seem work know whether use of @ least viewscoped requirement passing parameters in el calls in action or requestscoped should work , there else going on.
this on glassfish 3.1.2.2
the bean looks this
import javax.faces.bean.managedbean; import javax.faces.bean.requestscoped; @managedbean(name="bean") @requestscoped public class filiaalbean implements serializable { private static final logger log = logger.getlogger(filiaalbean.class.getname()); @inject testejb testejb; // removed data member , getter , setters public string update(int wpnr) { log.info("test " + integer.tostring(wpnr)); // todo call testejb return "view?faces-redirect=true&includeviewparams=true"; } }
Comments
Post a Comment