• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TagAttribute类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.faces.view.facelets.TagAttribute的典型用法代码示例。如果您正苦于以下问题:Java TagAttribute类的具体用法?Java TagAttribute怎么用?Java TagAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TagAttribute类属于javax.faces.view.facelets包,在下文中一共展示了TagAttribute类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: LiteralAccessKeyMetadata

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public LiteralAccessKeyMetadata(
  Method mainMethod, 
  Method accessKeyMethod, 
  TagAttribute attribute)
{
  _mainMethod = mainMethod;
  _accessKeyMethod = accessKeyMethod;

  String text = attribute.getValue();

  int accessKeyIndex = StringUtils.getMnemonicIndex(text);
  if (accessKeyIndex != StringUtils.MNEMONIC_INDEX_NONE)
  {
    _accessKey = Character.valueOf(text.charAt(accessKeyIndex + 1));
    text = StringUtils.stripMnemonic(text);
  }
  else
  {
    _accessKey = null;
  }
  
  _text = text;
  _attribute = attribute;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:25,代码来源:AccessKeyPropertyTagRule.java


示例7: 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


示例8: MetaRulesetImpl

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public MetaRulesetImpl(Tag tag, Class type) {
    this.tag = tag;
    this.type = type;
    this.attributes = new HashMap();
    this.mappers = new ArrayList();
    this.rules = new ArrayList();

    // setup attributes
    TagAttribute[] attrs = this.tag.getAttributes().getAll();
    for (int i = 0; i < attrs.length; i++) {
        attributes.put(attrs[i].getLocalName(), attrs[i]);
    }

    // add default rules
    this.rules.add(BeanPropertyTagRule.Instance);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:MetaTagHandler.java


示例9: setAttr

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public void setAttr(FaceletContext ctx, String name, TagAttribute attr, UIComponent target) {
		String value = attr.getValue(ctx);
		target.getAttributes().put(name, value);


//		value = new Object[] { ctx.getExpressionFactory().coerceToType(str, method.getParameterTypes()[0]) };
//
//		try {
//			method.invoke(instance, this.value);
//		} catch (InvocationTargetException e) {
//			throw new TagAttributeException(this.attribute, e.getCause());
//		} catch (Exception e) {
//			throw new TagAttributeException(this.attribute, e);
//		}


//		if (targetExpr != null) {
//			ValueExpression srcExpr = attr.getValueExpression(ctx, targetExpr.getType(elContext));
//			targetExpr.setValue(elContext, value);
//		} else {
//			ExpressionFactory exprFactory = ctx.getFacesContext().getApplication().getExpressionFactory();
//			targetExpr = exprFactory.createValueExpression(elContext, "#{" + name + "}", value.getClass());
//			target.setValueExpression(name, targetExpr);
//			targetExpr.setValue(elContext, value);
//		}
	}
 
开发者ID:edvin,项目名称:tornadofaces,代码行数:27,代码来源:Input.java


示例10: containsAdvancesSearchExpression

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
private boolean containsAdvancesSearchExpression(Tag tag, String attribute) {
	boolean changeIt = false;
	TagAttribute forAttribute = tag.getAttributes().get(attribute);
	if (null != forAttribute) {
		String value = forAttribute.getValue();
		if (value.contains("*"))
			changeIt = true;
		if (value.contains("@"))
			changeIt = true;
		if (value.equals("@form") || value.equals("@none") || value.equals("@this") || value.equals("@all"))
			changeIt = false;
		if (value.startsWith("#{"))
			changeIt = false;
	}
	return changeIt;
}
 
开发者ID:TheCoder4eu,项目名称:BootsFaces-OSP,代码行数:17,代码来源:SearchExpressionsTagDecorator.java


示例11: containsAdvancesSearchExpression

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
private boolean containsAdvancesSearchExpression(Tag tag, String attribute) {
	boolean changeIt=false;
	TagAttribute forAttribute = tag.getAttributes().get(attribute);
	if (null != forAttribute) {
		String value = forAttribute.getValue();
		if (value.contains("*"))
			changeIt=true;
		if (value.contains("@"))
			changeIt=true;
		if (value.equals("@form") || value.equals("@none") || value.equals("@this") || value.equals("@all"))
			changeIt=false;
		if (value.startsWith("#{"))
			changeIt=false;
	}
	return changeIt;
}
 
开发者ID:TheCoder4eu,项目名称:BootsFaces-OSP,代码行数:17,代码来源:BootsFacesTagDecorator.java


示例12: decorate

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public Tag decorate(Tag tag) {
			if (arbiterAttributeName == null) {
				// no arbiter
				return convertTag(tag, namespace, localName);
			}

			TagAttribute arbiterAttribute = tag.getAttributes().get(arbiterAttributeNamespace, arbiterAttributeName);

			String myLocalName=null;
			if (arbiterAttribute == null) {
				// no arbiter
//				return null;
			} else {

			myLocalName = additionalMappings.get(arbiterAttribute.getValue());
			}

			if (myLocalName == null) {
				myLocalName = this.localName;
			}

			return convertTag(tag, namespace, myLocalName);
		}
 
开发者ID:TheCoder4eu,项目名称:BootsFaces-OSP,代码行数:24,代码来源:RelaxedTagDecorator.java


示例13: convertTag

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
protected Tag convertTag(Tag tag, Namespace namespace, String localName) {
	Location location = tag.getLocation();
	String ns = namespace.uri;
	String qName = namespace.name() + ":" + localName;

	TagAttributes attributes = convertAttributes(tag.getAttributes(), tag);

	Tag converted = new Tag(location, ns, localName, qName, attributes);

	for (TagAttribute tagAttribute : attributes.getAll()) {
		// set the correct tag
		tagAttribute.setTag(converted);
	}

	return converted;
}
 
开发者ID:TheCoder4eu,项目名称:BootsFaces-OSP,代码行数:17,代码来源:RelaxedTagDecorator.java


示例14: LiteralPropertyMetadata

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public LiteralPropertyMetadata(Method method, TagAttribute attribute,
                               boolean adjustToEnd)
{
  _method = method;
  _attribute = attribute;
  _adjustToEnd = adjustToEnd;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:8,代码来源:DatePropertyTagRule.java


示例15: AccessKeyMetadata

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public AccessKeyMetadata(
  String mainMethodName, 
  TagAttribute attribute)
{
  _mainMethodName = mainMethodName;
  _attribute = attribute;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:8,代码来源:AccessKeyPropertyTagRule.java


示例16: 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


示例17: alias

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public MetaRuleset alias(String attribute, String property) {
    assert (attribute != null);
    assert (property != null);
    TagAttribute attr =
        (TagAttribute)this.attributes.remove(attribute);
    if (attr != null) {
        this.attributes.put(property, attr);
    }
    return this;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:11,代码来源:MetaTagHandler.java


示例18: MethodBindingMetadata

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public MethodBindingMetadata(Method method, TagAttribute attribute,
                             Class returnType, Class[] paramList) {
    _method = method;
    _attribute = attribute;
    _paramList = paramList;
    _returnType = returnType;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:8,代码来源:MethodRule.java


示例19: MethodExpressionMetadata

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
public MethodExpressionMetadata(Method method, TagAttribute attribute,
                                Class returnType, Class[] paramList) {
    _method = method;
    _attribute = attribute;
    _paramList = paramList;
    _returnType = returnType;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:8,代码来源:MethodRule.java


示例20: getAttributeValue

import javax.faces.view.facelets.TagAttribute; //导入依赖的package包/类
private String getAttributeValue(FaceletContext faceletContext, TagAttribute tagAttribute, boolean evaluate) {
	String value = null;
	if (tagAttribute != null) {
		if (evaluate) {
			ValueExpression expression = tagAttribute.getValueExpression(faceletContext, String.class);
			value = (String) expression.getValue(faceletContext.getFacesContext().getELContext());
		}
		else {
			value = tagAttribute.getValue();
		}
	}
	return value;
}
 
开发者ID:joinfaces,项目名称:joinfaces,代码行数:14,代码来源:AuthorizeFaceletsTag.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DbxDownloader类代码示例发布时间:2022-05-22
下一篇:
Java Folder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap