RE: JSTL and Multibox Submit Problem (SOLVED)

2004-05-25 Thread Ricardo Cortes
That makes sense.  I'm not sure why I didn't think of that.  I guess I was assuming 
the  would take care of the form submission since it was embedded in an 
.  So, I've added an onclick attribute to my  as follows and it 
worked just fine:

delete

Voila!  (It's the French Open this week.)

Thanks Richard.

-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 25, 2004 11:36 AM
To: Struts Users Mailing List
Subject: Re: JSTL and Multibox Submit Problem


Ricardo,
If you are going to use the html:link tag, then you
need to have it trigger a call to a JavaScript
function that will submit the form for you. Otherwise,
jjust clicking the link will not submit the form.

Regards,

Richard

--- Ricardo Cortes <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I am having a problem getting the checked values
> from a multibox that is submitted to my action and I
> was hoping one of you could help me out.  I followed
> Ted Husted's example of using a Multibox within an
> iteration but I have a feeling that my setup is a
> bit different and thus renders a different solution.
>  I'm using a JSTL forEach loop to loop through a
> list of MessageInstance objects.  I want the user to
> be able to check which MessageInstances should be
> deleted and the action to perform the deletion. 
> Everything gets rendered ok but when the form is
> submitted, the String[] object in the form is empty.
>  I should also note that everything works fine if I
> use an html:submit but when I try to use an
> html:link to do the submit I don't get any checked
> values in my String[] object.  I've included some
> code snippets below.  Any help would be awesome.
> 
> Thanks!
> Ricardo
> 
> JSP:
> ===
> 
>   Submit Link (inside ManageNotesForm):
>   
> 
> "java.util.HashMap"/>
> property="membername"
> value="${requestScope.membername}"/>
> property="task" value="delete"/>
> name="deleteNotesLink">delete
> 
>   forEach Loop (inside ManageNotesForm):
>   =
> 
>items="${sessionScope.messageInstances}"
> var="aMessageInstance" varStatus="status">
>property="selectedItems">
>   
>   
>   
>   
> 
> ManageNotesForm Bean:
> 
> 
> private String[] selectedItems = {};
> 
> public String[] getSelectedItems() {
> return selectedItems;
> }
> 
> public void setSelectedItems(String[]
> selectedItems) {
> this.selectedItems = selectedItems;
> }
> 
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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




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



Re: JSTL and Multibox Submit Problem

2004-05-25 Thread Richard Yee
Ricardo,
If you are going to use the html:link tag, then you
need to have it trigger a call to a JavaScript
function that will submit the form for you. Otherwise,
jjust clicking the link will not submit the form.

Regards,

Richard

--- Ricardo Cortes <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I am having a problem getting the checked values
> from a multibox that is submitted to my action and I
> was hoping one of you could help me out.  I followed
> Ted Husted's example of using a Multibox within an
> iteration but I have a feeling that my setup is a
> bit different and thus renders a different solution.
>  I'm using a JSTL forEach loop to loop through a
> list of MessageInstance objects.  I want the user to
> be able to check which MessageInstances should be
> deleted and the action to perform the deletion. 
> Everything gets rendered ok but when the form is
> submitted, the String[] object in the form is empty.
>  I should also note that everything works fine if I
> use an html:submit but when I try to use an
> html:link to do the submit I don't get any checked
> values in my String[] object.  I've included some
> code snippets below.  Any help would be awesome.
> 
> Thanks!
> Ricardo
> 
> JSP:
> ===
> 
>   Submit Link (inside ManageNotesForm):
>   
> 
> "java.util.HashMap"/>
> property="membername"
> value="${requestScope.membername}"/>
> property="task" value="delete"/>
> name="deleteNotesLink">delete
> 
>   forEach Loop (inside ManageNotesForm):
>   =
> 
>items="${sessionScope.messageInstances}"
> var="aMessageInstance" varStatus="status">
>property="selectedItems">
>   
>   
>   
>   
> 
> ManageNotesForm Bean:
> 
> 
> private String[] selectedItems = {};
> 
> public String[] getSelectedItems() {
> return selectedItems;
> }
> 
> public void setSelectedItems(String[]
> selectedItems) {
> this.selectedItems = selectedItems;
> }
> 
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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



JSTL and Multibox Submit Problem

2004-05-25 Thread Ricardo Cortes
Hi there,

I am having a problem getting the checked values from a multibox that is submitted to 
my action and I was hoping one of you could help me out.  I followed Ted Husted's 
example of using a Multibox within an iteration but I have a feeling that my setup is 
a bit different and thus renders a different solution.  I'm using a JSTL forEach loop 
to loop through a list of MessageInstance objects.  I want the user to be able to 
check which MessageInstances should be deleted and the action to perform the deletion. 
 Everything gets rendered ok but when the form is submitted, the String[] object in 
the form is empty.  I should also note that everything works fine if I use an 
html:submit but when I try to use an html:link to do the submit I don't get any 
checked values in my String[] object.  I've included some code snippets below.  Any 
help would be awesome.

Thanks!
Ricardo

JSP:
===

  Submit Link (inside ManageNotesForm):
  

   
   
   
   delete

  forEach Loop (inside ManageNotesForm):
  =

  




  

ManageNotesForm Bean:


private String[] selectedItems = {};

public String[] getSelectedItems() {
return selectedItems;
}

public void setSelectedItems(String[] selectedItems) {
this.selectedItems = selectedItems;
}





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