本文整理汇总了Java中javax.faces.view.facelets.FaceletException类的典型用法代码示例。如果您正苦于以下问题:Java FaceletException类的具体用法?Java FaceletException怎么用?Java FaceletException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FaceletException类属于javax.faces.view.facelets包,在下文中一共展示了FaceletException类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import javax.faces.view.facelets.FaceletException; //导入依赖的package包/类
public void apply(FaceletContext faceletContext,
UIComponent parent) throws FaceletException, ELException
{
if (ComponentHandler.isNew(parent))
{
// =-=AEW Couldn't this be cached?
ValueExpression fromExpression = _from.getValueExpression(faceletContext,
Object.class);
ValueExpression toExpression= _to.getValueExpression(faceletContext,
Object.class);
ActionSource actionSource= (ActionSource) parent;
SetActionListener listener = new SetActionListener();
listener.setValueExpression("from", fromExpression);
listener.setValueExpression("to", toExpression);
actionSource.addActionListener(listener);
}
}
示例2: apply
import javax.faces.view.facelets.FaceletException; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public void apply(FaceletContext faceletContext,
UIComponent parent) throws IOException, FacesException, FaceletException, ELException
{
if(ComponentHandler.isNew(parent))
{
ActionSource actionSource = (ActionSource)parent;
ReturnActionListener listener = new ReturnActionListener();
if (_value != null)
{
ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
listener.setValueExpression(ReturnActionListener.VALUE_KEY,valueExp);
}
actionSource.addActionListener(listener);
}
}
示例3: decorate
import javax.faces.view.facelets.FaceletException; //导入依赖的package包/类
public Tag decorate(Tag tag) {
String ns = tag.getNamespace();
// we only handle html tags!
if (!("".equals(ns) || "http://www.w3.org/1999/xhtml".equals(ns))) {
throw new FaceletException("Elements with namespace " + ns + " may not have attributes in namespace "
+ Namespace.jsf.uri + "." + " Namespace " + Namespace.jsf.uri
+ " is intended for otherwise non-JSF-aware markup, such as <input type=\"text\" jsf:id >"
+ " It is not valid to have <h:commandButton jsf:id=\"button\" />.");
}
for (Mapper mapper : Mapper.values()) {
if (tag.getLocalName().equals(mapper.name())) {
return mapper.elementConverter.decorate(tag);
}
}
return null;
}
示例4: apply
import javax.faces.view.facelets.FaceletException; //导入依赖的package包/类
public void apply(FaceletContext faceletContext,
UIComponent parent) throws IOException, FacesException, FaceletException, ELException
{
if(ComponentHandler.isNew(parent))
{
ActionSource actionSource = (ActionSource)parent;
ResetActionListener listener = new ResetActionListener();
actionSource.addActionListener(listener);
}
}
示例5: apply
import javax.faces.view.facelets.FaceletException; //导入依赖的package包/类
@Override
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, ELException
{
VariableMapper varMapper = ctx.getVariableMapper();
if (value != null)
{
String strValue = value.getValue();
if (strValue != null && !strValue.isEmpty() && varMapper.resolveVariable(strValue) != null)
{
nextHandler.apply(ctx, parent);
}
}
}