Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enthuware Mock Question

 
gopal venu
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a doubt in this mock question ( Source : JWebplus :Enthuware )
You are given a tag library that has:
1. A tag named getMenu that takes an attribute 'subject' which can be a dynamic value.
2. A tag named getHeading that takes an attribute 'report'.
Which of the following are correct uses of this library?

Select 3 correct options
a <myTL:getMenu subject="Finance"/>
b <myTL:getMenu subject="<myTL:getHeading report=1/>"/>
c <myTL:getMenu subject='<myTL:getHeading report="1"/>'/>
d <% String subject="HR";%> <myTL:getMenu subject="<%=subject%>"/>
e <myTL:getHeading report="2"/>

Answer : 1,4,5 ( a,d,e)

General Comments

This is a confusing question but the answer is simple.

You cannot embed one tag inside another tag's attribute list.

(Although you can nest one tag inside another). So 2 and 3 are invalid. 1, 4 and 5 are pretty straight forward.

My Comments
I Doubt about the 2nd Statement of the General Comments.


Any comments guys ???
 
Javier Snaider
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The statement is correct. You can't use custom tags inside attributes of other tag.
You can use EL there (if you configure so in the tld)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic