本文整理匯總了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);
}
}
}