本文整理汇总了Java中javax.faces.view.facelets.TagAttribute.isLiteral方法的典型用法代码示例。如果您正苦于以下问题:Java TagAttribute.isLiteral方法的具体用法?Java TagAttribute.isLiteral怎么用?Java TagAttribute.isLiteral使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.faces.view.facelets.TagAttribute
的用法示例。
在下文中一共展示了TagAttribute.isLiteral方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applyRule
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
public Metadata applyRule(String name, TagAttribute attribute,
MetadataTarget meta)
{
if (meta.getPropertyType(name) == _DATE_TYPE && attribute.isLiteral())
{
Method m = meta.getWriteMethod(name);
// if the property is writable
if (m != null)
{
return new LiteralPropertyMetadata(m, attribute, _MAX_VALUE.equals(name));
}
}
return null;
}
示例2: applyRule
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
public Metadata applyRule(String name, TagAttribute attribute,
MetadataTarget meta)
{
if (meta.getPropertyType(name) == _TIMEZONE_TYPE && attribute.isLiteral())
{
Method m = meta.getWriteMethod(name);
// if the property is writable
if (m != null)
{
return new LiteralPropertyMetadata(m, attribute);
}
}
return null;
}
示例3: applyRule
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
public Metadata applyRule(String name, TagAttribute attribute,
MetadataTarget meta)
{
// This rule should be used only for objects implementing setValueExpression().
if (!attribute.isLiteral())
{
Class type = meta.getPropertyType(name);
if (type == null) {
type = Object.class;
}
return new ValueExpressionMetadata(name, type, attribute);
}
return null;
}
示例4: applyRule
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
@Override
public Metadata applyRule(
String name,
TagAttribute attribute,
MetadataTarget meta)
{
// Leave expressions to the underlying code
if ((meta.getPropertyType(name) == _STRING_ARRAY_TYPE) &&
attribute.isLiteral())
{
Method m = meta.getWriteMethod(name);
// if the property is writable
if (m != null)
{
return new LiteralPropertyMetadata(m, attribute);
}
}
return null;
}
示例5: applyRule
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
public Metadata applyRule(String name, TagAttribute attribute,
MetadataTarget meta)
{
if (meta.getPropertyType(name) == _LOCALE_TYPE && attribute.isLiteral())
{
Method m = meta.getWriteMethod(name);
// if the property is writable
if (m != null)
{
return new LiteralPropertyMetadata(m, attribute);
}
}
return null;
}
示例6: applyRule
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
@Override
public Metadata applyRule(
String name,
TagAttribute attribute,
MetadataTarget meta)
{
if (name.endsWith("AndAccessKey"))
{
String mainProperty = name.substring(0, name.length() - "AndAccessKey".length());
Method mainM = meta.getWriteMethod(mainProperty);
Method accessKeyM = meta.getWriteMethod("accessKey");
// if the property is writable
if ((mainM != null) && (accessKeyM != null))
{
if (attribute.isLiteral())
return new LiteralAccessKeyMetadata(mainM, accessKeyM, attribute);
else
return new AccessKeyMetadata(mainProperty, attribute);
}
}
return null;
}
示例7: applyRule
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
public Metadata applyRule(String name, TagAttribute attribute,
MetadataTarget meta) {
Method m = meta.getWriteMethod(name);
// if the property is writable
if (m != null) {
if (attribute.isLiteral()) {
return new LiteralPropertyMetadata(m, attribute);
} else {
return new DynamicPropertyMetadata(m, attribute);
}
}
return null;
}
示例8: getAttrValue
import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
private String getAttrValue(FaceletContext ctx, TagAttribute attr) {
String value;
if (attr.isLiteral()) {
value = attr.getValue(ctx);
} else {
ValueExpression expression = attr.getValueExpression(ctx, String.class);
value = (String) expression.getValue(ctx);
}
return value;
}