This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes help w.r.t to layout:collectionInput Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "help w.r.t to layout:collectionInput" Watch "help w.r.t to layout:collectionInput" New topic
Author

help w.r.t to layout:collectionInput

rahul vasishta
Greenhorn

Joined: Sep 22, 2009
Posts: 7
Hi all,

How to validate input values of the layout:collectionInput using javascript? Or is there some other way of doing it?

<layout:collectionInput title="Email" property="mailID" formProperty="list[${index}].mailID"/>


Now in this case how to validate the input values provided for the E-mail?

-Rahul
rahul vasishta
Greenhorn

Joined: Sep 22, 2009
Posts: 7
can it be done by iterating through layout:collection ?

//something like
for (var i = 0; i <= <numberOfElements>; i++) {
window.document.getElementById(<mailID>+i).value;
}


If so how to iterate and acess elements of layout:collection using javascript?


Thanks in advance,

Rahul
 
Don't get me started about those stupid light bulbs.
 
subject: help w.r.t to layout:collectionInput