I am trying to get an option transfer select control to work, but I'm
having difficulty getting the results back out of it.

It looks like the control passes values in the two lists back to the
server by selecting all items in each list and then letting the standard
form submission mechanism do its normal job of passing all selected
items, but the select-all code does not appear to run (according to
FireBug).

Here's the section of code that Struts2 inserted (the line numbers are
from FireBug):

311<script type="text/javascript">
312 var containingForm = document.getElementById("update");
313 StrutsUtils.addEventListener(containingForm, "submit",
314 function(evt) {
315 var selectObj = document.getElementById("update_");
316 selectAllOptionsExceptSome(selectObj, "key", "");
317 }, true);
318 var containingForm = document.getElementById("update");
319 StrutsUtils.addEventListener(containingForm, "submit",
320 function(evt) {
321 var selectObj = document.getElementById("update_chosenColumns");
322 selectAllOptionsExceptSome(selectObj, "key", "");
323 }, true);
324
325
326</script>

I'm not interested in the left list (as is shown by line 315; I'm not
setting listName, so it just has the form name there and doesn't end up
getting used). But I am interested in the right list (line 321).

The form submit event listener seems to register (at least,
StrutsUtils.addEventListener() executes), but when I submit the form,
the event listener does not actually run and select the list items. As a
result, the chosen values are not passed back to the server.

Has anyone else gotten this control to work? Is there any property I
might be missing?

Browser is Firefox 3, using FireBug to investigate.
        

Jonathan P. Pearson - Software Engineer
-------------------------------------------------- 
SIXNET - Solutions for Your Industrial Networking Challenges
331 Ushers Road, Ballston Lake, NY 12019
Tel: 1.518.877.5173, Fax: 1.518.877.8346
www.sixnet.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to