I used

<jsp:setProperty name='c' property='*' />

at first, but nothing happened, so I changed it for

<jsp:setProperty name='c' property='a' param='a' />
<jsp:setProperty name='c' property='b' param='b' />
<jsp:setProperty name='c' property='status' param='status' />

and changed the setter methods in the bean from setA(A), setB(B) to
setA(String), setB(String), but nothing happened either...

I've noticed some strange behavior, if I change one method in the bean to
setBlah(String) and then rename the form field name to blah, and set

<jsp:setProperty name='c' property='*' />

it actually sets that variable! but no the others, and if I change back the
names, it doesn't work! I even get an exception:

org.apache.jasper.JasperException: Can't find a method to write property 'a'
in a bean of type 'A'

what could it be??

LJ



----- Original Message -----
From: "Ritesh Gupta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 06, 2003 2:02 AM
Subject: Re: Use of beans


> Hey Luis,
>
> Can you print here what all jsp:setProperty tags are you using for setting
> properties in Bean C?
>
> Ritesh
>
> ----- Original Message -----
> From: "Luis Javier Beltrán" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 06, 2003 3:52 AM
> Subject: Use of beans
>
>
> > Hi everybody,
> >
> > I have 3 different forms that should save information in 3 different
> tables
> > in a database. For that task, I've created 3 beans to hold the info.
These
> > beans, reflect the structure of each table. Assuming the tables are
> similar
> > to this:
> >
> > Table A           Table B            Table C
> >
> > a_code            b_code            a_code
> > a_name           b_name            b_code
> >                                                c_status
> >
> >
> > I created a bean A and a bean B with two fields (code and name) and the
> > proper getter/setter methods, and I used the <jsp:setProperty name="a"
> > property="*"/> tag to load the information from the forms.
> >
> > The problem was bean C. I created it with 3 fields (A a, B b, String
> status)
> > and the setA(A), setB(B), setStatus(String) setter methods, and that
> doesn't
> > work  with the <jsp:setProperty> tag, which is expecting at least
> > setA(String) and setB(String) methods.
> > Then I tried creating a setACode(String) and a setBCode(String) methods,
> and
> > renaming the form elements to aCode and bCode, but that didn't work
> > either...
> >
> > I also tried using:
> >
> > <jsp:setProperty name='c' property="aCode" param="a" />
> > <jsp:setProperty name='c' property="bCode" param="b" />
> >
> > and it didn't work... what else should I try??? Do you have any
> suggestions
> > or a different approach?
> >
> > Thanks a lot!
> >
> > Luis Javier
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> >
> > Some relevant archives, FAQs and Forums on JSPs can be found at:
> >
> >  http://java.sun.com/products/jsp
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://forums.java.sun.com
> >  http://www.jspinsider.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to