I'm trying to make a p:commandLink work in a p:dataList in primefaces mobile.
In this snippet, the commandButton gets inside the method and redirects to a different view, but the commandLink does not. Why is this?
<pm:content id="resultsContent">
<h:form id="resultsForm">
<p:dataList type="inset" id="studyList" value="#{navigationBean.studies}" var="study">
<p:commandLink action="{navigationBean.individualStudy}" update=":studyView">#{study.styRefNum} - #{study.shortDesc}</p:commandLink>
<p:commandButton value="#{study.styRefNum} - #{study.shortDesc}" action="#{navigationBean.individualStudy}" update=":studyView" />
</p:dataList>
</h:form>
</pm:content>
@ManagedBean
@ViewScoped
public class NavigationBean {
public String individualStudy() {
System.out.println("in individualStudy");
return "pm:studyView?transition=slide";
}
}
<p:column/>
– kolossus