Package component.tags;
Import javax.servlet.jsp.jspexception; import javax.servlet.jsp.tagext.tagsupport; import java.util.vector; / ** *
page template tag package p> *
Description: < / P> *
Copyright: Copyright (c) 2003 p> *
Company: p> * @Author * @version 1.0 * /
Public class templateselecttag extends tagsupport {
// TagLib property private String mtemplatetype; // alternate "page" - page template "plugin" - plug-in template private String mtemplateid; // currently selected nodeid private String mselectname; // select list box name private String mhasdisable; / / Do not choose private string mupnodeid;
// property is initialized public void settemplatetype (String value) {this.mtemplatetype = value;} public void settemplateid (String value) {this.mtemplateid = value;} public void setselectname (String value) {this.mselectname = value;}
Public void setHasdisable (string value) {this.mhasdisable = value;} public void setupnodeid (string value) {this.MupnodeId = value;}
/ / Treatment Tag PUBLIC INT DOSTARTTAG () THROWS JSPEXCEPTION {
String strreturnselect = ""; "TRY {// is set to disable if (" true ")) {strreturnselect ="
private String getPluginOption () {// loaded from the database Node node = new Node (); node.setNODEID (mupnodeid); DbConnection con = null; DataAccess da = new DataAccess (); String strReturnSelect = ""; TemplateManager mgr = (TemplateManager ) RequestHelper.getBean ( "templateManager", this.pageContext.getServletContext ()); String siteId = ""; try {con = RequestHelper.getConnection (this.pageContext.getServletContext ()); da.select (con, new String [ ] {"NodeID"}, node); SiteId = node.getfullname (); SiteId = Siteid.Substring (1); SiteId = Siteid.Substring (0, SiteIDexof ("/")); //system.out .println; Vector vplugin = new vector (); vplugin = mgr.loadPlugin (); string fullname = ""; for (int i = 0; i