本文整理汇总了Java中javax.servlet.jsp.tagext.VariableInfo.NESTED属性的典型用法代码示例。如果您正苦于以下问题:Java VariableInfo.NESTED属性的具体用法?Java VariableInfo.NESTED怎么用?Java VariableInfo.NESTED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.servlet.jsp.tagext.VariableInfo
的用法示例。
在下文中一共展示了VariableInfo.NESTED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getScriptingVars
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;
}
示例2: getScriptingVars
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;
}
示例3: getScriptingVars
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;
}
示例4: getVariableInfo
/** 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;
}
示例5: getVariableInfo
@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;
}
示例6: getVariableInfo
@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;
}
示例7: operateNestedVariables
protected void operateNestedVariables(NestedVariableOperator operator) {
if (Boolean.FALSE.equals(_nestedVariableExists) == false) {
TLDScriptingVariableInfo variableInfo =
getTLDScriptingVariableInfo();
if (variableInfo != null) {
AttributeScope pageScope =
CycleUtil.getServiceCycle().getPageScope();
boolean firstHit = true;
for (Iterator it = variableInfo.variableInfos();
it.hasNext(); ) {
VariableInfo info = (VariableInfo)it.next();
if (info.getScope() == VariableInfo.NESTED) {
_nestedVariableExists = Boolean.TRUE;
operator.operate(pageScope, info, firstHit);
firstHit = false;
}
}
}
if (_nestedVariableExists == null) {
_nestedVariableExists = Boolean.FALSE;
}
}
}
示例8: copyTagToPageScope
/**
* 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);
}
}
}
示例9: setScriptingVars
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;
}
}
示例10: copyTagToPageScope
/**
* 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);
}
}
}
示例11: copyTagToPageScope
/**
* 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 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 = (String) iter.next();
Object obj = getAttribute(varName);
varName = findAlias(varName);
if (obj != null) {
invokingJspCtxt.setAttribute(varName, obj);
} else {
invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
}
}
}
示例12: getVariableInfo
/**
* Return information about the scripting variables to be created.
*/
public VariableInfo[] getVariableInfo(TagData data) {
// prime this array with the maximum potential variables.
// will be arraycopy'd out to the final array based on results.
VariableInfo[] variables = new VariableInfo[2];
// counter for matched results.
int counter = 0;
/* id : object of the current iteration */
String id = data.getAttributeString("id");
String type = data.getAttributeString("type");
if (id != null) {
if (type == null) {
type = "java.lang.Object";
}
variables[counter++] = new VariableInfo(data.getAttributeString("id"),
type, true,
VariableInfo.NESTED);
}
/* indexId : number value of the current iteration */
String indexId = data.getAttributeString("indexId");
if (indexId != null) {
variables[counter++] = new VariableInfo(indexId, "java.lang.Integer",
true, VariableInfo.NESTED);
}
/* create returning array, and copy results */
VariableInfo[] result;
if (counter > 0) {
result = new VariableInfo[counter];
System.arraycopy(variables, 0, result, 0, counter);
} else {
result = new VariableInfo[0];
}
return result;
}
示例13: getVariableInfo
/**
* Return information about the scripting variables to be created.
*/
public VariableInfo[] getVariableInfo(TagData data) {
String type = "java.lang.String";
return new VariableInfo[] {
new VariableInfo(data.getAttributeString("id"),
type,
true,
VariableInfo.NESTED)
};
}
示例14: getVariableInfo
public VariableInfo [] getVariableInfo(TagData data) {
String name = data.getAttributeString("name");
String id = data.getAttributeString("id");
try {
Class.forName(Localization.ROOT + name);
return new VariableInfo[] {
new VariableInfo(id == null ? BundleTag.DEFAULT_ID : id, Localization.ROOT + name, true, VariableInfo.NESTED)
};
} catch (ClassNotFoundException e) {
return new VariableInfo[] {
new VariableInfo(id == null ? BundleTag.DEFAULT_ID : id, name, true, VariableInfo.NESTED)
};
}
}
示例15: getVariableInfo
@Override
public VariableInfo[] getVariableInfo(TagData data) {
return new VariableInfo[]
{
new VariableInfo("member",
"String",
true,
VariableInfo.NESTED)
};
}