-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: did not work when input value is disabled
PostPosted: Thu Apr 08, 2004 12:53 am 
Beginner
Beginner

Joined: Wed Mar 24, 2004 8:43 am
Posts: 42
hi


u]when we put a disabled keyword before the value the above jsp did not work, but when we remove that disabled keyword it works successfully[/u]

what the wrong?

error report


10:49:32,004 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
product id is null
product name is ggimhan@hotmai.com
10:49:32,004 ERROR ServletDispatcher:185 - Could not execute action
java.lang.NullPointerException: null is not a valid identifier
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1844)




when we disabled null value is passing, what the wrong?





this is working successfully,


<html>
<head>
<title>Product List</title>
</head>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Iterator"%>
<body>
<h1>Products Modify </h1>
<form method="POST" action="productupdate.action">
<%
test.hibernate.actions.ProductModify e=new test.hibernate.actions.ProductModify();
e.setOid(request.getParameter("oid"));
String s=e.doExecute();
System.out.println("mod execute is ="+ s);
String s1=e.getOid();
System.out.println("mod oid is ="+s1);
java.util.List list=e.getProducts();
System.out.println("mod list.size()="+list);
Iterator iter = list.iterator();
if(iter.hasNext()){
test.hibernate.data.Product p = (test.hibernate.data.Product) iter.next();
String oid=p.getId();
String a= p.getName();
double b=p.getPrice();
int c=p.getAmount();
%>
<p align="center"><font color="#000000" size="6"><strong> Modify An Product </strong></font></p>
<div align="center">
<table width="80%" border="1">
<tr>
<td width="48%" bgcolor="#999999"> <div align="left">
<p><strong>Org ID</strong></p>
<p><strong>Org Name</strong></p>
</div></td>
<td width="52%"><p>
<input name="productid" type="text" size="35" value="<%= oid%>">
</p>
<p>
<input name="name" type="text" size="35" value="<%= a%>">
</p></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product price</strong></div></td>
<td><input name="price" type="text" size="35" value="<%= b%>"></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product Amount</strong></div></td>
<td><input name="amount" type="text" size="35"value="<%= c%>"></td>
</tr>
<%
}
%>
</table>
</div>
<p align="center">
<input type="submit" name="Submit" value="Change Now">


</body>
</html>


but when we put a disabled keyword before the value the above jsp did not work

error report


10:49:32,004 INFO SessionFactoryObjectFactory:82 - no JNDI name configured
product id is null
product name is ggimhan@hotmai.com
10:49:32,004 ERROR ServletDispatcher:185 - Could not execute action
java.lang.NullPointerException: null is not a valid identifier
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1844)

when we disabled null value is passing, what the wrong?


<input name="productid" type="text" size="35" disabled value="<%= oid%>">
</p>
<p>
<input name="name" type="text" size="35" value="<%= a%>">
</p></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product price</strong></div></td>
<td><input name="price" type="text" size="35" value="<%= b%>"></td>
</tr>
<tr>
<td bgcolor="#999999"> <div align="left"><strong>Product Amount</strong></div></td>
<td><input name="amount" type="text" size="35"value="<%= c%>"></td>


help me

regards gimhan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.