Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 27th, 2006, 05:40 AM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to neeraj_sharma05
Default form submission of group of checkboxes of samename

Hi Minds,
hey i am stuck with a problem.i am using a group of checkboxes on my jsp page. each having different name...... now this group of checkboxes is
repeated number of times..
its like ....
<% for (int i=0; i<4; i++){
%>
<html:checkbox property="acct1" />
<html:checkbox property="acct2" />
<html:checkbox property="acct3" />
<html:checkbox property="acct4" />
<%}%>

now i have to submit this jsp to a form bean.....
in form bean i am using
String [] acct1;
String [] acct2;
String [] acct3;
String [] acct4;

Now problem is that when checked all four groups of checkboxes..
then length of all string array comes 4.....
but i randomly check and uncheck ..... lengths comes for only checked number....

then i tried giving <html:hidden property="acct1" /> for all...
in that case .....
for checked .... values come true and null
for unchecked values come null
but this doesn't solve my problem... because on check i want true value only in string array and not null additional....

please suggest how to submit correct data to form bean..........
u r only hope...........


 
Old November 13th, 2006, 07:31 AM
Authorized User
 
Join Date: Aug 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sachin.tathod
Default

U want to use boolean property in the form for the corresponding checkbox, then it is only possible to populate the form with the proper value.

Thanks and Regards,
SACHIN S.TATHOD
Patni Computer System Ltd.
Magarpatta City, Cyber City,
Tower 3,Level I & II,
Hadapsar,Pune - 411028
Mobile No:- +91-9881239401
Email ID:- [email protected]





Similar Threads
Thread Thread Starter Forum Replies Last Post
Building an Email Submission Form u2clone ASP.NET 2.0 Basics 2 February 11th, 2008 12:32 PM
form submission...help!? mdbrueckner ASP.NET 2.0 Basics 1 September 19th, 2007 06:16 PM
Simple Form Submission Maxood Beginning PHP 3 July 17th, 2004 06:03 AM
conditional form submission moushumi Classic ASP Basics 1 March 30th, 2004 08:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.