You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Averty <jo...@hotmail.com> on 2002/08/30 23:05:56 UTC
Create a custom tag that uses struts HTML tags?
Hi,
I'm a new struts user, and I couldn't find any information that helped;
I'd like to create a custom tag which represents a super-componant such as a "properties list" tag.
The idea would be to:
1) dynamically specify which fields to be renderered
2) at the same time ensure that the rendering of such list of properties is consistant accross different pages of the application, without having to rely on "low level" HTML (such as tables, etc) on each page.
So the question is:
How can I reference Struts tags from withing my tag
- without having to put a lot of snipet code in the jsp page (I'd like just the tag and a definition name)
- still having the struts built-in validations mechanism work.
I'm assuming I might be able to get to the struts tags by some sort of introspecion mechanism, but I'm not clear on how to have the validation perform.
Any help grandly apprecitated.
Chheers,
John.
Re: Create a custom tag that uses struts HTML tags?
Posted by Eddie Bush <ek...@swbell.net>.
Have you discovered the <tiles:insert> tag yet? Sounds to me like this
is what you're wanting ... no need to re-invent the wheel if you don't
have to. (you said definition - that's tiles nomenclature - that's why
I made my assumption ... ). If you're not looking at tiles, you may
want to. It's conceivable it may suit your needs (defining reusable
"chunks" which can be rendered at any given point).
Of course, if I _totally_ missed your point, just repost with more
information.
Regards,
Eddie
John Averty wrote:
>Hi,
>
>I'm a new struts user, and I couldn't find any information that helped;
>
>I'd like to create a custom tag which represents a super-componant such as a "properties list" tag.
>
>The idea would be to:
>1) dynamically specify which fields to be renderered
>2) at the same time ensure that the rendering of such list of properties is consistant accross different pages of the application, without having to rely on "low level" HTML (such as tables, etc) on each page.
>
>So the question is:
>
>How can I reference Struts tags from withing my tag
> - without having to put a lot of snipet code in the jsp page (I'd like just the tag and a definition name)
> - still having the struts built-in validations mechanism work.
>
>I'm assuming I might be able to get to the struts tags by some sort of introspecion mechanism, but I'm not clear on how to have the validation perform.
>
>Any help grandly apprecitated.
>
>Chheers,
>
>John.
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: [taglibs] Create a custom tag that uses struts HTML tags?
Posted by James Mitchell <jm...@telocity.com>.
Could you explain this a bit further.
I've written a few tags myself, but I'm not exactly sure what you are trying
to do.
James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta
> -----Original Message-----
> From: John Averty [mailto:john_averty@hotmail.com]
> Sent: Friday, August 30, 2002 5:06 PM
> To: struts-user@jakarta.apache.org
> Subject: Create a custom tag that uses struts HTML tags?
>
>
> Hi,
>
> I'm a new struts user, and I couldn't find any information that helped;
>
> I'd like to create a custom tag which represents a
> super-componant such as a "properties list" tag.
>
> The idea would be to:
> 1) dynamically specify which fields to be renderered
> 2) at the same time ensure that the rendering of such list of
> properties is consistant accross different pages of the
> application, without having to rely on "low level" HTML (such as
> tables, etc) on each page.
>
> So the question is:
>
> How can I reference Struts tags from withing my tag
> - without having to put a lot of snipet code in the jsp page
> (I'd like just the tag and a definition name)
> - still having the struts built-in validations mechanism work.
>
> I'm assuming I might be able to get to the struts tags by some
> sort of introspecion mechanism, but I'm not clear on how to have
> the validation perform.
>
> Any help grandly apprecitated.
>
> Chheers,
>
> John.
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>