How can I add a parameter to an a4j:commandLink? The parameter’s always null when I check in debug mode.
webcode:
<a4j:form>
<a4j:commandLink reRender="content" action="#{surveyEvaluationBean.doDetailEvaluation}">
<f:param name="question" value="#{result.question.pK.longValueAsString}" />
<h:graphicImage url="/survey/img/cloverleaf.jpg" styleClass="srv-analysis-cloverleaf" />
</a4j:commandLink>
</a4j:form>
bean:
HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
String param = request.getParameter("question");
I just found the error. There’s nothing wrong with the a4j-components, the error was the following: I couldn’t create the question-object correctly. So the PK was really null. I’m sorry for wasting your time guys.
I just found the error. There’s nothing wrong with the
a4j-components, the error was the following: I couldn’t create the question-object correctly. So the PK was really null. I’m sorry for wasting your time guys.