on 07-24-2007 1:26 PM
Hello,
I have an integer attribute in context. When i set the value to zero i want to display blank instead of 0.
Thanks, Yossi
Hi,
Please specify the type of UI (Input field or dropdown etc), where blank needs to be set.
Regards
Srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi yosi,
It is not possible. If you declare a context variable of type integer it will always show 0 as default value.
Instead of 0 you can set other integer value but you cant change it to blank.
According to the set Method signature it always expect a int value in parameter.
wdContext.currentContextElement().set<Variable Name> (int value).
In that case you can take a decimal context variable.
[for int/float default value is always 0]
Regards,
Mithu
Hi yosi,
Use this.
DecimalFormat myformat = new DecimalFormat("000,000.00");
String fornatedNumber = myformat.format(wdContext.currentContextElement().getDecvar());
wdComponentAPI.getMessageManager().reportSuccess("Formated Number"+fornatedNumber);
or
String fornatedNumber =wdContext.currentContextElement().getDecvar().toString();
fornatedNumber = fornatedNumber.substring(0,fornatedNumber.length()-2)"."fornatedNumber.substring(fornatedNumber.length()-2);
wdComponentAPI.getMessageManager().reportSuccess("Formated Number : "+fornatedNumber);
According to your requirement.
Regards,
Mithu
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.