Win a copy of Svelte and Sapper in Action this week in the 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how to retain javascript codes in s2 tags

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

I am trying to use <s:form - S2 tag and replace the HTML classic form tags. Here is one pair of HTML form tag and corresponding S2 tag
But the JavaScript code is being dumped by the tag translating engine. That I have seen from the source of the page rendered on client (i.e. in the browser)

Any inputs on how it can be retained using the S2 tag. I am using struts 2.0.6, JSP2.0 servlet2.4 and Tomcat5.5. Thanks in advance.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...

I thought we went over this already.

If you're dead-set on using an old version of S2 (2.0.6 is over two years old) you'll either have to modify the theme or just create the form tag manually. The dynamic attributes were added much later (and still might not solve the problem).

You could file a JIRA on current versions, but we're certainly not going to backport a patch to S2.0.6.
 
Shashank Rudra
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to modify the theme. Any link(working example) to help on that is appreciated.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://struts.apache.org/2.0.6/docs/extending-themes.html
http://struts.apache.org/2.0.6/docs/template-loading.html

You might want to spend some time exploring the already-existing documentation--it'll almost always be faster than waiting for someone to answer your question, at least when the answer already exists.
 
Shashank Rudra
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That piece is very cryptic to me at the moment. At the moment I think I will be going with my old form tag, the plain HTML one. Thanks David for all the help.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic