[s2] OGNL and javascript

2007-05-31 Thread Fowler, Perryn
Hi People, I usually like to access form elements using their names ( rather than ids) as I find it more readable. So, if I had a field named 'street' on a form named 'addressForm' I can access it using something like document.addressForm.street Now, I am using struts 2 and its OGNL support

Re: [s2] OGNL and javascript

2007-05-31 Thread Jeromy Evans
Interesting problem... Using textfield as an example, the template (eg. text.ftl) takes the literal name attribute from s:textfield and writes it straight to the html. You could create your own theme that replaces the '.' with a different character in the html. You could then write your own

Re: [s2] OGNL and javascript

2007-05-31 Thread Laurie Harper
If you're hand-coding the Javascript, you may also be able to write something like document.addressForm['address.street'] or document.addressForm.elements['address.street'] L. Jeromy Evans wrote: Interesting problem... Using textfield as an example, the template (eg. text.ftl) takes the