public List<Object> getScriptingVars(int scope) { List<Object> vec = null; switch (scope) { case VariableInfo.AT_BEGIN: vec = this.atBeginScriptingVars; break; case VariableInfo.AT_END: vec = this.atEndScriptingVars; break; case VariableInfo.NESTED: vec = this.nestedScriptingVars; break; } return vec; }
public Vector getScriptingVars(int scope) { Vector vec = null; switch (scope) { case VariableInfo.AT_BEGIN: vec = this.atBeginScriptingVars; break; case VariableInfo.AT_END: vec = this.atEndScriptingVars; break; case VariableInfo.NESTED: vec = this.nestedScriptingVars; break; } return vec; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { // get the type String type = (String)data.getAttribute("type"); // make it an object if none supplied if (type == null) { type = "java.lang.Object"; } // return the infor about the deined object VariableInfo[] vinfo = new VariableInfo[1]; vinfo[0] = new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_END ); /* return the results */ return vinfo; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String type = (String)data.getAttribute("type"); Object name = data.getAttribute("name"); Object value = data.getAttribute("value"); if (type == null) { if ( (value!=null) || (name==null) ) type = "java.lang.String"; else type = "java.lang.Object"; } return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_END ) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String type = null; String property = data.getAttributeString("property"); if ("application".equalsIgnoreCase(property)) type = "javax.servlet.ServletContext"; else if ("config".equalsIgnoreCase(property)) type = "javax.servlet.ServletConfig"; else if ("request".equalsIgnoreCase(property)) type = "javax.servlet.ServletRequest"; else if ("response".equalsIgnoreCase(property)) type = "javax.servlet.ServletResponse"; else if ("session".equalsIgnoreCase(property)) type = "javax.servlet.http.HttpSession"; else type = "java.lang.Object"; return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_BEGIN) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String className = null; if (data.getAttribute("multiple") == null) className = "java.lang.String"; else className = "java.lang.String[]"; return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), className, true, VariableInfo.AT_BEGIN) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String type = null; if (data.getAttribute("input") == null) type = "java.lang.String"; else type = "java.io.InputStream"; return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_BEGIN) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String className = null; if (data.getAttribute("multiple") == null) className = "javax.servlet.http.Cookie"; else className = "javax.servlet.http.Cookie[]"; return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), className, true, VariableInfo.AT_BEGIN) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String type = null; if (data.getAttribute("formBean") != null) type = "org.apache.struts.action.ActionFormBean"; else if (data.getAttribute("forward") != null) type = "org.apache.struts.action.ActionForward"; else if (data.getAttribute("mapping") != null) type = "org.apache.struts.action.ActionMapping"; else type = "java.lang.Object"; return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_BEGIN) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String classname = data.getAttributeString("classname"); if( classname == null ) classname = "java.lang.Object"; String id = data.getAttributeString("id"); if( id == null ) id = data.getAttributeString("name"); return new VariableInfo[] { new VariableInfo(id, classname, true, VariableInfo.AT_END) }; }
/** Returns an array of length two, for the variables exposed. */ @Override public VariableInfo[] getVariableInfo(TagData data) { VariableInfo[] scriptVars = new VariableInfo[2]; scriptVars[0] = new VariableInfo("index", "java.lang.Number", true, VariableInfo.NESTED); // TODO: ValidationError should expose properties like field name scriptVars[1] = new VariableInfo("error", ValidationError.class.getName(), true, VariableInfo.NESTED); return scriptVars; }
/** * Attempts to return type information so that the container can create a * named variable for the action bean. */ @Override public VariableInfo[] getVariableInfo(final TagData tag) { // We can only provide the type of 'var' if beanclass was used because // if binding was used we need runtime information! Object beanclass = tag.getAttribute("beanclass"); // Turns out beanclass="${...}" does NOT return TagData.REQUEST_TIME_VALUE; only beanclass="<%= ... %>". if (beanclass != null && !beanclass.equals(TagData.REQUEST_TIME_VALUE)) { String var = tag.getAttributeString("var"); if (var == null) var = tag.getAttributeString("id"); // Make sure we have the class name, not the class if (beanclass instanceof Class<?>) beanclass = ((Class<?>) beanclass).getName(); // Return the variable info if (beanclass instanceof String) { String string = (String) beanclass; if (!string.startsWith("${")) { return new VariableInfo[] { new VariableInfo(var, string, true, VariableInfo.AT_BEGIN) }; } } } return NO_INFO; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { /* the id parameter */ String id = data.getAttributeString("id"); VariableInfo[] vi = null; if (id != null) { vi = new VariableInfo[1]; vi[0] = new VariableInfo(id, "java.lang.String", true, VariableInfo.AT_END); } else { vi = new VariableInfo[0]; } // job done return vi; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { // get the type String type = (String) data.getAttribute("type"); // make it an object if none supplied if (type == null) { type = "java.lang.Object"; } // return the infor about the deined object VariableInfo[] vinfo = new VariableInfo[1]; vinfo[0] = new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_END); /* return the results */ return vinfo; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String type = (String) data.getAttribute("type"); Object name = data.getAttribute("name"); Object value = data.getAttribute("value"); if (type == null) { if ((value != null) || (name == null)) { type = "java.lang.String"; } else { type = "java.lang.Object"; } } return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_END) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String type = null; String property = data.getAttributeString("property"); if ("application".equalsIgnoreCase(property)) { type = "javax.servlet.ServletContext"; } else if ("config".equalsIgnoreCase(property)) { type = "javax.servlet.ServletConfig"; } else if ("request".equalsIgnoreCase(property)) { type = "javax.servlet.ServletRequest"; } else if ("response".equalsIgnoreCase(property)) { type = "javax.servlet.ServletResponse"; } else if ("session".equalsIgnoreCase(property)) { type = "javax.servlet.http.HttpSession"; } else { type = "java.lang.Object"; } return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_BEGIN) }; }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String type = null; if (data.getAttribute("formBean") != null) { type = "org.apache.struts.action.ActionFormBean"; } else if (data.getAttribute("forward") != null) { type = "org.apache.struts.action.ActionForward"; } else if (data.getAttribute("mapping") != null) { type = "org.apache.struts.action.ActionMapping"; } else { type = "java.lang.Object"; } return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), type, true, VariableInfo.AT_BEGIN) }; }
@Override public VariableInfo[] getVariableInfo(TagData tagData) { List<VariableInfo> infos = new ArrayList<VariableInfo>(2); String variableName = tagData.getAttributeString("var"); infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED)); variableName = tagData.getAttributeString("categoryId"); if (variableName != null) { variableName = GetProductsByCategoryIdTag.toVariableName(variableName); infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED)); } return infos.toArray(new VariableInfo[infos.size()]); }
@Override public VariableInfo[] getVariableInfo(TagData tagData) { List<VariableInfo> infos = new ArrayList<VariableInfo>(2); String variableName = tagData.getAttributeString("var"); infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED)); variableName = tagData.getAttributeString("categoryId"); if (variableName != null) { variableName = CategoryTag.toVariableName(variableName); infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED)); } return infos.toArray(new VariableInfo[infos.size()]); }
@Override public VariableInfo[] getVariableInfo(TagData tagData) { List<VariableInfo> infos = new ArrayList<VariableInfo>(2); String variableName = tagData.getAttributeString("var"); infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED)); variableName = tagData.getAttributeString("categoryId"); if (variableName != null) { variableName = CategoryBreadCrumbTag.toVariableName(variableName); infos.add(new VariableInfo(variableName, String.class.getName(), true, VariableInfo.NESTED)); } return infos.toArray(new VariableInfo[infos.size()]); }
@Override public VariableInfo[] getVariableInfo(TagData data) { String name = null; String className = null; name = data.getAttributeString("name"); className = data.getAttributeString("type"); if (className == null) className = "org.ofbiz.entity.GenericValue"; VariableInfo info = new VariableInfo(name, className, true, VariableInfo.AT_BEGIN); VariableInfo[] result = {info}; return result; }
@Override public VariableInfo[] getVariableInfo(TagData data) { String name = null; String className = null; name = data.getAttributeString("name"); className = data.getAttributeString("type"); if (className == null) className = "org.ofbiz.entity.GenericValue"; VariableInfo info = new VariableInfo(name, className, true, VariableInfo.NESTED); VariableInfo[] result = {info}; return result; }
@Override public VariableInfo[] getVariableInfo(TagData data) { String name = null; String className = null; name = data.getAttributeString("name"); if (name == null) name = "next"; className = data.getAttributeString("type"); if (className == null) className = "org.ofbiz.entity.GenericValue"; VariableInfo info = new VariableInfo(name, className, true, VariableInfo.NESTED); VariableInfo[] result = {info}; return result; }