• Post Reply 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 html tag does not have proper name attribute??

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm working on transfering a preexisting web app to use struts. So i'm abstracting all the java code out of the jsp's and into the actions. That part i have no problem with, but the one problem im running into now is that the submits on all of the forms are controlled by javascript functions. These functions also set different values on different inputs (fields, hidden fields, etc.) and then submits the form.
So, im using <html:hidden property="propInForm" value="some value" />, but i still need the regular name attribute, not the struts 'bean' name attribute. Since the javascript changes these form fields on submit i need to be able to reference them via their 'html' name.
Does anyone know why the developers of the struts tags wouldn't have included this field? something like htmlName would suffice, i do realize that its probably not too proper to be changing fields and properties via javascript functions, but right now im just worried about getting this whole web app transistioned in certain period of time.
Can anyone help?
Thanks,
Dave
 
Dave Knipp
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nevermind, the struts html tags actually generates the html 'name' attribute as the 'property' attribute supplied in the tag.
My problem is solved!!!
Dave
 
Police line, do not cross. Well, this tiny ad can go through:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic