jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Zeneski <...@zsolv.com>
Subject Re: Input tags - refactoring for ease of extension
Date Thu, 28 Feb 2002 18:12:17 GMT

Tom,

I did something simular, I was just a little more generic in the way in which 
I implemented this. If the parameter is null, I checked for a Map in the 
pageContext and if it existed with the same key that value was used.

I posted that to this list, but heard no respone if anyone was interested in 
putting it in the source tree. I will be happy to send you my version if you 
are interested.

Andy

On Thursday 28 February 2002 01:03 pm, Tom Drake wrote:
> I'm interested in extending the input tags to provide an alternative
> means of obtaining the 'value'.
>
> Currently these tags retrieve the the value from
> request.getParameter(name).
>
> However, I need to do the following:
>
> If request.getParameter(name) is null
> Then look for a parent tag that is the instance of a 'certain' class,
> and retrieve a value from it.
>
> What I would to do is (at the least) is to create a new method
>
>   protected String getDefault();
>
> That simply returns dVal.
>
> This will allow me to override getDefault() in a sub-class to do what I
> would like it to.
>
> Of course, I'd need to do this to each of the tags (e.g. Text, Textarea,
> ...).
>
> So, it probably makes sense to do a little more refactoring and move
> some common bits into a base class from which all these classes descend.
>
> I'm happy to submit patches for this.
>
>
> Regards,
>
> Tom Drake

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message