Hi,
I am new to the Struts2 and facing the similar issue ,
u said u have managed to get the data from the dynmically generated fields
to the action , can u share how it can be done...a sample will be of
great help...
my requirment is my form is dynamically generat the fileds for name
If you want to validate generated fields, i mean a Collection you can do
something like this.
* Action class
private List collection;
public void setCollection(String collection) {
this.collection = collection;
}
public String getCollection() {
I hope there exists a simpler solution, but here is my workaround: use an
expression validator.
This idea was taken from
http://www.opensymphony.com/webwork/wikidocs/collection%20validator.html
webwork wiki: collection validator (it seems that the collection validator
is not yet available in
@struts.apache.org
Asunto: Re: Struts2 Collection validation
I hope there exists a simpler solution, but here is my workaround: use an
expression validator.
This idea was taken from
http://www.opensymphony.com/webwork/wikidocs/collection%20validator.html
webwork wiki: collection validator (it seems
May I didn't explain myself correctly. What I would like to know is how to
validate multiple fields. I'll write an example. I have a form in a JSP which
generate the field dynamically. E.g:
s:form action=editPerson theme=simple validate=false
table
tr
thID/th
You may want to look at type conversion [1] and VisitorValidator [2]
to validate those form fields.
Also, please note that collection indexing is done with [square]
brackets, like in: persons[2].name
[1]
:19:05 -0300
From: [EMAIL PROTECTED]
To: user@struts.apache.org
Subject: Re: Struts2 Collection validation
You may want to look at type conversion [1] and VisitorValidator [2]
to validate those form fields.
Also, please note that collection indexing is done with [square]
brackets, like
7 matches
Mail list logo