litesoft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package com.temp.client.foundation.widget.input;
import com.google.gwt.user.client.ui.*;
import com.temp.client.foundation.widget.input.fieldsupport.*;
import com.temp.client.foundation.widget.input.support.*;
import com.temp.shared.utils.*;
/**
* Due to the nature of the way GWT RadioButtons Work, A "Group" (name) must be specified!
*/
public class RadioButtonInputField extends AbstractGeneratedInputField<Boolean, RadioButtonInputField> {
private static final String STYLE = "field-radioButton";
private String group;
public String getGroup()
{
return group;
}
public void setGroup( String name) {
assertBuildMode("setGroup");
setValidatedGroup( Validate.noEmptyIdentifier( "group", name ) );
}
public final RadioButtonInputField group(String name) {
assertBuildMode("group");
setValidatedGroup( Validate.noEmptyIdentifier( "group", name ) );
return inheritanceLeaf();
}
protected void setValidatedGroup(String name) {
group = name;
}
@Override
protected InputFieldAccessor<Boolean> createBaseAccessor() {
RadioButton field = new RadioButton(Validate.noEmpty( "group", group ));
return createBaseAccessor(new RadioButtonValueAdapter(field), field, STYLE, field);
}
}
|
Revision |
Author |
Commited |
Message |
632
|
GeorgeS
|
Wed 18 Apr, 2012 18:11:29 +0000 |
|