struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan" <j...@aber.ac.uk>
Subject Iterate + indexed property arghhh....
Date Tue, 04 Mar 2003 00:57:59 GMT
Hello,
 
I wonder whether somebody can help, I'm using the logic iterate tag to
loop through a number
of items producing a delete button for each of the items.  When the
delete button is
clicked I want to delete that particular item.  Using the below:
 
<html:submit indexed='true'  onclick="return confirm('Confirm
Delete?');"  property='action'>
<bean:message key="questionoption.button.delete"/>

</html:submit>  
 
I produce a list of buttons which SHOULD appear like follows:
 
<input type="submit" name="action[0]" value="Delete">                
<input type="submit" name="action[1]" value="Delete">                
<input type="submit" name="action[2]" value="Delete">                
 
but instead the name appears like this:
 
<input type="submit" name="action"[0]  value="Delete">               
 
With [0] being outside the bracket.
 
Can anybody tell me why this is?  Does it make a difference if I use '
to enclose the values
or whether I use " to enclose the values.  It would seem that it does so
does anybody know
the EXACT syntax for specifying a HTML submit button?  Should I be using
a nested:submit
component?  Does that really make any difference?
 
Also on the server side how would I catch which button has been pressed?
I can't use:
 
String action = (String)request.getParameter("action");
 
Because the index causes a problem,
 
Many thanks in advance for any help or tips you can provide me with,
this seems to be the last
part of my problems.
 
Jon.
 
*---------------------------------------------*
 Jonathan Holloway,               
 Dept. Of Computer Science,       
 Aberystwyth University, 
 Ceredigion,                      
 West Wales,                      
 SY23 3DV.                        
                                  
 07968 902140                     
 http://users.aber.ac.uk/jph8     
*---------------------------------------------*
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message