Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

indexed property for array does not see my bean :-(
Hello all,

I have been attempting to use the Indexed Properties as defined in
http://struts.apache.org/faqs/indexedprops.html

I have been working on returning a list of objects to a .jsp.

In other words, in the .jsp, I have something like:

....
<bean:write name="bean" property="labelValue[1].label" />

except, I have created my own class (with getters and setters) as well
as an indexed property (that is part of an ActionForm servelet).

My problem is as follows (I will use my code for now).
When I do:

<bean:write name="People" property="peopleValue[1].SocSecNo" /> then I
get the following message:

"org.apache.jasper.JasperException: No getter method for property
peopleValue[1].SocSecNo"

But for my class, I do have the getters and setters: getSocSecNo and
setSocSecNo. If I just do the following:

<bean:write name="People" property="peopleValue[1]"

then I get the data but it looks something like:

SocSecNo -> 123-45-6789 LastName -> Monster FirstName -> Herman
Address -> 123 Sesame Street ...

and I get *no exceptions*

So, it seems like it recognizes my indexed property, it seems to
recognize the data I have put in but it does not seem to recognize my
bean (or see it as a bean).

What must I do to make it see that I have an array of beans?
What do I need to do to my own class (People) to make it a bean?

I am using "Exadel Strut Studio" and have tried to make the regular
class a bean by implementing it as an ActionForm (I thought a bean is a
bean is a bean) but it still does not work.
What can I do?

Kindest Regards.

PS - sorry to be so long.


Report this thread to moderator Post Follow-up to this message
Old Post
milkyway
12-26-04 08:56 PM


Re: indexed property for array does not see my bean :-(
"milkyway" <d0mufasa@hotmail.com> wrote in message
news:1104071386.512490.301010@z14g2000cwz.googlegroups.com...
[...]
> <bean:write name="People" property="peopleValue[1].SocSecNo" /> then I
> get the following message:
>
> "org.apache.jasper.JasperException: No getter method for property
> peopleValue[1].SocSecNo"
>
> But for my class, I do have the getters and setters: getSocSecNo and
> setSocSecNo. If I just do the following:
>
[...]
<bean:write name="People" property="peopleValue[1].socSecNo" />



Report this thread to moderator Post Follow-up to this message
Old Post
Ryan Stewart
12-26-04 08:56 PM


Re: indexed property for array does not see my bean :-(
"milkyway" <d0mufasa@hotmail.com> wrote in message
news:1104071386.512490.301010@z14g2000cwz.googlegroups.com...
> Hello all,
>
[...]
And please choose one group to post to. Stick with comp.lang.java.help for
now. It is for simple issues. The .programmer group is for more advanced
things.

Followup set to c.l.j.h



Report this thread to moderator Post Follow-up to this message
Old Post
Ryan Stewart
12-26-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:37 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.