Advertisement

02.26.2008 at 04:25AM PST, ID: 23193237
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

How to identify a checkbox while using it in <logic:iterate> tag in a jsp  [ Not in action class ]..?

Tags: java script ,  jsp
HI ,
             I have a strange and clever problem in my jsp.?
Description -
I have a set of objects in a arraylist. Each object has two feilds like siteCode and siteName  in it.
I'm iterating this arraylist in the jsp using logic:iterate tag. I have a check box in the logic:iterate tag.
The property assigned to this checkbox is the "code" [which is retrieved from the arraylist -> objects]
The problem is -
When I select the checkbox, I need the value of the checkbox which is retrieved from the object present in the arraylist..?
I need it to be done in the jsp but not in the action class.

Appreciate your help..!

Thnkx.,
Sirish
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
<logic:present name="FSTMassRestartForm" property="massRestartCount">
<logic:iterate id="idMassRestartCount" name="FSTMassRestartForm" property="massRestartCount" indexId="idx" >
   						
	 <TR class="rowDetailAlign">
            <TD align="center" width = "18%" >
<P><FONT class="resultDetailText"><bean:write name="idMassRestartCount" property="siteName"/>
            </TD>
	<TD align="center" width = "18%" >
<html:checkbox name="idMassRestartCount"  property="siteCode"  indexed="true" onclick="setSiteCd(this)" />
     	 </TD >
</logic:iterate>
</logic:present>
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: Sirish_Nukala
Solution Provided By: cmalakar
Participating Experts: 1
Solution Grade: B
Views: 28
Translate:
Loading Advertisement...
02.26.2008 at 06:39AM PST, ID: 20984623

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 08:22PM PST, ID: 20991342

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 08:37PM PST, ID: 20991398

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 08:47PM PST, ID: 20991434

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 09:19PM PST, ID: 20991549

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 09:35PM PST, ID: 20991628

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 09:48PM PST, ID: 20991682

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 10:00PM PST, ID: 20991715

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 10:33PM PST, ID: 20991849

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 10:42PM PST, ID: 20991889

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 10:48PM PST, ID: 20991912

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 10:52PM PST, ID: 20991924

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 11:10PM PST, ID: 20991961

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 11:21PM PST, ID: 20992011

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
02.26.2008 at 06:39AM PST, ID: 20984623
You mean to say, you want to retrieve the value of the check box in the jsp...

If so, you can use request.getParameter("idMassRestartCount");
 
02.26.2008 at 08:22PM PST, ID: 20991342
Thankx cmalakar,
My problem here is to retrieve the value of checkbox when it is checked.

<html:checkbox name="idMassRestartCount"  property="siteCode"  indexed="true" onclick="setSiteCd( ** Value of site code to be passed here **)" />

Detail explanation -
Here the "idMassRestartCount" has a object which is iterated through the arraylist "massRestartCount" using logic:iterate tag.

So for the first iteration the "massRestartCount" is iterated and the check box has the value "001"
For the ssecond iteration the "massRestartCount" is iterated and the check box has the value "002"

So here the same checkbox is iterated twice and has two different values assigned to it.I want to retrieve the value of the particular check box when I select or click it..?
For say I have clicked second check box the value "002" should be passed.
 
02.26.2008 at 08:37PM PST, ID: 20991398
>> For say I have clicked second check box the value "002" should be passed.

Where it should be passed, in the request from browser.. ?
 
02.26.2008 at 08:47PM PST, ID: 20991434
The value of the checkbox should be passed to javascript through setSiteCd() method which is triggered
when the checkbox is selected..
 
02.26.2008 at 09:19PM PST, ID: 20991549
You should write like..

onclick=setSiteCd('<bean:write name ="idMassRestartCount" property="siteCode"/>')
 
02.26.2008 at 09:35PM PST, ID: 20991628
Hi cmalakar.,
I have tried your solution. I'm getting the following error -

Error 500: ServletException in '/public/jsp/body_MassRestart.jsp': /public/jsp/body_MassRestart.jsp(258,147) Attribute idMassRestartCount has no value.
 
02.26.2008 at 09:48PM PST, ID: 20991682
How come... ?

You are using the same.. but different attribute..

<bean:write name="idMassRestartCount" property="siteName"/>

in the first td..

Have you put proper quotes..
 
