Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

STRUTS - Action form doesn't set for array

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Guys,
This is eating my time. In my HTML form, I have fields by a same name like 'event' like following:

=====================================================
<html:hidden name="resultsForm" property="event"/>
<td><html:submit styleClass="buttonTextSmall" property="event" value="Submit"/></td>
<td><html:submit styleClass="buttonTextSmall" property="event" value="Clear"/></td>
===========================================

When I submit the form on following(when using drop-down only) doens't set 'event' attribute on action form :
===============================
<html:select styleId="C2" styleClass="inputCell" property="criteria2" onchange="return c2change(this.form);">
<html ptions collection="criteriaList" property="value"
labelProperty="label" /></html:select>
===============================

javascript call from above is:
===============================
function c2change(form)
{
var slctdVal = document.getElementById("C1").value;
form.event.value = "Redraw";
form.submit();
return true;

}
===============================

I think the problem is due to Request object considering as field arrays.

As we know, But same thing works on button, when i click submitting correct button value into action form attribute 'event'.

What is the best alternative in approaching solution to this? BUT having 'EVENT' as the field only for all fields.

thanks for your time in advance.
[ December 03, 2005: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not waste our time by cross-posting the same question in multiple forums.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic