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


Java ValueChangeListener类代码示例

本文整理汇总了Java中javax.faces.event.ValueChangeListener的典型用法代码示例。如果您正苦于以下问题:Java ValueChangeListener类的具体用法?Java ValueChangeListener怎么用?Java ValueChangeListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: addValueChangeListener

import javax.faces.event.ValueChangeListener; //导入依赖的package包/类
public void addValueChangeListener(final ValueChangeListener listener) {

		getBind().addValueChangeListener(listener);
		getBind().setImmediate(true);
		ajax = new AjaxBehavior();
		ajax.setTransient(true);
		ajax.setRender(getValueChangeRender());
		getBind().addClientBehavior("valueChange", ajax);
	}
 
开发者ID:fpuna-cia,项目名称:karaku,代码行数:10,代码来源:ComboBoxField.java

示例2: addValueChangeListener

import javax.faces.event.ValueChangeListener; //导入依赖的package包/类
@Override
public void addValueChangeListener(ValueChangeListener listener) {
    throw new UnsupportedOperationException();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:5,代码来源:UIInputStub.java

示例3: getValueChangeListeners

import javax.faces.event.ValueChangeListener; //导入依赖的package包/类
@Override
public ValueChangeListener[] getValueChangeListeners() {
    throw new UnsupportedOperationException();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:5,代码来源:UIInputStub.java

示例4: removeValueChangeListener

import javax.faces.event.ValueChangeListener; //导入依赖的package包/类
@Override
public void removeValueChangeListener(ValueChangeListener listener) {
    throw new UnsupportedOperationException();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:5,代码来源:UIInputStub.java

示例5: doTestProcessValidations

import javax.faces.event.ValueChangeListener; //导入依赖的package包/类
/**
 * Tests the process-validations lifecycle phase.
 */
protected void doTestProcessValidations(
  UIViewRoot  root,
  UIComponent component,
  Object      submittedValue,
  Object      convertedValue)
{

  Mock mockRenderKit = getMockRenderKitWrapper().getMock();

  Mock mockRenderer = mock(Renderer.class);
  Renderer renderer = (Renderer) mockRenderer.proxy();
  mockRenderKit.stubs().method("getRenderer").will(returnValue(renderer));

  Mock mockConverter = mock(Converter.class);
  Converter converter = (Converter) mockConverter.proxy();

  Mock mockValidator = mock(Validator.class);
  Validator validator = (Validator) mockValidator.proxy();

  Mock mockListener = mock(ValueChangeListener.class);
  ValueChangeListener listener = (ValueChangeListener) mockListener.proxy();

  setCurrentContext(facesContext);

  // if the component is an EditableValueHolder, then the submitted value
  // must be converted and validated before this phase completes.
  if (component instanceof EditableValueHolder)
  {

    EditableValueHolder editable = (EditableValueHolder)component;
    mockConverter.expects(never()).method("getAsObject");
    mockConverter.expects(never()).method("getAsString");
    mockRenderer.expects(once()).method("getConvertedValue").will(returnValue(convertedValue));
    editable.setConverter(converter);
    editable.setSubmittedValue(submittedValue);
    editable.addValidator(validator);
    editable.addValueChangeListener(listener);

    mockListener.expects(once()).method("processValueChange");
    mockValidator.expects(once()).method("validate").with(new Constraint[]  { eq(facesContext), eq(component), eq(convertedValue) });

  }
  // if the component is a ValueHolder, then the value is not updated or
  // validated and no value change event occurs.
  else if (component instanceof ValueHolder)
  {
    ValueHolder holder = (ValueHolder)component;
    holder.setConverter(converter);
    mockConverter.expects(never()).method("getAsObject");//setExpectedGetAsObjectCalls(0);
    mockConverter.expects(never()).method("getAsString");
  }

  doTestProcessValidations(facesContext, root, component);

  mockRenderKit.verify();
  mockRenderer.verify();
  mockConverter.verify();
  mockValidator.verify();
  mockListener.verify();

  setCurrentContext(null);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:66,代码来源:UIComponentTestCase.java

示例6: valueChangeListener

import javax.faces.event.ValueChangeListener; //导入依赖的package包/类
public default T valueChangeListener(ValueChangeListener listener) {
    addValueChangeListener(listener); return (T) this;
}
 
开发者ID:rogerkeays,项目名称:novdl,代码行数:4,代码来源:FluentEditableValueHolder.java


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