Hi Luis,

> > <jsp:setProperty name='c' property='a' param='a' />
> > <jsp:setProperty name='c' property='b' param='b' />
> > <jsp:setProperty name='c' property='status' param='status' />
> >
Try setting only status and not a and b.

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

When you modified the methods, did you change the actual variables of the
bean to those types ? I mean ... if you had :
private B b;
private A a;

I dont think what you are trying (by changing the setter methods )will work
unless you change these also to :
private String b;
private String a;

Hope that helps.
Ritesh

----- Original Message -----
From: "Luis Javier Beltrán" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 06, 2003 10:40 PM
Subject: Re: Use of beans


> Hola Martin,
>
> I thought that as tag values 'a' would be just the same as "a", as they
are
> strings and the evaluation would be done by some PropertyEditor (I think,
> please correct me)...
>
> Anyway, I tried replacing the ' for " but I got the same result
>
> gracias por la ayuda,
>
> LJ
>
> ----- Original Message -----
> From: "Martin" <[EMAIL PROTECTED]>
> To: "A mailing list about Java Server Pages specification and reference"
> <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, September 07, 2002 8:45 AM
> Subject: Re: Re: Use of beans
>
>
> > Luis-
> > All of the strings I have used start / end with quotes  property="*"
> //This
> > is a String
> > all characters starting and ending with tick mark are casted to datatype
> > integer  property='*' //This is integer
> > Saludos Cordiales!
> > -Martin
> > ----- Original Message -----
> > From: "Luis Javier Beltrán" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, February 06, 2003 12:15 PM
> > Subject: Re: Use of beans
> >
> >
> > > 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
> > >
>
>
===========================================================================
> 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