What if I have a DynaAction form . In that case how do I handle the
getter/Setter method ...
-Original Message-
From: Rajat Pandit [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 14, 2003 3:16 PM
To: Struts Users Mailing List
Subject: indexed properties mini(est) HOWTO
hello,
am
hello,
not very sure but iguess make ur custom form class by extending the
DynaActionForm and write your own getters and setters.
you would have to make it anyway coz (as far as i know) i couldnt find a
better way to do validatoin on indexed values. hence wrote it in the
validate() method.
The wiki might be a good place for this:
http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsNewFaqs
--- Rajat Pandit [EMAIL PROTECTED] wrote:
hello,
am positng a quick HOWTO to get started with using indexed properties,
as i guess almost everyone has had to deal with it atleast once.
pls
Hi Vara,
I have implemented client-side validations for indexed properties, but I
have done it through custom validators. Look through the archive for a
thread titled Validation of Indexed properties. I describe how I
implemented the client side validations for indexed properties.
Nick
: Re: Indexed Properties + Validator + JavaScript
Hi Vara,
I have implemented client-side validations for indexed properties, but I
have done it through custom validators. Look through the archive for a
thread titled Validation of Indexed properties. I describe how I
implemented the client
:
bs.net Subject: RE: Indexed Properties +
Validator + JavaScript
, October 26, 2003 8:23 AM
To: Struts Users Mailing List
Subject: Re: Indexed properties help!
Rajat,
Here is an example of an indexed property called 'signal' (in my
application it holds complex objects, not simple strings or integers):
public OrderedSignalBean getSignal(int index
26, 2003 8:23 AM
To: Struts Users Mailing List
Subject: Re: Indexed properties help!
Rajat,
Here is an example of an indexed property called 'signal' (in my
application it holds complex objects, not simple strings or integers):
public OrderedSignalBean getSignal(int index
Rajat,
Here is an example of an indexed property called 'signal' (in my
application it holds complex objects, not simple strings or integers):
public OrderedSignalBean getSignal(int index) {
while( index = this.getSignals().size() ){
i have same question as you , do you have get right answer?
my resolve is like this :
form bean -
private ArrayList awards = new ArrayList (5);
public void reset(ActionMapping actionMapping, HttpServletRequest
httpServletRequest) {
awards .add(0,new AwardMasView ());
awards .add(1,new
Search the user archive...
This question has been answered many times(Use of lazy lists is one of the ways to
manange the list runtime..)
-Original Message-
From: hsc [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 9:29 AM
To: [EMAIL PROTECTED]
Subject: Re: Indexed Properties
try looking at www.keyboardmonkey.com
I believe the example on nested tag will help you...
Best Regards,
Benz Lim
-Original Message-
From: hsc [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 3:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Indexed Properties examples?
i have same
OK, I faced the same problems you a few weeks ago (I was a total newbee
with indexed properties and I spent 10 full days on the problem - I'm
still hot on this one !).
I haven't read the initial post and I hope my input will be useful to
you.
Regarding the form :
1/ I create an empty array list
If you're using struts 1.1 you can define a form property as an
arrayList to do the same thing..
form-property name=myproperty type=java.util.ArrayList /
...
action name=myForm scope=session ..
..
ArrayList myList = new ArrayList()
theForm.set(myproperty,myList);
..
logic:iterate id=foo
Try changing the property value reference in your JSP to reference
awardIndexed instead of AwardIndexed. That might help, but I'm not
certain.
-Original Message-
From: Michael Blair [mailto:[EMAIL PROTECTED]
I am still trying to get this to work. I simply want to
display records
cc:
Subject: Re: Indexed Properties
07/28/2003 08:44
, 2003 2:57 AM
Subject: Re: Indexed Properties
Atta,
It sounds to me like you have it. As long as your names match up, it
should work fine. Ajay has given a full code example that looks good.
Nick
atta-ur rehman
[EMAIL PROTECTED
What i'm still missing what is updated when i submit the
form? where can i
get updated values from? my ActionForm has list attirbute
called blocks
each element in the list is a Block bean object. The
Block bean has getter/setters for id, name and category.
Two strategies:
1. Update
]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:04 AM
Subject: RE: Indexed Properties
What i'm still missing what is updated when i submit the
form? where can i
get updated values from? my ActionForm has list attirbute
called blocks
each element
but this code always prints the values that i set
the first time page was shown!
Beats me...the code looked fine to me.
Maybe something wrong with your action mappings
and form bean configurations? Or the JSP the values
are changed on.
-TPP
so you are saying that ideally the the beans collection in my ActionForm
should be updated on form submission?
- Original Message -
From: Paananen, Tero [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:30 AM
Subject: RE: Indexed
so you are saying that ideally the the beans collection
in my ActionForm should be updated on form submission?
The attribute values in the beans held in the collection
should change on form submission, yes.
-TPP
-
This
path=/test.jsp/
/action
my form class extends ActionForm.
any ideas?
ATTA
- Original Message -
From: Paananen, Tero [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 10:43 AM
Subject: RE: Indexed Properties
so you are saying that ideally
PROTECTED]
com cc:
Subject: Re: Indexed Properties
, after all ;)
My sincere thanks for your help and patience! It took some time, but was
worth it!
ATTA
- Original Message -
From: Nicholas L Mohler [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 11:19 AM
Subject: Re: Indexed Properties
I've been reading an indexed properties article at:
http://jakarta.apache.org/struts/faqs/indexedprops.html
Also read http://www.developer.com/java/other/article.php/2233591
Very helpful.
-TPP
-
This email may contain
Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 10:12 AM
Subject: RE: Indexed Properties
I've been reading an indexed properties article at:
http://jakarta.apache.org/struts/faqs/indexedprops.html
Also read http://www.developer.com/java/other/article.php/2233591
Very
Atta,
You can use indexed properties in your ActionForm class. The key is having
all of the correct methods in your form class.
1) Getter and setter: You need a get/Set method for the collection that
you refer to in your jsp. for example:
public Collection getLocations()
public void
Mohler [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 11:58 AM
Subject: Re: Indexed Properties
Atta,
You can use indexed properties in your ActionForm class. The key is
having
all of the correct methods in your form class.
1) Getter
:
Subject: Re: Indexed Properties
07/28/2003 03:44
Mailing List [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 1:09 PM
Subject: Re: Indexed Properties
Atta,
The complaint you are getting is because the property fruit is not a
property of the oneF bean. That the oneF object is not a bean with
properties will give you problems. Depending
[mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 3:37 PM
To: Struts Users Mailing List
Subject: Re: Indexed Properties
Thanks, for the reply.
Okay, here is the background. I'm trying to learn the user of Indexed
Properties. Why I'm doing that? Well, I have a form that lists, let's
say
for the sake
Message-
From: atta-ur rehman [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 3:37 PM
To: Struts Users Mailing List
Subject: Re: Indexed Properties
Thanks, for the reply.
Okay, here is the background. I'm trying to learn the user of Indexed
Properties. Why I'm doing that? Well, I
Have you tried:
onclick=alert(document.testForm.elements['att[0]'].value)
?
-Original Message-
From: Fabiano de O. Lucchese [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 1:53 PM
To: [EMAIL PROTECTED]
Subject: Indexed properties and JavaScript
Hi All,
I've been trying to
Hi, Ted.
I hadn't tryied this, and it has worked on IE 6 and
Opera 7.1, but not on Netscape 7 !
Do you know if this syntax isn't 100 % compliant to
the JavaScript standard or if Netscape has
implementation problems ?
Thank you very much anyway.
FLu-X
--- Jones, Ted [EMAIL PROTECTED] wrote:
I hadn't tryied this, and it has worked on IE 6 and
Opera 7.1, but not on Netscape 7 !
Try this instead:
document.forms['testForm']['att[0]'].value
That should work in any browser.
Matt Kruse
Perfect !
Thank you and Ted.
FLu-X
--- Kruse, Matt [EMAIL PROTECTED] wrote:
I hadn't tryied this, and it has worked on IE 6
and
Opera 7.1, but not on Netscape 7 !
Try this instead:
document.forms['testForm']['att[0]'].value
That should work in any browser.
Matt Kruse
The fields name is name[0] right?
So in javascript you cant use something like document.forms[0].name[0] so
you will need to use the alternative javascript notation to get at your
field:
document.forms[0].elements['name[0]']
If you need to change the way indexed fields are done in struts
JDK 1.4.1
Struts 1.1 Nightly
JSTL 1.0.3
Are you using Struts-EL? You can't reference EL expressions in Struts
tags, just Struts-EL.
-Original Message-
From: Josh Rayls [mailto:[EMAIL PROTECTED]
I have been struggling with this for a couple of days now. I've
scoured
the
archives from top to bottom, and I've found some
Yep. Using Struts-EL.
-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 4:16 PM
To: Struts Users Mailing List
Subject: RE: Indexed Properties with DynaActionForm Problems
Are you using Struts-EL? You can't reference EL expressions in Struts
It would be hard for us to figure out anything without any description
of what really happens. Do you have an exception stack trace?
You could really help yourself out by setting this up in a JPDA debugger
and really tracking exactly what happens at the point of the error (and
before).
Users Mailing List
Subject: RE: Indexed Properties with DynaActionForm Problems
It would be hard for us to figure out anything without any description
of what really happens. Do you have an exception stack trace?
You could really help yourself out by setting this up in a JPDA debugger
and really
Users Mailing List
Subject: Re: Indexed properties and form
Actually i is just another variable I am using to
display to the user the number of the row. It is
declared in another scriplet as
% int i = ; %
--- Evan Schnell [EMAIL PROTECTED] wrote:
Samir Shah wrote:
Hi,
I have a JSP page
: Indexed properties and form
Actually i is just another variable I am using to
display to the user the number of the row. It is
declared in another scriplet as
% int i = ; %
--- Evan Schnell [EMAIL PROTECTED] wrote:
Samir Shah wrote:
Hi,
I have a JSP page that outputs data using
Samir Shah wrote:
Hi,
I have a JSP page that outputs data using a Collection
using the following section
logic:iterate id=lifeBenefit name=lifeBenefits
type=com.quote.dao.BenefitLineItem
indexId=classNum
Where do you declare i? I think you need to use
td class=formtext %=classNum %/td
Actually i is just another variable I am using to
display to the user the number of the row. It is
declared in another scriplet as
% int i = ; %
--- Evan Schnell [EMAIL PROTECTED] wrote:
Samir Shah wrote:
Hi,
I have a JSP page that outputs data using a
Collection
using the following
respond to Struts Users Mailing List
[EMAIL PROTECTED]
To:[EMAIL PROTECTED]
cc:
Subject:Re: Indexed Properties and Population
Matt,
You really don't need to know how many there are, just create them
on demand. You can intercept gets and auto-extend the underlying
Collection. One
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 6:52 AM
To: Struts Users Mailing List
Subject: Re: Indexed Properties and Population
David says:
One implementation that should work based on your example
as long as you are willing
Matt,
You really don't need to know how many there are, just create them
on demand. You can intercept gets and auto-extend the underlying
Collection. One implementation that should work based on your example
as long as you are willing to create a child factory is in the commons
collection
int elements = children.size()
?
Where are you defining this method?
-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:31 PM
If I have:
private ArrayList children;
public void setChildren(int index, ChildForm childForm) {
Just make sure you've got a way to cap the max number you auto-create...
Quoting David Morris [EMAIL PROTECTED]:
Matt,
You really don't need to know how many there are, just create them
on demand. You can intercept gets and auto-extend the underlying
Collection. One implementation that
'
Subject: RE: Indexed Properties and Population
int elements = children.size()
?
Where are you defining this method?
-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:31 PM
If I have:
private ArrayList children;
public void
At end.
-Original Message-
From: Andy Kriger [mailto:akriger;greaterthanone.com]
I have a DynaActionForm collecting credit card info. A user
can enter up to
3 credit cards on the form. I want to collect this info in
the text fields
and create new CreditCard objects
Mailing List
Subject: RE: indexed properties and form help needed
At end.
-Original Message-
From: Andy Kriger [mailto:akriger;greaterthanone.com]
I have a DynaActionForm collecting credit card info. A user
can enter up to
3 credit cards on the form. I want to collect this info
PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : RE: Indexed Properties - soluce :-)
On Wed, 17 Jul 2002 [EMAIL PROTECTED] wrote:
Date: Wed, 17 Jul 2002 15:30:38 +0200
From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED
On Thu, 18 Jul 2002, Arnaud HERITIER wrote:
Date: Thu, 18 Jul 2002 11:09:24 +0200
From: Arnaud HERITIER [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
[EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Indexed Properties
a dynamic value in standard html tag.
I you have another idea to clean my code, don't hesitate to propose it.
Arnaud.
-Message d'origine-
De : Eddie Bush [mailto:[EMAIL PROTECTED]]
Envoye : mardi 16 juillet 2002 17:54
A : Struts Users Mailing List
Objet : Re: Indexed Properties - soluce
PROTECTED]]
Sent: Wednesday, July 17, 2002 10:29 AM
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: Indexed Properties - soluce :-)
All suggestions are welcome Eddie.
Your idea and your argumentations are good, but your proposed
solution doesn't work :-(
Explanations
]
Subject: RE: Indexed Properties - soluce :-)
Hi there,
Actually when you are looking at the stuff done in the JSTL
all three ways pretty much work, because it contains a
scripting language ;).
Are there any plans on integrating it within Struts? I like
both libraries very much, and I recall
Hi Craig,
Cool to hear that you are considering it ;). Can I help out
in any way?
Manfred Riem
If it is done this would make it is either:
1. property = all I want to write
2. property = %= java expression %
3. property = ${myRadios[param.index]}
My current thinking
On Wed, 17 Jul 2002 [EMAIL PROTECTED] wrote:
Date: Wed, 17 Jul 2002 17:36:57 +0200
From: [EMAIL PROTECTED]
To: 'Craig R. McClanahan' [EMAIL PROTECTED],
'Struts Users Mailing List' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Indexed Properties - soluce :-)
Hi Craig,
Cool
PROTECTED],
[EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject: RE: Indexed Properties - soluce :-)
All suggestions are welcome Eddie.
Your idea and your argumentations are good, but your proposed solution
doesn't work :-(
Explanations :
In a taglib property you can use either
Ok I found myself a solution (it seems) :
I need to modify the JSP page to index manually the property and I don't
need to use the indexed=true which indexes the BEAN and not the property :
html:form ...
logic:iterate id=theRadio indexId=index name=myFormBean
property=myRadios
html:radio
May I make a suggestion? You're causing the implicit creation of many
strings ... and doing it in a loop (bad). Try this:
html:form ...
logic:iterate id=theRadio indexId=index name=myFormBean
property=myRadios
html:radio property=myRadios[%= index %] value=A/html:radio
property=myRadios[%=
yup.
Arron
Maris Orbidans wrote:
hello
Do I have to use Nightly Build to get subj. ?
1.0.2 says
Lemums1.jsp: Attribute indexed invalid according to the specified TLD
at line 194, column 5
html:text indexed=yes property=labCits size=20 maxlength=20/
Searched mail archive
RTFM
http://jakarta.apache.org/struts/userGuide/struts-html.html
and the mailling list archive which is full of examples
http://www.mail-archive.com/struts-user@jakarta.apache.org/
Have fun!
David Gaulin
Tel / tél :(613) 946-9595
Email / courriel : [EMAIL PROTECTED]
Facsimile /
Sridhar,
I've had to make one such application of equally nasty size. To get the
job done the nested tags were made. They made the truly daunting task a
walk in the park.
They're in the nightly build, or if you're confined to an earlier
release of Struts you can get them as a separate jar
I've had repeated problems with IE and Netscape on win9x platforms using a
large number of text fields. The browser display seems to become corrupt
after a short period of time using the screens. It might be worth your
time to mock up some screens on your target platform(s) and make sure you
loads on this in the archive.
Sridhar M [EMAIL PROTECTED] on 02/22/2002 09:48:36 AM
Please respond to Struts Users Mailing List
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Indexed Properties
Hi,
I have a requirement wherein my HTML Form contains
around 100 textfields.
Yes, that can be done currently with 1.0 or 1.0.1 using the multibox tag.
Look through the archive and at the docs for multibox. If you still need
more help, let us know.
-Jonathan
- Original Message -
From: Marcus Brito [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Em Ter, 2002-01-22 às 10:57, Jonathan James escreveu:
Yes, that can be done currently with 1.0 or 1.0.1 using the multibox tag.
Look through the archive and at the docs for multibox. If you still need
more help, let us know.
I mentioned the checkbox as an example. There aro other forms
-Original Message-
From: Marcus Brito [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 22 januari 2002 11:57
To: Struts Users Mailing List
Subject: Indexed Properties
Hello, folks. I'm currently using Struts 1.0.1 and was wondering if
there is a way to use indexed properties in
Is table[5].minimumSales the tag's name or its property property?...
Have you tried the nested extension for doing this stuff?...
Arron.
TODD HARNEY wrote:
If I have a html:text field on my form with the property named table[5].minimumSales,
wouldn't this result in:
1) A
Is the indexed feature supported in 1.0.1 ? don't think so... not sure.
Use the nightly builds.
Struts Users Mailing List [EMAIL PROTECTED] wrote:
If I have a html:text field on my form with the property named table[5].min
imumSales,
Yep, just posted link to it earlier...see
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html
hth,
Dave
Torsten Trzeciak [EMAIL PROTECTED] on 10/05/2001
01:22:20 PM
Please respond to [EMAIL PROTECTED]
To: struts struts [EMAIL PROTECTED]
cc:(bcc: David
Hi Marcel,
Unfortunately using the indexed tags you cannot currently use nested properties.
This is on my todo list, but I just got back from vacation and may take a while.
Solution with scriptlets was posted a while back, I believe,
Cheers,
Dave
Marcel Maré [EMAIL PROTECTED] on
Is the indexed property a non-standard struts patch / extension I have
to
use?
Thanks
Nathan
It is non-standard (for Struts 1.0 anyway). Have a look at
http://husted.com/about/struts/indexed-tags.htm
Best regards,
Mark Mahieu
At 02:23 PM 7/25/2001 -0400, you wrote:
Nathan,
Hi. Currently you have to use my changed tags...but it looks like they
will be
in the nightly build by the end of the week.
You can get them at http://husted.com/about/struts/indexed-tags.htm, and I
attached some example source code to a
At 05:20 PM 7/25/2001 -0400, you wrote:
Hi James,
Thanks for your note - made me think a bit!
Would be interested in knowing more about the other indexed tags that were
posted and you are using. I know either Jeff Trent or Martin Cooper had
produced some tags which had a different name ie
Cameron,
Does the Action that is run when you submit the form have CourseList
associated with it?
If that sorts out the issue with not finding CourseList then I think
CourseList should look like this:
public final class CourseList extends ActionForm
{
private ArrayList courseList = new
Pemberton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 11:10 AM
Subject: RE: indexed properties
Cameron,
Does the Action that is run when you submit the form have CourseList
associated with it?
If that sorts out the issue with not finding CourseList then I think
Niall-
Thanks i got the CourseList to work.
Cameron
- Original Message -
From: Niall Pemberton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 11:10 AM
Subject: RE: indexed properties
Cameron,
Does the Action that is run when you submit the form have
The problem is that your getUsers() return an array of User instances while
your getUsers(int i) returns a String.
As a result the PropertyDescriptor class for the users property will
consider the User class as the type of your property, and will check the
existence of User getUsers(int i) and
Jason,
I believe you need a
public User getUser(int index)
{
return (users[i]);
}
For the examples I sent you, I have the following form:
public final class ParametersForm extends ActionForm
{
// --- Instance
Is this all in one class? It shouldn't even compile
if you have getUsers() returning two different types.
Here is a snippet on using an array.
public User getUser(int index) {
return user[index];
}
public void setUser(int index, User user) {
this.user[index] = user;
}
Then you
that did the trick.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 9:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Indexed Properties
Jason,
I believe you need a
public User getUser(int index)
{
return (users[i
87 matches
Mail list logo