本文整理了Java中com.jwebmp.core.base.html.Body.getVariablesAll()
方法的一些代码示例,展示了Body.getVariablesAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.getVariablesAll()
方法的具体详情如下:
包路径:com.jwebmp.core.base.html.Body
类名称:Body
方法名:getVariablesAll
暂无
代码示例来源:origin: com.jwebmp.jre11/jwebmp-core
/**
* Adds the variables in the application to the collection
*/
@SuppressWarnings("unchecked")
private void addVariablesScriptToPage()
{
StringBuilder variablesScriptBuilder = new StringBuilder();
for (Object o : getBody().getVariablesAll())
{
String var = (String) o;
variablesScriptBuilder.append("var ")
.append(var)
.append(StaticStrings.STRING_SEMICOLON);
}
if (variablesScriptBuilder.length() > 0)
{
Script variablesScript = new Script();
variablesScript.setID("variables");
variablesScript.setNewLineForRawText(true);
variablesScript.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT);
variablesScript.setText(variablesScriptBuilder.toString());
if (!getHead().getChildren()
.contains(variablesScript))
{
getHead().add(variablesScript);
}
}
}
}
代码示例来源:origin: com.jwebmp.jre10/jwebmp-core
/**
* Adds the variables in the application to the collection
*/
@SuppressWarnings("unchecked")
private void addVariablesScriptToPage()
{
StringBuilder variablesScriptBuilder = new StringBuilder();
for (Object o : getBody().getVariablesAll())
{
String var = (String) o;
variablesScriptBuilder.append("var ")
.append(var)
.append(StaticStrings.STRING_SEMICOLON);
}
if (variablesScriptBuilder.length() > 0)
{
Script variablesScript = new Script();
variablesScript.setID("variables");
variablesScript.setNewLineForRawText(true);
variablesScript.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT);
variablesScript.setText(variablesScriptBuilder.toString());
if (!getHead().getChildren()
.contains(variablesScript))
{
getHead().add(variablesScript);
}
}
}
}
代码示例来源:origin: com.jwebmp/jwebmp-core
/**
* Adds the variables in the application to the collection
*/
@SuppressWarnings("unchecked")
private void addVariablesScriptToPage()
{
StringBuilder variablesScriptBuilder = new StringBuilder();
for (Object o : getBody().getVariablesAll())
{
String var = (String) o;
variablesScriptBuilder.append("var ")
.append(var)
.append(StaticStrings.STRING_SEMICOLON);
}
if (variablesScriptBuilder.length() > 0)
{
Script variablesScript = new Script();
variablesScript.setID("variables");
variablesScript.setNewLineForRawText(true);
variablesScript.addAttribute(ScriptAttributes.Type, StaticStrings.HTML_HEADER_JAVASCRIPT);
variablesScript.setText(variablesScriptBuilder.toString());
if (!getHead().getChildren()
.contains(variablesScript))
{
getHead().add(variablesScript);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!