cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Type auto-format Inputfield value

bernd_speckmann
Contributor
0 Kudos

Hi there,

I have a question regarding a web dynpro (Netweaver 7.3) input field.

I have binded a context attribute with a simple type to it. The format of the simple type is ###,###,##0.00 mm, where mm is the measurement unit.

Now the problem: When i enter a value (for example 2000) into the inputfield, I have to enter 2000 mm. Only 2000 is not enough. Showing the value 2000 in a textview field with this type works good. It's automatically formated as 2000 mm.

Is there a chance to autoformat the inputfield? I only want to enter 2000 and it shoudl show me 2000 mm.

Thanks ahead

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

as Robin told,

store the 'mm' in another context varible( for example ctx2) and get user the input filed to for ex :ctx1and then append both store in ccontext varible 3 i.e for ex: ct3 ,then display ctx3 in the input fileld.

hope you understood my point.

Regards,

Govindu

Qualiture
Active Contributor
0 Kudos

Hi Bernd,

Not sure if this will fit your needs, but I would implement the following workaround:

  • add an extra (String) attribute to your context

  • link the text input field to this extra attribute

  • upon changing your text input (or when receiving a value from an auxiliary source), have it store the numerical value to your original attribute, and format the number according to your needs in the text field's attribute

  • store the value of the original attribute, not the new text field's attribute

Hope this helps,

Robin