Greetings,

I don't know if a similar solution has been provided, but, I tweaked the
Link Tag to support the writing of
'javascript:[function_name]([param1,param2,param3...])' to the href
attribute of the final output. Here is a summarization of it's
functionality:

I added the following attributes:

function - This is the name of the javascript function that will be called;

functionName - This is the name of the bean that will provide parameter
values from one of it's properties.

functionProperty - This is a property of a bean that will either provide a
String or an ArrayList to populate the parameters of the function

urlIndex - This allows you to include the url generated by href,forward or
page to be included at a specific place in the funcion's parameters.

There is another class that I wrote that does the actual processing and
preparation of the url. I named it EcmaUtil.  I modeled the computeURL and
computerParam methods of the RequestUtils class when I built the methods for
the EcmaUtil.

The LinkTag class that I wrote extends the BaseHandlerTag under the
org.apache.struts.taglib.html package of struts jar.

I know the code needs a bit of reworking to fit back in to the struts
framework. I stripped out the MessageReources for the most part and removed
some exception handling that will need to be included again.

Anyways, if nobody has done this in the nightly or if it sounds like it
might be of use. Let me know and I will post the code,the tld and an example
of it's usage.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to