Re: Filling-in a Bean inside a Servlet
Dani Pardo <[email protected]> Fri, 2 Sep 2005 11:03:11 +0200
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
En/na Brett Zamora ha escrit: > Dani... > > Couple of thoughts... have you considered making the scope of the bean > "session"? > > Seems to me like the properties of the bean are already set, based on your > <jsp:setProperty name="customer" property="*" /> statement. > Yep, I've tried making the property Bean session-scoped. But the problem remains the same: When I create the Bean in the servlet, and I attach it to the session scope via session.setProperty, then the JSP can fill all the fields via <jsp:setProperty ... property="*" /> That's great for, say, displaying the customer info. But, if the user changes the text fields and pressess Submit, the attached bean will be the same. And now the servelt gets control, and also must fill in the bean manyally again. Maybe an aproach is to use two jsps, one for displaying/editing, and another to get the results of the form. But that breaks the scheme I'm using (a main controller servlet). -- Dani Pardo, [email protected] Enplater S.A ___________________________________________________________________________ To unsubscribe, send email to [email protected] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html