File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply 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: 56533
    
  14

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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
jsptags.com - Pager Tag Library
Please help
How do you access DynaValidatorForm properties in a JSP?
JSP's and TEXTAREA
DHTML and IFrames