package com.agilecontrol.nea.core.web.bean; import com.agilecontrol.nea.core.schema.Table; import com.agilecontrol.nea.core.web.bean.Util; import com.agilecontrol.nea.util.StringUtils; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; public class Button { protected String name; protected String value; protected Map attributes; protected String type; protected String attributesText; public Button() { } public Button(String name, String value, String action, String title) { this.name = name; this.value = value; this.attributes = new HashMap(); this.attributes.put("onclick", action); if(title != null) { this.attributes.put("title", title); } } public String toHREF(String cssClass) { StringBuilder sb = new StringBuilder(); String onclick = (String)this.attributes.get("onclick"); if(onclick != null) { onclick = "javascript:" + onclick; } else { onclick = "#"; } sb.append("").append(this.value).append(""); return sb.toString(); } public String toHTML() throws IOException { StringBuilder sb = new StringBuilder(); sb.append(""); return sb.toString(); } public String toMenuItem() throws IOException { StringBuilder sb = new StringBuilder(); sb.append("