on 03-06-2006 10:03 AM
Hi
I need to dynamically create input fields with specified lengths(so that user cannot enter values beyond this length).
I do it like this.
IWDAttributeInfo attributeInfo =
nodeName
.getNodeInfo()
.addAttribute(attributeName,
"ddic:com.sap.dictionary.string");
IWDInpuField inputField =
(IWDInpuField)viewHandle
.createElement
(IWDInputField.class,null);
int length = getLengthFromSomeMethod();
inputField.bindValue(attributeInfo);
inputField.setLength(length);
The input field added is of specified length, but still the user is able to enter value beyond this length. This i guess is due to the fact that attribute bound to the field is of type "ddic:com.sap.dictionary.string".
Can i create data types at runtime so that i might add attributes with this data type to a node at run time?
Is there any other way to solve this problem?
kaushal,
Try this:
attributeInfo.getModifiableSimpleType()
.setMaxLength(length);
;
"Length" of InputField declares (average) width of control in characters.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.