02.26.2008 at 10:00PM PST, ID: 20991715
Hi cmalakar.,

                    I have given my code snippet below. Please check that.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
JSP:-
 
<logic:present name="FSTMassRestartForm" property="massRestartCount">
<logic:iterate id="idMassRestartCount" name="FSTMassRestartForm" property="massRestartCount" indexId="idx" >
   						
      		 <TR class="rowDetailAlign">
                   <TD align="center" width = "18%" >
<P><FONT class="resultDetailText">
<bean:write name="idMassRestartCount" property="siteName"/>
                   </TD>
	          <TD align="center" width = "18%" >
<html:checkbox   property="siteCodeCheckBox"  indexed="true" onclick="setSiteCd('<bean:write name ="idMassRestartCount" property="siteCodeCheckBox"/>')"  />
		 </TD >
                   <TD align="center" width = "18%" FACE="Arial,Helvetica,Geneva,Sans-serif,sans-serif" >
<A HREF="javaScript:fileDetails('<bean:write name="idMassRestartCount" property="siteCodeCheckBox"/>','<bean:write name="idMassRestartCount" property="suspendedSystemErrorCheckBox"/>');">
<P><FONT class="resultDetailText"><bean:write name="idMassRestartCount" property="suspendedErrorCount"/>
	              </A></TD>
                      <TD align="center" width = "18%" >
<A HREF="javaScript:fileDetails('<bean:write name="idMassRestartCount" property="siteCodeCheckBox"/>','<bean:write name="idMassRestartCount" property="failedFileFlowStepCheckBox"/>');">
<P><FONT class="resultDetailText"><bean:write name="idMassRestartCount" property="failedFileFlowStepsErrorCount"/>
	             </A></TD>
  	             <TD align="center" width = "18%" >
<A HREF="javaScript:fileDetails('<bean:write name="idMassRestartCount" property="siteCodeCheckBox"/>','<bean:write name="idMassRestartCount" property="suspendedProfileError"/>');">
<P><FONT class="resultDetailText"><bean:write name="idMassRestartCount" property="profileSetUpErrorCount"/>
 	            </A></TD>
	            <TD align="center" width = "20%" >
<P><FONT class="resultDetailText"><bean:write name="idMassRestartCount" property="status"/>
	            </TD>
 	            </TR>
</logic:iterate>
</logic:present>
 
***********************************************************************
 
FORM BEAN :-
 
private ArrayList massRestartCount = null;	
private MassRestartOutputJavabean idMassRestartCount  = null;
 
MassRestartOutputJavabean :-
 
	private String siteCD = null;
	private String siteNM = null;
Open in New Window
 
02.26.2008 at 10:33PM PST, ID: 20991849
What kind of objects are present in massRestartCount arrayList..

What are fields present in the Objects of massRestartCount?
 
02.26.2008 at 10:42PM PST, ID: 20991889
massRestartCount arrayList has the MassRestartOutputJavabean objects.

MassRestartOutputJavabean has two feilds namely siteCd and siteName.
 
02.26.2008 at 10:48PM PST, ID: 20991912
Then what are these fields.. ?

status, failedFileFlowStepCheckBox, suspendedSystemErrorCheckBox, siteCodeCheckBox, suspendedProfileError,

These should be the fields of MassRestartOutputJavabean , because we are referrering that.. !
 
02.26.2008 at 10:52PM PST, ID: 20991924
Please ignore them..,

Assume that MassRestartOutputJavabean has siteCd and siteName only.
To make the explanation simpler I have used only two attributes here. :-)
 
02.26.2008 at 11:10PM PST, ID: 20991961
I think, nested double quotes in your file is causing the problem..

Escape the nested double quotes.. or remove them where not necessary..

 
02.26.2008 at 11:21PM PST, ID: 20992011
If your code was working properly before adding

onclick="setSiteCd('<bean:write name ="idMassRestartCount" property="siteCode"/>')"

Then just try removing double quote for the "onclick" attribute.. ie.,

Change..

onclick="setSiteCd('<bean:write name ="idMassRestartCount" property="siteCodeCheckBox"/>')"

to

onclick=setSiteCd('<bean:write name ="idMassRestartCount" property="siteCodeCheckBox"/>')
Accepted Solution
 
 
03.11.2008 at 05:07AM PDT, ID: 21094847
Are they no one to help me here...!

Please give me a solution to this problem..
 
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628