Revision 9683 trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ActionToolDescriptor.java
ActionToolDescriptor.java | ||
---|---|---|
97 | 97 |
fieldValidator.setValidator(typeValidator); |
98 | 98 |
} |
99 | 99 |
desc.setValidator(fieldValidator); |
100 |
//-- _name |
|
101 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); |
|
102 |
desc.setImmutable(true); |
|
103 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
104 |
public java.lang.Object getValue( java.lang.Object object ) |
|
105 |
throws IllegalStateException |
|
106 |
{ |
|
107 |
ActionTool target = (ActionTool) object; |
|
108 |
return target.getName(); |
|
109 |
} |
|
110 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
111 |
throws IllegalStateException, IllegalArgumentException |
|
112 |
{ |
|
113 |
try { |
|
114 |
ActionTool target = (ActionTool) object; |
|
115 |
target.setName( (java.lang.String) value); |
|
116 |
} |
|
117 |
catch (java.lang.Exception ex) { |
|
118 |
throw new IllegalStateException(ex.toString()); |
|
119 |
} |
|
120 |
} |
|
121 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
122 |
return null; |
|
123 |
} |
|
124 |
} ); |
|
125 |
desc.setHandler(handler); |
|
126 |
addFieldDescriptor(desc); |
|
127 |
|
|
128 |
//-- validation code for: _name |
|
129 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
130 |
{ //-- local scope |
|
131 |
StringValidator typeValidator = new StringValidator(); |
|
132 |
typeValidator.setWhiteSpace("preserve"); |
|
133 |
fieldValidator.setValidator(typeValidator); |
|
134 |
} |
|
135 |
desc.setValidator(fieldValidator); |
|
100 | 136 |
//-- _actionCommand |
101 | 137 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_actionCommand", "action-command", org.exolab.castor.xml.NodeType.Attribute); |
102 | 138 |
desc.setImmutable(true); |
Also available in: Unified diff