Example usage for org.apache.wicket.markup.html.form AbstractSingleSelectChoice isNullValid

List of usage examples for org.apache.wicket.markup.html.form AbstractSingleSelectChoice isNullValid

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.form AbstractSingleSelectChoice isNullValid.

Prototype

public boolean isNullValid() 

Source Link

Document

Determines whether or not the null value should be included in the list of choices when the field's model value is nonnull, and whether or not the null_valid string property (e.g.

Usage

From source file:org.geoserver.gwc.web.layer.CaseNormalizerSubformTest.java

License:Open Source License

@SuppressWarnings("unchecked")
@Test/* ww  w. j a  v a  2  s  .  co  m*/
public void testPageLoad() {
    startPage();

    tester.assertComponent("form:panel:case", AbstractSingleSelectChoice.class);
    tester.assertComponent("form:panel:locale", AbstractSingleSelectChoice.class);

    AbstractSingleSelectChoice<Case> kase = (AbstractSingleSelectChoice<Case>) tester
            .getComponentFromLastRenderedPage("form:panel:case");

    AbstractSingleSelectChoice<Locale> locale = (AbstractSingleSelectChoice<Locale>) tester
            .getComponentFromLastRenderedPage("form:panel:locale");

    assertThat(kase.isNullValid(), is(false));
    assertThat(locale.isNullValid(), is(true));
}