<h:commandButton> tag help
m trying to use the commandbutton tag for my navigation but it is not working.
below is my code and my faces-config navigation rule.
<h:commandButton image="/m-bank/images/about.bmp" action="signin"/>
<navigation-rule>
<from-view-id>/m-bank.jsp</from-view-id>
<navigation-case>
<from-outcome>signin</from-outcome>
<to-view-id>/m-sign.jsp</to-view-id>
</navigation-case>
</navigation-rule>
These are inside an <h:form>.
How do i get the the commandbutton to work and navigate to the next page.
Any help anyone.
Thanks
[726 byte] By [
tony81a] at [2007-11-27 2:28:23]

# 4
[nobr]here is the full servlet mapping and code i have used.
<html>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<head>
<title>HOME PAGE FOR WWW.M-WARE.COM </title>
</head>
<body>
<h:form>
<center>
<h:dataTable>
<h:column>
<f:facet name="header">
<h:graphicImage value="/images/m-logo.bmp"/>
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
<h:graphicImage value="/images/title.bmp"/>
</f:facet>
</h:column>
</h:dataTable>
<h:panelGrid columns="6">
<h:graphicImage value="/images/m-line1.bmp"/>
<h:commandButton image="/m-bank/images/about.bmp"/>
<h:commandButton image="/m-bank/images/faqs.bmp"/>
<h:commandButton image="/m-bank/images/contact.bmp"/>
<h:commandButton image="/m-bank/images/sitemap.bmp"/>
<h:graphicImage value="/images/m-line2.bmp"/>
</h:panelGrid>
<table height="500" width="900">
<tr><td valign="top" width="170" background="images/tiles.bmp">
<table cellspacing="1" height="200">
<tr valign="top" height="25">
<td align="center"> <h:commandButton image="/m-bank/images/banklink.bmp"/> </td></tr>
<tr height="25" ><td align="center"> <h:commandButton image="/m-bank/images/resume.bmp"/></td></tr>
<tr height="25" ><td align="center"> <h:commandButton image="/m-bank/images/hire.bmp"/></td></tr>
<tr height="25" ><td align="center" > <h:commandButton image="/m-bank/images/shop.bmp"/></td></tr>
<tr height="25"><td align="center"><h:commandButton image="/m-bank/images/news.bmp"/></td></tr>
</table>
</td>
<td valign="top" width="525">
<h:outputText value="Hallo"/>
</td>
<td align="center">
<h:commandButton image="/m-bank/images/sign-in.bmp" action="signin"/><vr>
<h:commandButton image="/m-bank/images/register.bmp" /><br>
<center>
<table border="1" height="460">
<tr><td valign="top">M-Ware Related Links</td></tr>
<tr><td valign="top">Entertainment</td></tr>
</table>
</center>
</td>
</tr>
<tr><td colspan="3" background="images/bline.bmp" height="5"></td></tr>
<tr height="10">
<td ></td>
<td align="center">
<h:panelGrid columns="4">
<h:commandButton image="/m-bank/images/about.bmp"/>
<h:commandButton image="/m-bank/images/faqs.bmp"/>
<h:commandButton image="/m-bank/images/contact.bmp"/>
<h:commandButton image="/m-bank/images/sitemap.bmp"/>
</h:panelGrid>
</td>
<td></td>
</tr>
</table>
</center>
</table>
</h:form>
</body>
</f:view>
</html>
<?xml version="1.0"?>
<!DOCTYPE webapp PUBLIC
"=//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
the from-out-come page is just the same as the one above only that it has a different name and its to test the navigation.
Hope that is good enough to help me
Thanks[/nobr]