This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Passing the current form to a custom tag. (Accessing it with Java) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Passing the current form to a custom tag. (Accessing it with Java)" Watch "Passing the current form to a custom tag. (Accessing it with Java)" New topic
Author

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

Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
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

Joined: Jan 10, 2002
Posts: 60810
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing the current form to a custom tag. (Accessing it with Java)
 
Similar Threads
DHTML and IFrames
Please help
jsptags.com - Pager Tag Library
How do you access DynaValidatorForm properties in a JSP?
JSP's and TEXTAREA