Redian新闻
>
Re: Custom Tag: embedding tag inside tag
avatar
Re: Custom Tag: embedding tag inside tag# Java - 爪哇娇娃
m*c
1

What don't you use nested tag to solve the problem:



You need to implement BodyTagSupport (cannot remember if it is correct name)
for tag2. tag2 can "communicate" tag1.
attribute
avatar
r*u
2
Yeah, I thought about nested tag too but it doesn't really fit my case. What I
have really is something like

where "string" needs to be retrieved from a int'lized resource bundle. I
could've put the bundle information in tag1 but hoping there's an easier way
of doing this.
Currently I am looking at JSTL and EL stuff - that should provide a good
solution...
Thanks for your suggestion.

【在 m**c 的大作中提到】
:
: What don't you use nested tag to solve the problem:
:
:
:

: You need to implement BodyTagSupport (cannot remember if it is correct name)
: for tag2. tag2 can "communicate" tag1.
: attribute

avatar
n*k
3

I
Really doubt you can do it with JSTL. I personal do not like this design,
using javabean for that resource second tag makes life lots of easy.
name)

【在 r*u 的大作中提到】
: Yeah, I thought about nested tag too but it doesn't really fit my case. What I
: have really is something like
:
: where "string" needs to be retrieved from a int'lized resource bundle. I
: could've put the bundle information in tag1 but hoping there's an easier way
: of doing this.
: Currently I am looking at JSTL and EL stuff - that should provide a good
: solution...
: Thanks for your suggestion.

avatar
r*u
4
I can retreive that string from a JSTL tag (fmt:message), now the question is
how to set the result of that tag to a bean object.
Or am I drilling into a dead end here? :(

What
way

【在 n*****k 的大作中提到】
:
: I
: Really doubt you can do it with JSTL. I personal do not like this design,
: using javabean for that resource second tag makes life lots of easy.
: name)

avatar
n*k
5

is
First all, I am not an expert in this field, so do not take my words so
seriously.
What I am trying to say is you can transfer the resourse tag into a javabean,
so than you can use this javabean within any other tags.
I just know JSTL, but I am pretty sure there are lots of other tag libraries
out there, so you may find something suit you well.
Otherwise, what you have to do is redesign the tag, so that it can be used
within other tag.

【在 r*u 的大作中提到】
: I can retreive that string from a JSTL tag (fmt:message), now the question is
: how to set the result of that tag to a bean object.
: Or am I drilling into a dead end here? :(
:
: What
: way

avatar
r*u
6
Yeah, the JavaBean approach will be my backup plan. Any good places you know
for looking up other tag libs? Thanks a lot.

javabean,

【在 n*****k 的大作中提到】
:
: is
: First all, I am not an expert in this field, so do not take my words so
: seriously.
: What I am trying to say is you can transfer the resourse tag into a javabean,
: so than you can use this javabean within any other tags.
: I just know JSTL, but I am pretty sure there are lots of other tag libraries
: out there, so you may find something suit you well.
: Otherwise, what you have to do is redesign the tag, so that it can be used
: within other tag.

avatar
m*c
7

http://jakarta.apache.org/taglibs/index.html
question
libraries

【在 r*u 的大作中提到】
: Yeah, the JavaBean approach will be my backup plan. Any good places you know
: for looking up other tag libs? Thanks a lot.
:
: javabean,

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。