Another question on the STRUTS HTML taglib.  One of the design
guidelines on the project I'm working on is that it should be possible
to alter the request parameters a JSP page uses by editting the JSP file
(i.e. without makeing code changes).  The reasoning is to allow re-use
of components (forms, etc) on multiple pages without code modification.
If request parameters are defined by code, as they are with the STRUTS
HTML tags, request parameter naming collisions can occur when trying to
combine components in new ways.

The way we achieve this generally is to pass request parameter names
into custom tags via attributes and have the tags retrieve the data they
need from the named parameter.  That allows us to have type-safe Java
code wrapping request parameter access (i.e. the tag calls a typed
getter which retrieves the named request parameter and validates it
before returning it).

So, my question: would there be any interest in extensions to the STRUTS
HTML tag libs to support this decoupling?  It'd be something along the
lines of an additional attribute to complement the 'property' attribute,
say 'param'.  If supplied, the value of the 'param' attribute would be
used for the request parameter name when submitting the form.  The
parameter would get mapped to the bean property named by 'property'.

Does this make sense?  Does it make more sense as an extension to the
STRUTS bean taglib?  (I haven't looked at the bean taglib at all, so I'm
not sure.)

If it doesn't make sense as part of STRUTS, I'll implement it as a local
extension.  If it does, I'll be happy to contribute the extension as a
patch for possible inclusion in STRUTS.

Thanks,

L.
-- 
zodiac(@)holoweb!net  | "If that's too much initiative for the company
to
ICQ# 78724820         |  handle, I don't want to work for them anyway."



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

Reply via email to