You just need a collection/map getter/setter in the action, you don't
need an indexed setter.
http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-CollectionandMapSupport
Dave
Ignacio de Córdoba wrote:
Hi there,
I am trying to migrate a form population module from struts1 to
behind.
Feel free to write for any doubt..
Raghuveer
-Original Message-
From: nagesh.kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, January 29, 2007 2:57 PM
To: [EMAIL PROTECTED]
Subject: RE: Indexed Properties with nested Tags
Hi raghu,
Iam also using the same issue ..
Ho u r
Just think If the struts dosen't set these indexed properties from the lower
bound to the upper bound in a ascending order, an outofbound exception
will occur.
--
Wong Tseng
王曾
I think it's the getResultsPage method that causes your problem. If the
results is none, and the parameter index equels any value that is large than
0, an OutOfBound Exception will occur.
2006/11/18, Adam K <[EMAIL PROTECTED]>:
public Product getResultsPage(int index)
{
if(this
and succeeded.
> >
> > Nested Tags is the real power of Struts...
> >
> >
> > Regards
> > Raghu
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Adam K [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, Nove
ceeded.
>
> Nested Tags is the real power of Struts...
>
>
> Regards
> Raghu
>
>
>
>
>
> -Original Message-
> From: Adam K [mailto:[EMAIL PROTECTED]
> Sent: Saturday, November 18, 2006 2:55 AM
> To: Struts Users Mailing List
> Subject: Re: Indexed P
rsday, November 23, 2006 9:47 AM
To: 'Adam K'
Cc: 'Struts Users Mailing List'
Subject: RE: Indexed Properties with nested Tags
I am 100% sure.
I have extensively used these futures and successful.
Using Nested Tags will decrease the Lines of Code,Easy Maintenance..
P
is submitted you will have latest data in arlResults collection in
actionform.
Regards,
Raghu
-Original Message-
From: Adam K [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 22, 2006 10:16 PM
To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: Indexed Prope
Alright, I guess I should have thought that. I was worried that my
fundamental understanding for this was wrong. For debugging I am putting my
information into a String which is not being iterated (it for some reason
always works, but those that are iterated over don't for some reason.
I have no
From: Adam K [mailto:[EMAIL PROTECTED]
> What is the purpose of the System.out.println that you have at the end
> of your action ?
Debugging?
Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
);
> obj1.setNumProducts (2);
>
> ArrayList arlResults=new ArrayList ();
> arlResults.add(obj1);
> arlResults.add(obj2);
>
> prodSelectionForm.setResults(arlResults);
>
> *Action Class (Submitting the page)*
>
> When you submit the page just print the actionform
ystem.out.println("prodSelectionForm="+prodSelectionForm);
Regards
Raghu
-Original Message-
*From:* Adam K [mailto:[EMAIL PROTECTED]
*Sent:* Wednesday, November 22, 2006 3:06 AM
*To:* [EMAIL PROTECTED]
*Cc:* Struts Users Mailing List
*Subject:* Re: Indexed Properties
If you might
Regards
Raghu
-Original Message-
From: Adam K [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 22, 2006 3:06 AM
To: [EMAIL PROTECTED]
Cc: Struts Users Mailing List
Subject: Re: Indexed Properties
If you might be able to provide a sample I would be very greatful.
As it stan
ted Tags is the real power of Struts...
Regards
Raghu
-Original Message-
From: Adam K [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 18, 2006 2:55 AM
To: Struts Users Mailing List
Subject: Re: Indexed Properties
Thanks for the suggestion I'll keep trying things and see what I
[mailto:[EMAIL PROTECTED]
Sent: Saturday, November 18, 2006 2:55 AM
To: Struts Users Mailing List
Subject: Re: Indexed Properties
Thanks for the suggestion I'll keep trying things and see what I can get
from it.
On 11/17/06, Hubert Rabago <[EMAIL PROTECTED]> wrote:
>
> Lots of peopl
Thanks for the suggestion I'll keep trying things and see what I can get
from it.
On 11/17/06, Hubert Rabago <[EMAIL PROTECTED]> wrote:
Lots of people have done it. Search the archives [1]. Search for
"indexed" and "lazyList". I've done it with both ActionForm and
DynaActionForm.
Hubert
[
Lots of people have done it. Search the archives [1]. Search for
"indexed" and "lazyList". I've done it with both ActionForm and
DynaActionForm.
Hubert
[1] http://struts.apache.org/mail.html
On 11/17/06, Adam K <[EMAIL PROTECTED]> wrote:
I think I have found the problem - or at least a pote
I think I have found the problem - or at least a potential cause. Would it
be correct in stating that this will not work using ActionForm (what I was
using) and that I must instead use DynaActionForm ?
Thanks for the time thus far.
On 11/17/06, Hubert Rabago <[EMAIL PROTECTED]> wrote:
Adam,
Adam,
Try adding a getResultsPage() that doesn't take params and always
returns a valid collection. (Throw in the setResultsPage() that
accepts a collection as well.)
Hubert
On 11/17/06, Adam K <[EMAIL PROTECTED]> wrote:
This has been driving me nuts for the past little bit.
I have a page tha
Hi to all i have two questions...
First question... is possible to remove spring dependecies in struts2 or
spring stuff (jars, applicationContext.xml and ContextLoadListener) are
neccesary to run struts2
Second question or advise... i want to give a try to ajax, i want some parts
of me site to
The trick is normally to name the "id" used in the to
the same name as the property for your "list of product" in your
ActionForm (i.e. newProducts in your example):
Which should then produce the html you're expecting:
Niall
On 10/23/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote:
Hi,
Hi Yadav,
have a look at below link u'll find something of ur intrest ...
http://www.developer.com/java/ejb/article.php/2233591
http://www.developer.com/java/ejb/article.php/10931_3321521_1
Thanks & Regards,
Aftab Vhora
Barun Kumar Yadav wrote:
Hi
I'm using Indexed Properties with Struts
Hi Puneet,
When I re-read your original mail I notice you use DHTML to add rows, so
my approach/thoughts may not be appropriate for you.
I use DynaForms with ArrayLists of objects. In the form I use the
logic:iterate with indexed=true on the html tags. If I need to
"dynamically" add another row
On 9/21/06, Niall Pemberton <[EMAIL PROTECTED]> wrote:
As you found out there is no way of knowing the order the
browser/client will submit request parameters, so if you want to use
indexed properties in this way you need to "grow" the list to
accomodate the size of the indexed property being se
On 9/21/06, Strachan, Paul <[EMAIL PROTECTED]> wrote:
A List is an ordered collection so it doesnt make sense that the order
changes. Also, depending on which Map implementation you use ordering may
not be guaranteed.
I would basically have the index in case of indexed properties as my key.
A List is an ordered collection so it doesnt make sense that the order changes.
Also, depending on which Map implementation you use ordering may not be
guaranteed. I frequently use indexed properties with List and have not
experienced this problem. You may need to check the generated html sou
As you found out there is no way of knowing the order the
browser/client will submit request parameters, so if you want to use
indexed properties in this way you need to "grow" the list to
accomodate the size of the indexed property being set.
So you could do something like the following:
publi
Ad you have a list of checkboxes,its better to use multi box and try to reduce
javascript code
Harikrishna
"Vidya (Suvarna) Mahavadi" <[EMAIL PROTECTED]> wrote:
I wonder why there are no responses today..
Guys, I really need help on this.. Any expert views?
-Original Message-
From:
I wonder why there are no responses today..
Guys, I really need help on this.. Any expert views?
-Original Message-
From: Vidya (Suvarna) Mahavadi [mailto:[EMAIL PROTECTED]
Sent: Monday 15 May 2006 11:42
To: Struts Users Mailing List
Subject: Indexed Properties
Hi everyone!
I am ha
No one??
[EMAIL PROTECTED]
11/15/2005 04:15 PM
Please respond to
"Struts Users Mailing List"
To
user@struts.apache.org
cc
Subject
indexed properties and validation
I've got a form with an indexed propety contained in an array list, with
values such as ssn. It has four accessor method
Matt Raible wrote the following on 5/8/2005 11:39 AM:
As an alternative, I suppose I could modify my Form -> POJO conversion
to detect Sets and properly convert List to Set.
Unfortunately I think this is what you are going to have to do Matt. I'd
keep the Set property in the form bean, but use t
2005 20:41
To: user@struts.apache.org
Subject: Re: Indexed Properties
Peter Wu gmail.com> writes:
>
> 0-19
> 20-49
> 50-
>
This one works fine now.
>
>
hour[i][j] does not work.
How to make a 2-dimensional array
Peter Wu gmail.com> writes:
>
> 0-19
> 20-49
> 50-
>
This one works fine now.
>
>
hour[i][j] does not work.
How to make a 2-dimensional array work with Struts? Thanks in advance!
Peter
-
Why is struts generating a days[10] when there are only 6 days in my
collection? Better still, why is the days index tied to the
employeeAppointments index?
<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bea
MAIL PROTECTED]>
Sent: Friday, November 19, 2004 2:31 PM
Subject: RE: Indexed properties
> > Could not get the wiki's example of
> >
> > public class SkillActionForm extends ActionForm {
> > protected List skills = new ArrayList
> Could not get the wiki's example of
>
> public class SkillActionForm extends ActionForm {
> protected List skills = new ArrayList();
>
> public List getSkills() {
> return skills;
> }
>
> public void setSkills(List skills) {
> this.skills = skills;
>
Could not get the wiki's example of
public class SkillActionForm extends ActionForm {
protected List skills = new ArrayList();
public List getSkills() {
return skills;
}
public void setSkills(List skills) {
this.skills = skills;
}
public S
I might be missunderstood your idea, but here you start navigate with JSP and then go to
the Action "/DisplayNestedPropertiesAction.do". You can set your checkbox in
two ways:
if you need to set up all checkboxes to false (or true, or fixed values) on the initialization of the ActionForm, you sho
levels of
> indexed beans to your hearts content.
>
> Niall
>
> - Original Message -
> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> Subject: Re: Indexed Properties and Lazy List behaviour
>
> > My understanding of the question on the user list
1...n levels of
indexed beans to your hearts content.
Niall
- Original Message -
From: "Hubert Rabago" <[EMAIL PROTECTED]>
Subject: Re: Indexed Properties and Lazy List behaviour
> My understanding of the question on the user list was for a form which
> contained an
n interacts with FormDef - hence my questions at the
> top.
>
> Sorry, should have got round to giving FormDef a go - but lifes busy :-(
>
> Niall
>
>
>
> - Original Message -
> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> To: "Struts
Original Message -
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 01, 2004 9:43 PM
Subject: Re: Indexed Properties and Lazy List behaviour
> But if I need it to be a DynaActionForm subclas
"Hubert Rabago" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, October 01, 2004 8:07 PM
> Subject: Re: Indexed Properties and Lazy List behaviour
>
> > In 2.3 of StrutsCatalogLazyList, it uses
MAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 01, 2004 8:07 PM
Subject: Re: Indexed Properties and Lazy List behaviour
> In 2.3 of StrutsCatalogLazyList, it uses a Lazy*Form flavor to hold an
> indexed property. Can the in
In 2.3 of StrutsCatalogLazyList, it uses a Lazy*Form flavor to hold an
indexed property. Can the indexed property itself an array or list of
Lazy*Form objects?
On Fri, 1 Oct 2004 00:17:40 +0100, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> I've set up this wiki page showing how to use indexed
Your other solutions are awesome. I use the "hand crank..." one since I
didn't know of the lazylist at the time. The code looks right.
Thanks for posting the other "lazy" solutions, I'll try them in the
future.
Regards...djsuarez
-Original Message-
From: Niall Pemberton [mailto:[EMAIL
The best thing to do, in my humble opinion, is to chase the code down
back through to commons beanutils and like classes in Struts. Then you
will see what is not documented and will know how you can change things
if you want or extend and change things if you want more in a tag.
Michael
Lynn S
-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: 12. elokuuta 2004 18:48
To: Struts Users Mailing List
Subject: RE: Indexed properties and DynaActionForm
> -Original Message-
> From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> Sent: Thursday,
> -Original Message-
> From: Jaakko Rytinki [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 12, 2004 3:05 AM
> To: 'Struts Users Mailing List'
> Subject: Indexed properties and DynaActionForm
>
>
> Could someone explain why the following does not work:
>
> - - - - Form bean:
> type
Wayne
-Original Message-
From: Glenn, Scott [mailto:[EMAIL PROTECTED]
Sent: Friday, April 30, 2004 11:10 AM
To: 'Struts Users Mailing List'
Subject: RE: Indexed properties working formbean->htmlform, not working
htmlform->formbean
I think the id attribute on the iterate tag m
I think the id attribute on the iterate tag must match the getter on the
"get row (index)" method of your form bean. For example I have:-
and my form bean is:-
private List rows = null;
public FormRow getRows (int index)
{
return (RenamePD
I don't think this is there. Not sure about the nightly builds.
sandeep
-Original Message-
From: Amin Lalji [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 5:16 PM
To: 'Struts Users Mailing List'
Subject: Indexed Properties DynaValidatorForm
I am trying to use a DynaValidatorFor
52 matches
Mail list logo