Yes, I considered that, but I need the values to persist.   The only data
in the bean that needs to change in the bean is the data that corresponds
to the form fields.  Perhaps the answer is to have several beans that
expire every request, but if you need to persist the data, you still end up
copying all of the elements from one spot to another.  So I'm still left
with the question of Is auto-assigning worth the trouble.



                                                                                       
                 
                    Jann VanOver                                                       
                 
                    <Jann.VanOver@lo        To:     "'[EMAIL PROTECTED]'" 
                 
                    udeye.com>              <[EMAIL PROTECTED]>           
                 
                                            cc:                                        
                 
                    30-05-01 12:07          Subject:     RE: What is the value of 
auto-assigning beans? 
                    PM                                                                 
                 
                    Please respond                                                     
                 
                    to tomcat-user                                                     
                 
                                                                                       
                 
                                                                                       
                 




If you don't want the values to persist, don't put the bean in the
"session"
scope.  Try "page" or "request" and then it will get new values each time.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 9:59 AM
To: [EMAIL PROTECTED]
Subject: What is the value of auto-assigning beans?


This question may be asked out of ignorance, but it seems to me that using
the tag:

<jsp:useBean id="MyBean" scope="session" class="Test.MyBean" />
<jsp:setProperty name="MyBean" property="*" />

to assign values from form fields to the bean is of limited use.

Let's assume that there are 2 text fields, A and B on Jsp1.jsp, with B
being required.  I have some code that checks to make sure B is populated,
if it's not, the browser returns to Jsp1.jsp.

The problem I run into is that I can populate A with a value, submit the
form, get returned to Jsp1.jsp, delete A and populate B, submit the form,
and continue.  I how have values for both A and B, even though A was blank.

I suspect that I'm not the first person to ask this question, is there an
obvious solution that I missed, if not, what do other people do to get
around this problem; do all of the assignements by hand?

Thanks.


--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.




--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.


Reply via email to