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


Java TagAttribute.getValue方法代码示例

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


在下文中一共展示了TagAttribute.getValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

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

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

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

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

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

示例6: JKTagAttributeWrapper

import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
/**
 * Instantiates a new JK tag attribute wrapper.
 *
 * @param tagAttribute
 *            the tag attribute
 */
public JKTagAttributeWrapper(final TagAttribute tagAttribute) {
	this.tagAttribute = tagAttribute;
	this.qName = tagAttribute.getQName();
	this.value = tagAttribute.getValue();
	this.localName = tagAttribute.getLocalName();
	this.namespace = tagAttribute.getNamespace();
	this.location = tagAttribute.getLocation();
}
 
开发者ID:kiswanij,项目名称:jk-faces,代码行数:15,代码来源:JKTagAttributeWrapper.java

示例7: convertTagAttribute

import javax.faces.view.facelets.TagAttribute; //导入方法依赖的package包/类
protected TagAttribute convertTagAttribute(TagAttribute attribute) {
	Location location = attribute.getLocation();
	String ns = attribute.getNamespace();
	String myLocalName = attribute.getLocalName();
	String qName;
	String value = attribute.getValue();

	if (Namespace.jsf.uri.equals(attribute.getNamespace())) {
		// make this a component attribute
		qName = myLocalName;
		ns = "";
	} else {
		if (ns.length() != 0 && !ns.equals(attribute.getTag().getNamespace())) {
			// the attribute has a different namespace than the tag.
			// preserve it.
			return attribute;
		}
		if (attribute.getLocalName().equals(otherHtmlIdAttribute)) {
			// special case for input name
			qName = "id";
			myLocalName = "id";
		} else {
			// make this a pass through attribute
			qName = "h:" + myLocalName;
			ns = Namespace.h.uri;
		}
	}
	return TagAttributeUtilities.createTagAttribute(location, ns, myLocalName, qName, value);
}
 
开发者ID:TheCoder4eu,项目名称:BootsFaces-OSP,代码行数:30,代码来源:RelaxedTagDecorator.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.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。