コード例 #1
0
 public void testComposeComponentTree() throws Exception {
   Map map = new HashMap();
   map.put("name", "aaa");
   MockTagSupport m = new MockTagSupport();
   ElementProcessorImpl processor = new ElementProcessorImpl(m.getClass(), map);
   MockFacesContext context = getFacesContext();
   PageContextImpl pageContext = getPageContext();
   MockUIComponentTag parentTag = new MockUIComponentTag();
   processor.composeComponentTree(context, pageContext, parentTag);
   Tag child = parentTag.getChild();
   assertTrue(child instanceof MockTagSupport);
   assertEquals("aaa", ((MockTagSupport) child).getName());
   parentTag = null;
   child = null;
 }
コード例 #2
0
 public void setParent(Tag tag) {
   super.setParent(tag);
   ((MockUIComponentTag) tag).setChild(this);
 }