• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JWebPlus Question - Custom Tag Developement

 
him tan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What should be the correct answer for the following question

Consider the following description of a tag in a TLD:

<tag>
<name>SmilyTag</name>
<tag-class>com.enthuware.ctags.SmilyTag</tag-class>
<description>
Replaces emoticons such as , , and with images.
</description>
<body-content>tagdependent</body-content>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
Which of the following statements regarding the above tag are correct?

a It is an empty tag.
b It may be used as an empty tag.
c It must have a body.
d It must implement BodyTag interface.
e It may take an attribute named 'name'. But if present, its value must be dynamic.

I think it should be 'b' only but answer says 'b' & 'd'.

Could anyone help me out on this???
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it can have body than it must implement BodyTag or extend BodyTagSupport.
 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer e is also correct. Since, <required> false </required>, -> attribute may or may nt be there.

If present, its value is dynamic, since <rtexprvalue> true</rtexprvalue>
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think e is not correct, because the value must not be dynamic, it could be. Right?
 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it can have body than it must implement BodyTag or extend BodyTagSupport.

What if it is a simple tag?
 
Sowrabha
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think b and e should be correct
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic