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


Java ValueBinding.getValue方法代码示例

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


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

示例1: select

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public String select()
{
  FacesContext context = FacesContext.getCurrentInstance();
  // The tableSelectOne is marked as required; so there'd better
  // be a selected row - an exception will result here if there
  // isn't.  Is there some better code?
  Iterator<Object> iterator = _table.getSelectedRowKeys().iterator();
  Object rowKey = iterator.next();
  Object oldRowKey = _table.getRowKey();
  _table.setRowKey(rowKey);
  ValueBinding binding = context.getApplication().
    createValueBinding("#{row.symbol}");
  Object value = binding.getValue(context);
  RequestContext.getCurrentInstance().returnFromDialog(value, null);
  _table.setRowKey(oldRowKey);

  return null;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:20,代码来源:PeriodicDialogBean.java

示例2: select

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public String select() {
    try{
    FacesContext context = FacesContext.getCurrentInstance();
    Iterator<Object> iterator = _table.getSelectedRowKeys().iterator();
    Object rowKey = iterator.next();
    Object oldRowKey = _table.getRowKey();
    _table.setRowKey(rowKey);
    ValueBinding binding = context.getApplication().
            createValueBinding("#{row.name}");
    Object value = binding.getValue(context);
    RequestContext.getCurrentInstance().returnFromDialog(value, null);
    _table.setRowKey(oldRowKey);
    }
    catch (NoSuchElementException e){}

    return null;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:19,代码来源:InputListOfValuesBean.java

示例3: getInstance

import javax.faces.el.ValueBinding; //导入方法依赖的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;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:29,代码来源:JsfCreator.java

示例4: getInstance

import javax.faces.el.ValueBinding; //导入方法依赖的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;
}
 
开发者ID:directwebremoting,项目名称:dwr,代码行数:30,代码来源:JsfCreator.java

示例5: getNumDataItemsForToggle

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
private int getNumDataItemsForToggle(FacesContext context, UIComponent component) {
	int numDataItems = 0;
	ValueBinding gbItemsBinding = component.getValueBinding("value");
	List gbItemList = (List)gbItemsBinding.getValue(context);
	if (gbItemList != null && !gbItemList.isEmpty()) {
		numDataItems = gbItemList.size();
	}
	return numDataItems;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:10,代码来源:GradebookItemTableRenderer.java

示例6: getFieldOrBinding

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
protected Object getFieldOrBinding(Object field, String bindingName) {
	Object retVal = null;
	if (field != null) {
		retVal = field;
	} else {
		ValueBinding binding = getValueBinding(bindingName);
		if (binding != null) {
			retVal = binding.getValue(getFacesContext());
		}
	}
	return retVal;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:13,代码来源:IteratorComponent.java

示例7: getAttribute

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
/**
 * Return the attribute value - handles getting the value from a
 * ValueBinding if necessary. This is necessary because of a difference in
 * the Sun JSF RI versus the MyFaces RI. The Sun RI
 * component.getAttributes().get(attrName) will automatically return value
 * bindings, whereas the MyFaces implmentation requires getting values from
 * ValueBinding seperately.
 */
public static Object getAttribute(FacesContext context, UIComponent component, String name)
{
    // first check the attributes
    Object ret = component.getAttributes().get(name);
    if (ret != null)
        return ret;

    // next check the value bindings
    ValueBinding vb = component.getValueBinding(name);
    if (vb != null)
        ret = vb.getValue(context);

    return ret;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:23,代码来源:RendererUtil.java

示例8: getBean

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
public PhaseAware getBean() {
	PhaseAware bean = null;
	ValueBinding vb = getValueBinding("bean");
	if (vb != null) {
		bean = (PhaseAware) vb.getValue(getFacesContext());
	}
	if (log.isDebugEnabled()) log.debug("getBean " + bean);
	return bean;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:10,代码来源:FlowState.java

示例9: get

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
/**
 *
 * @param context FacesContext
 * @param component UIComponent
 * @param name String
 * @return Object
 */
private static Object get(FacesContext context, UIComponent component,
  String name)
{
  ValueBinding binding = component.getValueBinding(name);
  if (binding != null)
  {
    return binding.getValue(context);
  }
  else
  {
    return component.getAttributes().get(name);
  }
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:21,代码来源:PagerRenderer.java

示例10: returnValueBindingAsString

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
public String returnValueBindingAsString(String attr) {
	ValueBinding valueBinding = getValueBinding(attr);	
	if (valueBinding != null)
		return (String)valueBinding.getValue(this.getFacesContext());
	else
		return null;			
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:8,代码来源:CustomSelectOneRadio.java

示例11: getNavbarLogoStyleClass

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
public String getNavbarLogoStyleClass() {
    if(navbarLogoStyleClass!=null) {
        return navbarLogoStyleClass;
    }
    ValueBinding vb = getValueBinding("navbarLogoStyleClass"); // $NON-NLS-1$
    if(vb!=null) {
        return (String)vb.getValue(getFacesContext());
    }
    return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:SimpleResponsiveApplicationConfiguration.java

示例12: getTitle

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
public String getTitle() {
    if (null != this.title) {
        return this.title;
    }
    ValueBinding _vb = getValueBinding("title"); //$NON-NLS-1$
    if (_vb != null) {
        return (java.lang.String) _vb.getValue(FacesContext.getCurrentInstance());
    } else {
        return null;
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:12,代码来源:UIDojoFormWidgetBase.java

示例13: isUseHash

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
public boolean isUseHash() {
    if (null != this.useHash) {
        return this.useHash;
    }
    ValueBinding _vb = getValueBinding("useHash"); //$NON-NLS-1$
    if (_vb != null) {
        Boolean val = (java.lang.Boolean) _vb.getValue(FacesContext.getCurrentInstance());
        if(val!=null) {
            return val;
        }
    } 
    return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:14,代码来源:UIDynamicContent.java

示例14: isSelectable

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
public boolean isSelectable() {
	if (null != this.selectable) {
		return this.selectable;
	}
	ValueBinding _vb = getValueBinding("selectable"); //$NON-NLS-1$
	if (_vb != null) {
		Boolean val = (java.lang.Boolean) _vb.getValue(getFacesContext());
		if(val!=null) {
			return val;
		}
	}
	return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:14,代码来源:UIDojoDataGrid.java

示例15: getTimeout

import javax.faces.el.ValueBinding; //导入方法依赖的package包/类
public int getTimeout() {
    if (null != this.timeout) {
        return this.timeout;
    }
    ValueBinding _vb = getValueBinding("timeout"); //$NON-NLS-1$
    if (_vb != null) {
        Number val = (Number) _vb.getValue(FacesContext.getCurrentInstance());
        if(val!=null) {
            return val.intValue();
        }
    } 
    return 0;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:14,代码来源:DataAccessorBlockSource.java


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