on 08-06-2007 2:54 PM
Dear All,
Requirement:
I have a input field in a view and based on certain conditions i need to change the length of the input filed to 10 or 15 characters in length. The input should not accept more than 10 char in one case and in another case not more than 15.
My Plan:
Now i have created a simple type(builtintype string) and in the External Length i gave 15 to restrict it to 15 char. In another condition i need to have 10 characters, So i created one moer simple type with external length as 10 char.
Now i need to dynamically change the the context attributes type (either of the 2 simple types) to which this input field is mapped to.
Kindly help me in this regard. Points will surely be awarded.
Regards
Yusuf
Hi The Solution is Like.
In the Component Controller. I had a Context Atrribute "Batch", which is a Simple Type-String. I called a method in the Comp. controller from the View based on a condition. In the Method i have a coding like
if( Condition....)
{
IWDAttributeInfo info = wdContext.nodeUserInputNode().getNodeInfo().getAttribute("Batch"); // -
> Batch is Context Attribute for which i want to change the Length dynamically
ISimpleTypeModifiable myType=(ISimpleTypeModifiable)info.getModifiableSimpleType();
myType.setMaxExternalLength(15);
}
else
{
IWDAttributeInfo info = wdContext.nodeUserInputNode().getNodeInfo().getAttribute("Batch");
ISimpleTypeModifiable myType=(ISimpleTypeModifiable)info.getModifiableSimpleType();
myType.setMaxExternalLength(10);
}
Regards
Md. Yusuf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not 100% sure but probably you could just use one DDIC type and use the DDIC runtime API to change the length, see
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.