Re: Dynamic Text Boxes - Urgent .Pl help - Struts

2003-10-28 Thread Ted Husted
You can define an Array to catch multiple parameters of the same name.

http://husted.com/struts/tips/006.html

HTH, Ted.

[name withheld] wrote:
Hi Husted,
 
 
I Have  a Struts  jsp with with  some Dynamic text boxes.  I have 
array list that contain  data for these text boxes.I put this List in 
the request object in the action class.
 Here The problem is all text boxes names are same.
 
Example java code.
For (i=0;ilist.size ;i++)
{
input type =text name = chargeCode value =list.code 
}
 
Actually I am doing this one by struts and Jstl for each.
Here Text field name is same for all. How Can I create those many 
setter/Getter methods without knowing.
Please let me know How to handle this with Jsp - form bean.
 
I really appriciate your help.
 
Thanks,


--
Ted Husted,
  Junit in Action  - http://www.manning.com/massol/,
  Struts in Action - http://husted.com/struts/book.html,
  JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: dynamic text boxes - with checkboxes?

2003-05-31 Thread Lynn Guy
Does this work with checkboxes or is there a problem
due to the checkbox not sending anything if not
checked?


--- Mark Galbreath [EMAIL PROTECTED] wrote:
 You can name the textboxes dynamically using the
 logic:iterate
 indexId=xxx attribute:
  
 logic:iterate name=myBean property=property
 index=index id=id
 html:text property=% out.println( index ) %
 value= /
 /logic:iterate
  
 In you Action class request.getParameterNames will
 return an array like
  
 names[ 0, 1, 2, ...]
  
 and you can access each field by the String name or
 element position.
  
 Mark
 
 -Original Message-
 From: Nagendra Kumar O V S
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 29, 2003 11:33 AM
 To: [EMAIL PROTECTED]
 Subject: RE: dynamic text boxes
 
 
 
 hello mark,
 but, i cant use html:text property=/ , becos i
 cant map them in the
 action form
 i want this property also be dynamic and also get
 the value in the action
 form, can be thro' request.getParameter...
 how can i override the struts behaviour of not
 checking the corresponding
 get/set method of the property while rendering the
 html:text. or is their
 anyway.
  
 TIA
  
 ---Original Message---
  
 From: Struts Users Mailing 
 mailto:[EMAIL PROTECTED] List
 Date: Thursday, May 29, 2003 08:52:09 PM
 To: 'Struts Users Mailing 
 mailto:[EMAIL PROTECTED] List';
 'Nagendra Kumar O V  mailto:[EMAIL PROTECTED] S'
 Subject: RE: dynamic text boxes
  
 Use logic:iterate to create the text boxes and
 request.getParamaterNames()
 in your Action.
 
 Mark
 
 -Original Message-
 From: Nagendra Kumar O V S
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 29, 2003 10:53 AM
 To: [EMAIL PROTECTED]
 Subject: dynamic text boxes
 
 
 
 
 hi,
 i need to display n number of textboxes on the jsp,
 the number which is
 known only at runtime.
 now how do i map those text boxes to the action
 form.
 i can't use a array , becos i need to retreive them
 with the unique id..
 
 any ideas.
 TIA
 -nagi
 Nagendra Kumar O V S
 Member Technical Staff
 Ikigo India Private Ltd.
 470-B, Road No. 36,
 Jubilee Hills,
 Hyderabad 500033
 Contact(O): 23544671
 Cell: 98482-41789
 
 
 
 http://www.incredimail.com/redir.asp?ad_id=309

http://www.incredimail.com/redir.asp?ad_id=309lang=9
 lang=9 IncrediMail
 -
 Email has finally evolved -
 http://www.incredimail.com/redir.asp?ad_id=309

http://www.incredimail.com/redir.asp?ad_id=309lang=9
 lang=9 Click Here 
 
 
 
 
   
 
 

http://www.incredimail.com/redir.asp?ad_id=309lang=9
   IncrediMail -
 Email has finally evolved -

http://www.incredimail.com/redir.asp?ad_id=309lang=9
 Click Here 
 
 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: dynamic text boxes

2003-05-30 Thread Mark Galbreath
Use logic:iterate to create the text boxes and request.getParamaterNames()
in your Action.
 
Mark

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2003 10:53 AM
To: [EMAIL PROTECTED]
Subject: dynamic text boxes



 
hi,
i need todisplay n number of textboxes on the jsp, the number which is
known only at runtime.
now how do i map those text boxes to the action form.
i can't use a array , becos i need to retreive them with the unique id..
 
