本文整理汇总了Java中javax.faces.el.VariableResolver类的典型用法代码示例。如果您正苦于以下问题:Java VariableResolver类的具体用法?Java VariableResolver怎么用?Java VariableResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VariableResolver类属于javax.faces.el包,在下文中一共展示了VariableResolver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValue
import javax.faces.el.VariableResolver; //导入依赖的package包/类
@Override
public Object getValue(FacesContext context)
{
String varName;
int period = _expression.indexOf('.');
if (period < 0)
varName = _expression;
else
varName = _expression.substring(0, period);
VariableResolver vr = context.getApplication().getVariableResolver();
Object var = vr.resolveVariable(context, varName);
if (period < 0)
return var;
return _resolveProperty(context, var, _expression.substring(period + 1));
}
示例2: getInstance
import javax.faces.el.VariableResolver; //导入依赖的package包/类
public Object getInstance() throws InstantiationException
{
FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext == null)
{
log.error("Object " + getManagedBeanName() + " cannot be created since the faces context is null");
return null;
}
Application application = facesContext.getApplication();
Object resolvedObject = null;
if (isVBExpression(getManagedBeanName()))
{
ValueBinding vb = application.createValueBinding(getManagedBeanName());
if (vb != null)
{
resolvedObject = vb.getValue(facesContext);
}
}
else
{
VariableResolver resolver = application.getVariableResolver();
resolvedObject = resolver.resolveVariable(facesContext, getManagedBeanName());
}
return resolvedObject;
}
示例3: getInstance
import javax.faces.el.VariableResolver; //导入依赖的package包/类
@Override
public Object getInstance() throws InstantiationException
{
FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext == null)
{
log.error("Object " + getManagedBeanName() + " cannot be created since the faces context is null");
return null;
}
Application application = facesContext.getApplication();
Object resolvedObject = null;
if (isVBExpression(getManagedBeanName()))
{
ValueBinding vb = application.createValueBinding(getManagedBeanName());
if (vb != null)
{
resolvedObject = vb.getValue(facesContext);
}
}
else
{
VariableResolver resolver = application.getVariableResolver();
resolvedObject = resolver.resolveVariable(facesContext, getManagedBeanName());
}
return resolvedObject;
}
示例4: getTableOfContents
import javax.faces.el.VariableResolver; //导入依赖的package包/类
/**
* get table of contents
* @return Returns the tableOfContents.
*/
public TableOfContents getTableOfContents()
{
if (tableOfContents == null)
{
FacesContext facesContext = FacesContext.getCurrentInstance();
VariableResolver resolver = facesContext.getApplication()
.getVariableResolver();
tableOfContents = ((TableOfContentsTool) resolver.resolveVariable(
facesContext, "TableOfContentsTool")).getTableOfContents();
}
return tableOfContents;
}
示例5: resolveManagedBean
import javax.faces.el.VariableResolver; //导入依赖的package包/类
/**
* Resolves a managed bean variable.
* @param managedBeanName the configured name of the managed bean
* @return the located object (can be null)
*/
public Object resolveManagedBean(String managedBeanName) {
Object oBean = null;
String sn = Val.chkStr(managedBeanName);
FacesContext fc = getFacesContext();
if ((sn.length() > 0) && (fc != null) && (fc.getApplication() != null)) {
VariableResolver resolver = fc.getApplication().getVariableResolver();
if (resolver != null) {
oBean = resolver.resolveVariable(fc,sn);
}
}
return oBean;
}
示例6: getVariableResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
@Override
public VariableResolver getVariableResolver() {
throw new UnsupportedOperationException();
}
示例7: setVariableResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
@Override
public void setVariableResolver(VariableResolver arg0) {
throw new UnsupportedOperationException();
}
示例8: getVariableResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
@Override
public VariableResolver getVariableResolver()
{
return _variableResolver;
}
示例9: setVariableResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
@Override
public void setVariableResolver(VariableResolver resolver)
{
_variableResolver = resolver;
}
示例10: MELResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
public MELResolver(VariableResolver vr, PropertyResolver pr)
{
_vr = vr;
_pr = pr;
}
示例11: MockELResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
public MockELResolver(VariableResolver vr, PropertyResolver pr)
{
_vr = vr;
_pr = pr;
}
示例12: SpringBeanVariableResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
public SpringBeanVariableResolver(VariableResolver originalVariableResolver) {
super(originalVariableResolver);
}
示例13: getCurrentInstance
import javax.faces.el.VariableResolver; //导入依赖的package包/类
/**
* Gets current instance of the controller.
* @return current instance of the controller
*/
public static LiveDataController getCurrentInstance() {
FacesContext fc = FacesContext.getCurrentInstance();
VariableResolver vr = fc.getApplication().getVariableResolver();
return (LiveDataController) vr.resolveVariable(fc, "LiveDataController");
}
示例14: GuiceVariableResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
public GuiceVariableResolver(VariableResolver resolver){
this.resolver=resolver;
}
示例15: AnnotatedBeanResolver
import javax.faces.el.VariableResolver; //导入依赖的package包/类
public AnnotatedBeanResolver(final VariableResolver resolver) {
delegate_ = resolver;
}