• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing the current form to a custom tag. (Accessing it with Java)

 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy.

If I want to pass the current form that a piece of code is in to a custom tag, what syntax would I use?

Ideally I'd like something like this:

<customTag:customMethod form = *THIS.FORM* />.

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That makes no sense. The form is a client-side concept and the custom tag is a server-side element that executes when the page is being rendered in order to send to the browser.

You're going to have to explain what it is you are trying to accomplish.
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I figured it out.

I was attempting to pass the form so that I could keep track of it for form submission and variable assignment within javascript. The form in question is in a Struts tile and could be in any place on a page, when submission time comes, I need to find it.

Simple solution: Just use the form name in the JS to do the variable assignment. (newb mistake I'll bet)

Thanks anyway though.
[ September 17, 2004: Message edited by: Karl Beowulph ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic