This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

struts html tag does not have proper name attribute??

Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Dave Knipp
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • 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!!!
    Bookmark Topic Watch Topic
  • New Topic