My guess as to why it might not be good to name a form button "submit" is
that form elements can be referenced with formNode.formElementName, but
each form node already has a property named "submit" that references the
submit function. I guess the function would win, but I'm not sure.
-Ben
On Tue, Nov 29, 2011 at 11:29 PM, Nathan Robertson <nath...@nathanr.net>wrote:
> Hi Freddy,
>
> Thanks for the help. Further comments inline.
>
> On 30 November 2011 15:12, Freddy Daoud <xf2...@fastmail.fm> wrote:
> [...]
> > Not a big deal, but note that you can use just
> > beanclass="${actionBean.class}" in <s:form>.
>
> Noted. Thank you.
>
> [...]
> > I don't think this affects your code, but I would really
> > advise against using an event handler method named "submit".
> > I can't remember why exactly at the moment, but I remember that
> > it's a Really Bad Idea to have an HTML submit button named
> > submit.
>
> Noted. Thank you. I've got a fair bit of code that uses "submit()", so
> I'll be doing a fair bit of refactoring. :-)
>
>
> >> My experience when dealing with one dimensional arrays (changing
> >> answer[][] to answer1[], answer2[]) is that you get an array of
> >> answers propagated for you. eg. If you speak both English and French,
> >> you get answer2[] = {"1", "2"}; if you live in Australia you get
> >> answer1[] = {"1"}
> >>
> >> So, I would have thought that with the example I list the code for, if
> >> you live in Australia and speak English and French you should get
> >> answer[][] = {{}, {"1"}, {"1", "2"}} (my arrays are one indexed, so
> >> the zero index should be null or an empty array). Is this not the
> >> case?
> >
> > I would have thought so too. I'll admit I am surprised. I'm not sure
> > why it doesn't work, but I can tell you that if you change your
> > property to
> >
> > public List<List<String>> answer;
> >
> > you will get what you expect, i.e.
> >
> > answer = [null, [1], [1, 2]]
> >
> > I'm hoping you don't mind working with List<List<String>> instead of
> > String[][]..
>
> Making that one change solved the problem. List<List<String>> works
> perfectly, String[][] doesn't. So I'm guessing that's a bug? At least
> there's a workaround, and it's not a bad one.
>
> Thanks again for your help. Should I be opening a bug report for this one?
>
> Regards,
> Nathan.
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users