开发者

Nesting Custom Tags in Spring

I am trying create custom namespaces after开发者_开发技巧 reading the article at Custom Namespaces

I am able to create simple tags and and able to consume them

for e.g.

     <mns:test id="test" port="8003" host="localhost"/>

but i am not able to use this tag in another custom tag.

my requirement is like this, i have to create aother custom tag and inject the other simple tag in it.

 <mns:test id="test1" port="8003" host="localhost"/>
 <mns:test id="test2" port="8003" host="localhost"/>
 <mns:test id="test3" port="8003" host="localhost"/>

 <mns:instance id="instance" username="XXXXX" password="YYYYYY">
    <mns:test  ref="test1" />
    <mns:test  ref="test2" />
    <mns:test  ref="test3" />
</mns:instance>

Please help me..


Nested elements should be handled manually.

Try to find nested elements using DOM methods and pass them to

parserContext.getDelegate().parseCustomElement(e);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