javax.servlet.jsp.tagext.VariableInfo Java Examples
The following examples show how to use
javax.servlet.jsp.tagext.VariableInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ShowNavigationTagExtraInfo.java From openemm with GNU Affero General Public License v3.0 | 6 votes |
/** * Getter for property variableInfo. * * @return Value of property variableInfo. */ @Override public VariableInfo[] getVariableInfo(TagData data) { String prefix=(String)data.getAttribute("prefix"); if(prefix==null) { prefix = ""; } return new VariableInfo[] { new VariableInfo(prefix+"_navigation_switch", "String", true, VariableInfo.NESTED), new VariableInfo(prefix+"_navigation_isHighlightKey", "Boolean", true, VariableInfo.NESTED), new VariableInfo(prefix+"_navigation_token", "String", true, VariableInfo.NESTED), new VariableInfo(prefix+"_navigation_href", "String", true, VariableInfo.NESTED), new VariableInfo(prefix+"_navigation_navMsg", "String", true, VariableInfo.NESTED), new VariableInfo(prefix+"_navigation_index", "Integer", true, VariableInfo.NESTED), new VariableInfo(prefix+"_navigation_conditionSatisfied", "Boolean", true, VariableInfo.NESTED) }; }
Example #2
Source File: DefineObjectsTag168.java From portals-pluto with Apache License 2.0 | 6 votes |
public VariableInfo[] getVariableInfo(TagData tagData) { VariableInfo[] info = new VariableInfo[]{ new VariableInfo("renderRequest", "javax.portlet.RenderRequest", true, VariableInfo.AT_BEGIN), new VariableInfo("renderResponse", "javax.portlet.RenderResponse", true, VariableInfo.AT_BEGIN), new VariableInfo("portletConfig", "javax.portlet.PortletConfig", true, VariableInfo.AT_BEGIN) }; return info; }
Example #3
Source File: Node.java From Tomcat8-Source-Read with MIT License | 6 votes |
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; }
Example #4
Source File: Node.java From tomcatsrc with Apache License 2.0 | 6 votes |
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; }
Example #5
Source File: Node.java From Tomcat7.0.67 with Apache License 2.0 | 6 votes |
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; }
Example #6
Source File: Node.java From packagedrone with Eclipse Public License 1.0 | 5 votes |
public ArrayList<Object> getScriptingVars(int scope) { switch (scope) { case VariableInfo.AT_BEGIN: return this.atBeginScriptingVars; case VariableInfo.AT_END: return this.atEndScriptingVars; case VariableInfo.NESTED: return this.nestedScriptingVars; } return null; }
Example #7
Source File: TestScriptingVariabler.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
/** * Return information about the scripting variables to be created. */ @Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("Test", "java.lang.String", true, VariableInfo.AT_END) }; }
Example #8
Source File: ScriptingVariabler.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
@Override public void visit(Node.CustomTag n) throws JasperException { setScriptingVars(n, VariableInfo.AT_BEGIN); setScriptingVars(n, VariableInfo.NESTED); visitBody(n); setScriptingVars(n, VariableInfo.AT_END); }
Example #9
Source File: Generator.java From packagedrone with Eclipse Public License 1.0 | 5 votes |
private void declareScriptingVars(Node.CustomTag n, int scope) { // Skip if the page is scriptless if (pageInfo.isScriptless()) return; ArrayList<Object> vec = n.getScriptingVars(scope); if (vec != null) { for (int i = 0; i < vec.size(); i++) { Object elem = vec.get(i); if (elem instanceof VariableInfo) { VariableInfo varInfo = (VariableInfo)elem; if (varInfo.getDeclare()) { out.printin(varInfo.getClassName()); out.print(" "); out.print(varInfo.getVarName()); out.println(" = null;"); } } else { TagVariableInfo tagVarInfo = (TagVariableInfo)elem; if (tagVarInfo.getDeclare()) { String varName = tagVarInfo.getNameGiven(); if (varName == null) { varName = n.getTagData().getAttributeString( tagVarInfo.getNameFromAttribute()); } else if ( tagVarInfo.getNameFromAttribute() != null) { // alias continue; } out.printin(tagVarInfo.getClassName()); out.print(" "); out.print(varName); out.println(" = null;"); } } } } }
Example #10
Source File: Generator.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
private void declareScriptingVars(Node.CustomTag n, int scope) { if (isFragment) { // No need to declare Java variables, if we inside a // JspFragment, because a fragment is always scriptless. return; } List<Object> vec = n.getScriptingVars(scope); if (vec != null) { for (int i = 0; i < vec.size(); i++) { Object elem = vec.get(i); if (elem instanceof VariableInfo) { VariableInfo varInfo = (VariableInfo) elem; if (varInfo.getDeclare()) { out.printin(varInfo.getClassName()); out.print(" "); out.print(varInfo.getVarName()); out.println(" = null;"); } } else { TagVariableInfo tagVarInfo = (TagVariableInfo) elem; if (tagVarInfo.getDeclare()) { String varName = tagVarInfo.getNameGiven(); if (varName == null) { varName = n.getTagData().getAttributeString( tagVarInfo.getNameFromAttribute()); } else if (tagVarInfo.getNameFromAttribute() != null) { // alias continue; } out.printin(tagVarInfo.getClassName()); out.print(" "); out.print(varName); out.println(" = null;"); } } } } }
Example #11
Source File: Node.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
public void setScriptingVars(List<Object> vec, int scope) { switch (scope) { case VariableInfo.AT_BEGIN: this.atBeginScriptingVars = vec; break; case VariableInfo.AT_END: this.atEndScriptingVars = vec; break; case VariableInfo.NESTED: this.nestedScriptingVars = vec; break; } }
Example #12
Source File: Generator.java From Tomcat8-Source-Read with MIT License | 5 votes |
private void declareScriptingVars(Node.CustomTag n, int scope) { if (isFragment) { // No need to declare Java variables, if we inside a // JspFragment, because a fragment is always scriptless. return; } List<Object> vec = n.getScriptingVars(scope); if (vec != null) { for (int i = 0; i < vec.size(); i++) { Object elem = vec.get(i); if (elem instanceof VariableInfo) { VariableInfo varInfo = (VariableInfo) elem; if (varInfo.getDeclare()) { out.printin(varInfo.getClassName()); out.print(" "); out.print(varInfo.getVarName()); out.println(" = null;"); } } else { TagVariableInfo tagVarInfo = (TagVariableInfo) elem; if (tagVarInfo.getDeclare()) { String varName = tagVarInfo.getNameGiven(); if (varName == null) { varName = n.getTagData().getAttributeString( tagVarInfo.getNameFromAttribute()); } else if (tagVarInfo.getNameFromAttribute() != null) { // alias continue; } out.printin(tagVarInfo.getClassName()); out.print(" "); out.print(varName); out.println(" = null;"); } } } } }
Example #13
Source File: FooTagExtraInfo.java From Tomcat8-Source-Read with MIT License | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("member", "String", true, VariableInfo.NESTED) }; }
Example #14
Source File: CheckUserExtraInfo.java From ontopia with Apache License 2.0 | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo(NavigatorApplicationIF.USER_KEY, "net.ontopia.topicmaps.nav2.core.UserIF", true, VariableInfo.AT_END) }; }
Example #15
Source File: ScriptingVariabler.java From Tomcat8-Source-Read with MIT License | 5 votes |
@Override public void visit(Node.CustomTag n) throws JasperException { setScriptingVars(n, VariableInfo.AT_BEGIN); setScriptingVars(n, VariableInfo.NESTED); visitBody(n); setScriptingVars(n, VariableInfo.AT_END); }
Example #16
Source File: BaseURLTag.java From portals-pluto with Apache License 2.0 | 5 votes |
public VariableInfo[] getVariableInfo(TagData tagData) { VariableInfo vi[] = null; String var = tagData.getAttributeString("var"); if (var != null) { vi = new VariableInfo[1]; vi[0] = new VariableInfo(var, "java.lang.String", true, VariableInfo.AT_BEGIN); } return vi; }
Example #17
Source File: JspContextWrapper.java From Tomcat8-Source-Read with MIT License | 5 votes |
/** * Copies the variables of the given scope from the virtual page scope of * this JSP context wrapper to the page scope of the invoking JSP context. * * @param scope * variable scope (one of NESTED, AT_BEGIN, or AT_END) */ private void copyTagToPageScope(int scope) { Iterator<String> iter = null; switch (scope) { case VariableInfo.NESTED: if (nestedVars != null) { iter = nestedVars.iterator(); } break; case VariableInfo.AT_BEGIN: if (atBeginVars != null) { iter = atBeginVars.iterator(); } break; case VariableInfo.AT_END: if (atEndVars != null) { iter = atEndVars.iterator(); } break; } while ((iter != null) && iter.hasNext()) { String varName = iter.next(); Object obj = getAttribute(varName); varName = findAlias(varName); if (obj != null) { invokingJspCtxt.setAttribute(varName, obj); } else { invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE); } } }
Example #18
Source File: TestGenerator.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("now", Bean.class.getCanonicalName(), true, VariableInfo.AT_END) }; }
Example #19
Source File: TestScriptingVariabler.java From tomcatsrc with Apache License 2.0 | 5 votes |
/** * Return information about the scripting variables to be created. */ @Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("Test", "java.lang.String", true, VariableInfo.AT_END) }; }
Example #20
Source File: FooTagExtraInfo.java From tomcatsrc with Apache License 2.0 | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("member", "String", true, VariableInfo.NESTED) }; }
Example #21
Source File: Node.java From packagedrone with Eclipse Public License 1.0 | 5 votes |
public void setScriptingVars(ArrayList<Object> vec, int scope) { switch (scope) { case VariableInfo.AT_BEGIN: this.atBeginScriptingVars = vec; break; case VariableInfo.AT_END: this.atEndScriptingVars = vec; break; case VariableInfo.NESTED: this.nestedScriptingVars = vec; break; } }
Example #22
Source File: JspContextWrapper.java From tomcatsrc with Apache License 2.0 | 5 votes |
/** * Copies the variables of the given scope from the virtual page scope of * this JSP context wrapper to the page scope of the invoking JSP context. * * @param scope * variable scope (one of NESTED, AT_BEGIN, or AT_END) */ private void copyTagToPageScope(int scope) { Iterator<String> iter = null; switch (scope) { case VariableInfo.NESTED: if (nestedVars != null) { iter = nestedVars.iterator(); } break; case VariableInfo.AT_BEGIN: if (atBeginVars != null) { iter = atBeginVars.iterator(); } break; case VariableInfo.AT_END: if (atEndVars != null) { iter = atEndVars.iterator(); } break; } while ((iter != null) && iter.hasNext()) { String varName = iter.next(); Object obj = getAttribute(varName); varName = findAlias(varName); if (obj != null) { invokingJspCtxt.setAttribute(varName, obj); } else { invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE); } } }
Example #23
Source File: JspContextWrapper.java From packagedrone with Eclipse Public License 1.0 | 5 votes |
/** * Copies the variables of the given scope from the virtual page scope of * this JSP context wrapper to the page scope of the invoking JSP context. * * @param scope variable scope (one of NESTED, AT_BEGIN, or AT_END) */ private void copyTagToPageScope(int scope) { Iterator<String> iter = null; switch (scope) { case VariableInfo.NESTED: if (nestedVars != null) { iter = nestedVars.iterator(); } break; case VariableInfo.AT_BEGIN: if (atBeginVars != null) { iter = atBeginVars.iterator(); } break; case VariableInfo.AT_END: if (atEndVars != null) { iter = atEndVars.iterator(); } break; } while ((iter != null) && iter.hasNext()) { String varName = iter.next(); Object obj = getAttribute(varName); varName = findAlias(varName); if (obj != null) { invokingJspCtxt.setAttribute(varName, obj); } else { invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE); } } }
Example #24
Source File: Node.java From tomcatsrc with Apache License 2.0 | 5 votes |
public void setScriptingVars(List<Object> vec, int scope) { switch (scope) { case VariableInfo.AT_BEGIN: this.atBeginScriptingVars = vec; break; case VariableInfo.AT_END: this.atEndScriptingVars = vec; break; case VariableInfo.NESTED: this.nestedScriptingVars = vec; break; } }
Example #25
Source File: Generator.java From tomcatsrc with Apache License 2.0 | 5 votes |
private void declareScriptingVars(Node.CustomTag n, int scope) { if (isFragment) { // No need to declare Java variables, if we inside a // JspFragment, because a fragment is always scriptless. return; } List<Object> vec = n.getScriptingVars(scope); if (vec != null) { for (int i = 0; i < vec.size(); i++) { Object elem = vec.get(i); if (elem instanceof VariableInfo) { VariableInfo varInfo = (VariableInfo) elem; if (varInfo.getDeclare()) { out.printin(varInfo.getClassName()); out.print(" "); out.print(varInfo.getVarName()); out.println(" = null;"); } } else { TagVariableInfo tagVarInfo = (TagVariableInfo) elem; if (tagVarInfo.getDeclare()) { String varName = tagVarInfo.getNameGiven(); if (varName == null) { varName = n.getTagData().getAttributeString( tagVarInfo.getNameFromAttribute()); } else if (tagVarInfo.getNameFromAttribute() != null) { // alias continue; } out.printin(tagVarInfo.getClassName()); out.print(" "); out.print(varName); out.println(" = null;"); } } } } }
Example #26
Source File: PagerTagExtraInfo.java From feilong-taglib with Apache License 2.0 | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData tagData){ //如果不设置 使用 ${feilongPagerHtml1 } 是正常的 //但是如果使用 <%=feilongPagerHtml1%> 会提示 feilongPagerHtml1 cannot be resolved to a variable String pagerHtmlAttributeName = defaultIfNullOrEmpty( tagData.getAttributeString("pagerHtmlAttributeName"), DEFAULT_PAGE_ATTRIBUTE_PAGER_HTML_NAME); VariableInfo variableInfo = new VariableInfo(pagerHtmlAttributeName, String.class.getName(), true, VariableInfo.AT_END); return ConvertUtil.toArray(variableInfo); }
Example #27
Source File: ScriptingVariabler.java From tomcatsrc with Apache License 2.0 | 5 votes |
@Override public void visit(Node.CustomTag n) throws JasperException { setScriptingVars(n, VariableInfo.AT_BEGIN); setScriptingVars(n, VariableInfo.NESTED); visitBody(n); setScriptingVars(n, VariableInfo.AT_END); }
Example #28
Source File: FooTagExtraInfo.java From tomcatsrc with Apache License 2.0 | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("member", "String", true, VariableInfo.NESTED) }; }
Example #29
Source File: FooTagExtraInfo.java From tomcatsrc with Apache License 2.0 | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("member", "String", true, VariableInfo.NESTED) }; }
Example #30
Source File: TestGenerator.java From tomcatsrc with Apache License 2.0 | 5 votes |
@Override public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo("now", Bean.class.getCanonicalName(), true, VariableInfo.AT_END) }; }