01: package org.jreform.internal;
02:
03: /**
04: * @author armandino (at) gmail.com
05: */
06: public class InputControlModifier<T> {
07: private AbstractInputControl<T> input;
08:
09: public InputControlModifier(AbstractInputControl<T> input) {
10: this .input = input;
11: }
12:
13: public InputControlModifier<T> optional() {
14: input.setRequired(false);
15: return this ;
16: }
17:
18: public InputControlModifier<T> onError(String message) {
19: input.setOnError(message);
20: return this;
21: }
22: }
|