Thesl:shoppingListandsl:itemtagsoutputashoppinglisttotheresponseandareusedasfollows:11.<sl:shoppingList>12.<sl:itemname="Bread"/>13.<sl:itemname="Milk"/>14.<sl:itemname="Eggs"/>15.</sl:shoppingList>Thetaghandlerforsl:shoppingListisShoppingListTagandthetag

题目

Thesl:shoppingListandsl:itemtagsoutputashoppinglisttotheresponseandareusedasfollows:11.<sl:shoppingList>12.<sl:itemname="Bread"/>13.<sl:itemname="Milk"/>14.<sl:itemname="Eggs"/>15.</sl:shoppingList>Thetaghandlerforsl:shoppingListisShoppingListTagandthetaghandlerforsl:itemisItemSimpleTag.ShoppingListTagextendsBodyTagSupportandItemSimpleTagextendsSimpleTagSupport.Whichistrue?()

A.ItemSimpleTagcanfindtheenclosinginstanceofShoppingListTagbycallinggetParent()andcastingtheresulttoShoppingListTag.

B.ShoppingListTagcanfindthechildinstancesofItemSimpleTagbycallingsuper.getChildren()andcastingeachtoanItemSimpleTag.

C.ItisimpossibleforItemSimpleTagandShoppingListTagtofindeachotherinataghierarchybecauseoneisaSimpletagandtheotherisaClassictag.

D.ShoppingListTagcanfindthechildinstancesofItemSimpleTagbycallinggetChildren()onthePageContextandcastingeachtoanItemSimpleTag.

E.ItemSimpleTagcanfindtheenclosinginstanceofShoppingListTagbycallingfindAncestorWithClass()onthePageContextandcastingtheresulttoShoppingListTag.


相似考题