on 06-03-2009 4:09 PM
Hello,
I have created a webdynpro applicaiton with various inputfields,labels and a button used to add elements at runtime using the wdDoModifyview() ....I have the following issues:
1) Once the first inputfield is filled with a number and the button is hit to add other elements ....the framework inserts comma separator in the field for the number....how can i get rid of the comma...?
2) Also after the filling the first field the user hits the tab ...it takes him to the next label element in the row in the Transparent container rather than the next inputfield....how can i skip the control to goto the label element in between....
Any help would be highly appreciated.
Regards,
Anil
Hi Anil,
1)For the first part, I can't understand why the framework is putting in addition commas. But, in case you want to remove the commas you can use the replaceall method in the String class. Or you can use IndexOf to first locate the index of the "," and then use SubString to get the string required.
2) The focus moves to the label as it is treated a separate entity. But, if the Label for property is populated then the label will be ignored and focus will go the input field.
Regards,
Kartikaye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kartikaye,
Thanks for the replies....i was able to fix the 2nd issue ...and for the first one i tried to use the replaceAll() method for the string ...it didn't work....then i debugged to see the string value and it was without the comma ....i think somehow the framework inserts commas for the inputfields ...
Please help.
Regards,
Anil
Kartikaye,
The comma comes when the user either adds new fields at runtime by hitting the button...or when he enters a numeric value in first field.....and enters characters in the second field when the second field was expecting a numeric value so it comes with a error message on the top and the comma is inserted for the first field......
I have checked the code in the wdDoModifyview() ...there is no code to insert a comma there.....and the type binded to both the fields is integer....
Looking forward to your reply...
Regards,
Anil
Hi Anil,
Do not do any coding to achieve this. Just follow this standard approach of changing the representation of the integers.
For displaying in the required format you can try this:
1. Create a simple type in dictionary: under Dictionary -> Local Dictionary -> Simple Types
2. go to Definition tab: Change Built-in Type as Integer
3. go to Representation tab: specify format e.g.: 00,00,000.00 OR just 00000000.00 OR whatever you want.
4. go to Context and change the date binding of the context attribute to the created simple type.
I hope this solves the issue. If the problem gets solved please grant points else please revert back in case you want any further information.
Thanks and Regards,
Pravesh
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.