cancel
Showing results for 
Search instead for 
Did you mean: 

Inputfield issues

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Anil,

Please grant points for the helpful or correct suggestions :):)

Regards,

Kartikaye

Former Member
0 Kudos

Done...and do you have another idea for how can i fix the first issue....

Regards,

Anil

Edited by: Anil Kumar on Jun 3, 2009 9:27 PM

Former Member
0 Kudos

Hi Anil,

I dont think the framework will add a comma. Could you exactly explain how the comma comes with a example.

Please check the code and the type of the attribute you are using to bind to the input field.

Check the dynamic web dynpro code.

Regards,

Kartikaye

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Anil,

Can you post your code for the dynamic UI element creation at runtime please?

And the code for whats happening after numeric values are entered in the input field maybe onEnter method? Also, post info on the types of value attributes the input fields are bound to.

Marshall.

Former Member
0 Kudos

Try to commen the runtime code and then see....

Regards,

Shikhil

Edited by: Shikhil Arora on Jun 3, 2009 11:16 PM

Former Member
0 Kudos

I commented the entire code in the wddomodifyview() method....still get the same issue.....and the data types of the attributes bounded to the fields is integer....

Please help.

Regards,

Anil

pravesh_verma
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Pravesh,

Thanks for your help....your solution has resolved the issue...

Regards,

Anil.

Answers (0)