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
etail" element="table">
<tr>
<td>Userid</td><td><span jwcid="@TextField" value="ognl
etail.id" size="20"/></td>
</tr>
<tr>
<td>Username</td><td><span jwcid="@TextField" value="ognl
etail.userName" size="20"/></td>
</tr>
<tr>
<td>First Name</td>
<td><span jwcid="@TextField" value="ognl
etail.firstName" size="20"/></td>
</tr>
<tr>
<td>Last Name</td>
<td><span jwcid="@TextField" value="ognl
etail.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;
try
{
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
session =sessionFactory.openSession();
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