any ideas.
TIA
-nagi
Nagendra Kumar O V S
Member Technical Staff
Ikigo India Private Ltd.
470-B, Road No. 36,
Jubilee Hills,
Hyderabad 500033
Contact(O): 23544671
Cell: 98482-41789



 http://www.incredimail.com/redir.asp?ad_id=309lang=9   IncrediMail -
Email has finally evolved -
http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here 



RE: dynamic text boxes

2003-05-30 Thread Nagendra Kumar O V S








  hello mark,
  but, i cant use html:text property=""/ , becos i cant map 
  them in the action form
  i want this property also be dynamic and also get the value in the 
  action form, can be thro' request.getParameter...
  how can i override the struts behaviour of not checking the 
  corresponding get/set method of the property while rendering the 
  html:text. or is their anyway.
  
  TIA
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Thursday, May 29, 
  2003 08:52:09 PM
  To: 'Struts Users Mailing 
  List'; 'Nagendra Kumar O V 
  S'
  Subject: RE: dynamic 
  text boxes
  Use logic:iterate to create the text boxes and 
  request.getParamaterNames()in your 
  Action.Mark-Original Message-From: Nagendra 
  Kumar O V S [mailto:[EMAIL PROTECTED]] Sent: 
  Thursday, May 29, 2003 10:53 AMTo: [EMAIL PROTECTED]Subject: 
  dynamic text boxeshi,i need to display n number of 
  textboxes on the jsp, the number which isknown only at runtime.now 
  how do i map those text boxes to the action form.i can't use a array , 
  becos i need to retreive them with the unique id..any 
  ideas.TIA-nagiNagendra Kumar O V SMember Technical 
  StaffIkigo India Private Ltd.470-B, Road No. 36,Jubilee 
  Hills,Hyderabad 500033Contact(O): 23544671Cell: 
  98482-41789http://www.incredimail.com/redir.asp?ad_id=309lang=9 
  IncrediMail -Email has finally evolved -http://www.incredimail.com/redir.asp?ad_id=309lang=9 
  Click Here 





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



RE: dynamic text boxes

2003-05-30 Thread Mark Galbreath
You can name the textboxes dynamically using the logic:iterate
indexId=xxx attribute:
 
logic:iterate name=myBean property=property index=index id=id
html:text property=% out.println( index ) % value= /
/logic:iterate
 
In you Action class request.getParameterNames will return an array like
 
names[ 0, 1, 2, ...]
 
and you can access each field by the String name or element position.
 
Mark

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2003 11:33 AM
To: [EMAIL PROTECTED]
Subject: RE: dynamic text boxes



hello mark,
but, i cant use html:text property=/ , becos i cant map them in the
action form
i want this property also be dynamic and also get the value in the action
form, can be thro' request.getParameter...
how can i override the struts behaviour of not checking the corresponding
get/set method of the property while rendering the html:text. or is their
anyway.
 
TIA
 
---Original Message---
 
From: Struts Users Mailing  mailto:[EMAIL PROTECTED] List
Date: Thursday, May 29, 2003 08:52:09 PM
To: 'Struts Users Mailing  mailto:[EMAIL PROTECTED] List';
'Nagendra Kumar O V  mailto:[EMAIL PROTECTED] S'
Subject: RE: dynamic text boxes
 
Use logic:iterate to create the text boxes and request.getParamaterNames()
in your Action.

Mark

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2003 10:53 AM
To: [EMAIL PROTECTED]
Subject: dynamic text boxes




hi,
i need to display n number of textboxes on the jsp, the number which is
known only at runtime.
now how do i map those text boxes to the action form.
i can't use a array , becos i need to retreive them with the unique id..

any ideas.
TIA
-nagi
Nagendra Kumar O V S
Member Technical Staff
Ikigo India Private Ltd.
470-B, Road No. 36,
Jubilee Hills,
Hyderabad 500033
Contact(O): 23544671
Cell: 98482-41789



http://www.incredimail.com/redir.asp?ad_id=309
http://www.incredimail.com/redir.asp?ad_id=309lang=9 lang=9 IncrediMail
-
Email has finally evolved -
http://www.incredimail.com/redir.asp?ad_id=309
http://www.incredimail.com/redir.asp?ad_id=309lang=9 lang=9 Click Here 






 http://www.incredimail.com/redir.asp?ad_id=309lang=9   IncrediMail -
Email has finally evolved -
http://www.incredimail.com/redir.asp?ad_id=309lang=9 Click Here