stale link error plz help

L

lgraji20

Hi everybody,

this is my following code
..hbm
-----
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.table">
<class name="Details" table="Details">
<id name="id" type="int" column="userid" >
<generator class="native"/>
</id>
<property name="userName" column="username"/>
<property name="firstName" column="firstname"/>
<property name="lastName" column="lastname"/>
</class>
</hibernate-mapping>
html
----
<html>
<body jwcid="@Body">
<form jwcid="@Form" listener="listener:update" stateful="'false'">
<table jwcid="@Foreach" source="ognl:content" value="ognl:detail"
element="table">
<tr>
<td>Userid</td><td><span jwcid="@TextField" value="ognl:detail.id"
size="20"/></td>
</tr>
<tr>
<td>Username</td><td><span jwcid="@TextField"
value="ognl:detail.userName" size="20"/></td>
</tr>
<tr>
<td>First Name</td>
<td><span jwcid="@TextField" value="ognl:detail.firstName"
size="20"/></td>
</tr>
<tr>
<td>Last Name</td>
<td><span jwcid="@TextField" value="ognl:detail.lastName"
size="20"/></td>
</tr>
<tr><td></td><td><input type="submit" value="Save"/></td></tr>
</table>
</form>
</body>
</html>
java
----
public void update(IRequestCycle cycle)
{
Session session = null;
SessionFactory sessionFactory = new
Configuration().configure().buildSessionFactory();
session =sessionFactory.openSession();
try
{
session.beginTransaction();
detail.setId(id);
detail.setUserName(username);
detail.setFirstName(firstname);
detail.setLastName(lastname);
session.update(detail);
session.getTransaction().commit();
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
if(session!=null)
{
session.flush();
session.close();
}
}
detail=new Details();
}

Here when i click submit button the stale link error is coming..
Whether the query is not correct..

following is the error
-----------------------
You have clicked on a stale link.

Rewind of form Update/$Form expected 3 more form elements, starting
with id 'TextField'.

This is most likely the result of using your browser's back button, but
can also be an application error.

You may continue by returning to the application's home page.


anybody please give me any idea..
thanks,
Raji.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top