Need help with Struts EJB Value Object

2001-11-25 Thread Hai Hoang

I am using nested EJB value object in my form. For
example, the jsp fields maybe looks like this,

html:text property=user.userName /
html:text property=user.password /

The problem arised when I retrieved a record from the
entity bean and populate the jsp form and ready for
the user to modify and update.  Specifically, if I
don't specify the hidden Id field html:hidden
property=user.userId / in the jsp form then the Id
property in value object resets to null.  Is there
anyway I can prevent this from happening?

Thanks,

Hai Hoang







__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Need help with Struts EJB Value Object

2001-11-25 Thread tw . richter

Hi,

I am not an expert, Hai, but I have the same problem. I fear you have to insert either 
a hidden field or to set the form to session scope. Another way is to call 
request.setAttribute in the Action perform method an in the form % 
request.getAttribute %. The form is first populated and then reset and if there is no 
form it is recreated. Therefore there are always null in the fields.

Regards
Thomas

-Original Message-
From : Hai Hoang [EMAIL PROTECTED]
To : [EMAIL PROTECTED]
Date : 26 November 2001 03:17:07
Subject : Need help with Struts  EJB Value Object
I am using nested EJB value object in my form. Forexample, the jsp fields maybe looks 
like this,

html:text property=“user.userName“ /
html:text property=“user.password“ /

The problem arised when I retrieved a record from the
entity bean and populate the jsp form and ready for
the user to modify and update.  Specifically, if I
don't specify the hidden Id field html:hidden
property=“user.userId“ / in the jsp form then the Id
property in value object resets to null.  Is there
anyway I can prevent this from happening?

Thanks,

Hai Hoang







__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]



:-) As sceptical as one can be! (-:



--
Get a free, personalised email address at http://another.com
TXT ALRT! Stop wasting money now. Send FREE, personalised txt
from http://another.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]