1 13 package com.tonbeller.wcf.catedit; 14 15 import org.w3c.dom.Document ; 16 import org.w3c.dom.Element ; 17 18 import com.tonbeller.wcf.controller.RequestContext; 19 20 25 public class DefaultItemElementRenderer implements ItemElementRenderer { 26 private String elementName = "cat-item"; 27 28 31 public DefaultItemElementRenderer() { 32 super(); 33 } 34 35 public Element render(RequestContext context, Document factory, Category cat, Item item) { 36 Element elem = factory.createElement(elementName); 37 elem.setAttribute("name", item.getLabel()); 38 return elem; 39 } 40 41 public String getElementName() { 42 return elementName; 43 } 44 45 public void setElementName(String elementName) { 46 this.elementName = elementName; 47 } 48 49 public void startRendering(RequestContext context) { 50 } 51 52 public void stopRendering() { 53 } 54 public void categoryModelChanged(CategoryModelChangeEvent event) { 55 } 56 public void request(RequestContext context) throws Exception { 57 } 58 } 59 | Popular Tags |