当前位置: 首页>>代码示例>>Java>>正文


Java TagAttribute.isLiteral方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:DatePropertyTagRule.java

示例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;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:TimezonePropertyTagRule.java

示例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;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:ValueExpressionTagRule.java

示例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;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:21,代码来源:StringArrayPropertyTagRule.java

示例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;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:LocalePropertyTagRule.java

示例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;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:24,代码来源:AccessKeyPropertyTagRule.java

示例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;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:16,代码来源:MetaTagHandler.java

示例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;
}
 
开发者ID:markash,项目名称:carat-web,代码行数:11,代码来源:PermissionTagHandler.java


注:本文中的javax.faces.view.facelets.TagAttribute.isLiteral方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。