I'm using JSF, trying a to call a page on a button click inside a data table using the following code
<h:column> <h:outputText value=""/> <h:commandButton id = "btn" value="History" action="#{Bean.showHistory}"> </h:commandButton> </h:column> My bean class icludes a method "showHistory" which returns success and I've included the navigation rule in faces-config.xml too but still the page couldn't be called. My navigation rule looks
<managed-bean> <managed-bean-name>Bean</managed-bean-name> <managed-bean-class> com.bean.HistoryBean </managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <navigation-rule> <display-name>List</display-name> <from-view-id>/BookList.jsp</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/History.jsp</to-view-id> </navigation-case> </navigation-rule> Bean Class consists of showHistory() as
public String showHistory() { return "success"; } Can I get a help to resolve this????
<from-action>#{bean.showHistory}</from-action>to your navigation case.