ent: Fri 9/26/2003 5:12 PM
To: 'Struts Developers List'
Cc:
Subject: RE: How can I extend a Struts tag?
> public int doStartTag() throws JspException {
> int tempValue = super.doStartTag();
>StringBuffer href = new StringBuffer("some stuf
> public int doStartTag() throws JspException {
> int tempValue = super.doStartTag();
>StringBuffer href = new StringBuffer("some stuff");
> ResponseUtils.write(pageContext, sb.toString());
> return tempValue;
> }
>
> This all works fine for me!
So you're doi
I finally did it (thanks to Chris Gastin for putting me o/t track). But instead
of extending the TextTag, i extended the BaseFieldTag. In the constructor,
I wrote:
public StrutsDateChooserTag() {
super();
type = "text";
}
Further, I did only override
public int doStart
Paananen, Tero wrote:
Can somebody tell me which is the best way to do this?
Oh boy :)
There was a long discussion not so long ago about
the problems with extending the tags (not limited
to the Struts tags, btw) on this list.
If you do want to extend a tag, try to use the nightly source d
You're stuck with copy-and-pasteing TextTag.doStartTag()
into your new tag, then sprinkling your modifications
in there.
Alternatively, you could refactor TextTag to make it easier to
extend, and then submit the refactoring as a request-for-enhancement,
and extend the refactored version...
Joe
> Can somebody tell me which is the best way to do this?
Oh boy :)
There was a long discussion not so long ago about
the problems with extending the tags (not limited
to the Struts tags, btw) on this list.
You're stuck with copy-and-pasteing TextTag.doStartTag()
into your new tag, then sprinklin
. Then
you will need to add the datechooser attribute to the tld file, or create a
custom tld for this new custom tag.
Chris
- Original Message -
From: "David Cypers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 25, 2003 3:12 AM
Subject: How can
Hi there,
I would like to extend the struts tag, so I can add a date
chooser popup next to it. I would do this by creating a custom tag, e.g.
which adds some extra functionality (and a
javascript) to the existing tag. Can somebody tell me which
is the best way to do this? I allready searche