1 13 package info.magnolia.cms.gui.dialog; 14 15 import info.magnolia.cms.gui.control.Edit; 16 import info.magnolia.cms.gui.misc.CssConstants; 17 18 import java.io.IOException ; 19 import java.io.Writer ; 20 21 import javax.jcr.PropertyType; 22 23 24 28 public class DialogEdit extends DialogBox { 29 30 33 protected DialogEdit() { 34 } 35 36 39 public void drawHtml(Writer out) throws IOException { 40 Edit control = new Edit(this.getName(), this.getValue()); 41 control.setType(this.getConfigValue("type", PropertyType.TYPENAME_STRING)); if (this.getConfigValue("saveInfo").equals("false")) { control.setSaveInfo(false); 44 } 45 control.setCssClass(CssConstants.CSSCLASS_EDIT); 46 control.setRows(this.getConfigValue("rows", "1")); control.setCssStyles("width", this.getConfigValue("width", "100%")); if (this.getConfigValue("onchange", null) != null) { control.setEvent("onchange", this.getConfigValue("onchange")); } 51 this.drawHtmlPre(out); 52 out.write(control.getHtml()); 53 this.drawHtmlPost(out); 54 } 55 56 } 57 | Popular Tags |