boolean checked = getValue(); boolean enabled = isEnabled(); String formValue = getFormValue(); String uid = inputElem.getId(); String accessKey = inputElem.getAccessKey();
private CheckBox controlForId(ResourceId id) { for (CheckBox checkBox : controls) { if (checkBox.getFormValue().equals(id.asString())) { return checkBox; } } throw new IllegalArgumentException(id.asString()); }
/** * Verifies that the actual {@link CheckBox} form value is equal to the given one. * * @param expected the given form value to compare the actual form value to. * @return this assertion object. * @throws AssertionError if the actual form value is not equal to the given one. * @see CheckBox#getFormValue() */ public S formValueEquals(String expected) { String formValue = actual.getFormValue(); if (areEqual(formValue, expected)) return myself; throw propertyComparisonFailed("form value", formValue, expected); }
private ReferenceValue updatedValue() { final Set<RecordRef> value = Sets.newHashSet(); for (CheckBox control : controls) { if (control.getValue()) { value.add(RecordRef.fromQualifiedString(control.getFormValue())); } } return new ReferenceValue(value); }
private EnumValue updatedValue() { final Set<ResourceId> value = Sets.newHashSet(); for (CheckBox control : controls) { if (control.getValue()) { value.add(ResourceId.valueOf(control.getFormValue())); } } return new EnumValue(value); }
/** * Verifies that the actual {@link CheckBox} form value is equal to the given one. * * @param expected the given form value to compare the actual form value to. * @return this assertion object. * @throws AssertionError if the actual form value is not equal to the given one. * @see CheckBox#getFormValue() */ public S formValueEquals(String expected) { String formValue = actual.getFormValue(); if (areEqual(formValue, expected)) return myself; throw propertyComparisonFailed("form value", formValue, expected); }
@Override public Promise<Void> setValue(ReferenceValue value) { Set<RecordRef> ids = value.getReferences(); for (CheckBox entry : controls) { RecordRef ref = RecordRef.fromQualifiedString(entry.getFormValue()); entry.setValue(ids.contains(ref)); } return Promise.done(); }
@Override public Promise<Void> setValue(EnumValue value) { for (CheckBox entry : controls) { entry.setValue(containsIgnoreCase(value.getResourceIds(), entry.getFormValue())); } setClearButtonState(value); return Promise.done(); }
boolean checked = getValue(); boolean enabled = isEnabled(); String formValue = getFormValue(); String uid = inputElem.getId(); String accessKey = inputElem.getAccessKey();
boolean checked = getValue(); boolean enabled = isEnabled(); String formValue = getFormValue(); String uid = inputElem.getId(); String accessKey = inputElem.getAccessKey();