Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-16-2008, 02:17 PM
Member
 
Join Date: Aug 2008
Posts: 10
Rep Power: 0
Srikala is on a distinguished road
Default jsf command link
Hi friends ,
i have created one jsf page in that 2 commandlinks are there,if we click firstlink it goes to first page and if 2nd it goes to second page,but in my code it is not going next page please see my code and give me solution,
thanks in advance
my code:

<%@ page contentType="text/html"%>
<%@ taglib uri="/WEB-INF/html_basic.tld" prefix="h" %>
<%@ taglib uri="/WEB-INF/jsf_core.tld" prefix="f" %>

<f:view>
<html>
<head>
<title>Users</title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
<h:form>
<!-- MAIN Table-->
<table width="100%" cellpadding="0" cellspacing="0" height="100%">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="mainbgbar" width="80%" valign="baseline">

</td>
<td class="connector" width="">
&nbsp;
</td>
<!-- logo rightside -->
<td align="center" valign="middle" width="13%">

<h:graphicImage id="gi" alt="The image could not be found."value="" width="150" height="150" title="This is demo for 'graphicImage' tag" ></h:graphicImage>
</td>
</tr>
</table>
</td>
</tr>

<tr>
<td class="bgy">
<table width="100%" height="100%">
<tr>
<td align="right">
&nbsp;
</td>
</tr>
</table>
</td>
</tr>
<tr></tr><tr></tr>

<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
<tr>
<td>
<h:form>
<h:commandLink id="link1" value="Add Users." action="addusers" /><br></br>
<h:commandLink id="link2" value="AddField Users." action="addfieldusers" /><br></br>
</h:form>
</td>
</tr>

<tr height="90%">
<td width="100%" valign="middle" align="center">


<!-- MAIN FRAME -->
<table width="100%" height="100%" align="center">
<table class="tbl" height="50%" width="25%" border="0" cellspacing="0" cellpadding="10" >

<tr class="mainbgbar">
<td colspan="2" class="title"><b>&nbsp;Users</b></td>
</tr>

<tr>
<td>&nbsp;<hutputText value="Name:" styleClass="lable"/></td>
<td>&nbsp;<h:inputText id="Name" value="" /></td>
</tr>
<tr>
<td>&nbsp;<hutputText value="EmpId:" styleClass="lable"/></td>
<td>&nbsp;<h:inputText id="EmpId" value="" /></td>
</tr>
<tr>
<td>&nbsp;<hutputText value="EmailId:" styleClass="lable"/></td>
<td>&nbsp;<h:inputText id="EmailId" value="" /></td>
</tr>
<tr>
<td>&nbsp;<hutputText value="MobileNo:" styleClass="lable"/></td>
<td>&nbsp;<h:inputText id="MobileNo" value="" /></td>
</tr>
<tr>
<td>&nbsp;<hutputText value="Username:" styleClass="lable"/></td>
<td>&nbsp;<h:inputText id="username" value="" /></td>
</tr>
<tr>
<td>&nbsp;<hutputText value="Password: " styleClass="lable"/></td>
<td>&nbsp;<h:inputSecret id="password" value="" /></td>
</tr>
<tr>
<td>
<center>
<h:form>
<h:commandButton value="submitt" action="" styleClass="button"/>
</h:form>
</center>
</td>
</tr>
</table>

<!-- END OF MAIN FRAME -->
</table>
<tr>
<td class="mainbgbar" height="20" align="center">

</td>
</tr>
</table>
<!-- End of MAIN Table-->
</h:form>
</body>
</html>
</f:view>

faces-config.xml:

<navigation-rule>
<from-view-id>/pages/admin.jsp</from-view-id>
<navigation-case>
<from-outcome>addusers</from-outcome>
<to-view-id>/pages/addusers.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>addfieldusers</from-outcome>
<to-view-id>/pages/addfieldusers.jsp</to-view-id>
</navigation-case>
</navigation-rule>
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 06-25-2009, 09:03 AM
Member
 
Join Date: Jun 2009
Posts: 8
Rep Power: 0
smithahrao is on a distinguished road
Default
I saw multiple nested h<:form> in you code. Have only one <h:form> (not nested) then it should work
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
jsf command link navigation case Srikala JavaServer Faces 1 03-23-2009 12:16 PM
jsf command link Srikala JavaServer Faces 0 10-08-2008 08:53 AM
Link for 64 bit JDK. aparna New To Java 0 03-19-2008 03:15 PM
Link List one198 New To Java 0 10-14-2007 02:33 PM
Unable to execute command line command in java LordSM New To Java 1 08-08-2007 01:23 AM


All times are GMT +2. The time now is 01:09 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org