欢迎来到求知题库网 求知题库官网
logo
全部科目 > Java认证考试 > SCWCD(310-083)

单项选择题

The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows:
11.<sl:shoppingList>
12.<sl:item name="Bread" />
13.<sl:item name="Milk" />
14.<sl:item name="Eggs" />
15.</sl:shoppingList>
The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.Which is true?()

    A.ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and castingthe result to ShoppingListTag.
    B.ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() andcasting each to an ItemSimpleTag.
    C.It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy becauseone is a Simple tag and the other is a Classic tag.
    D.ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on thePageContext and casting each to an ItemSimpleTag.
    E.ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass()on the PageContext and casting the result to ShoppingListTag.

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题