Showing results for 
Search instead for 
Did you mean: 

highlighting inputfields with model data binding and the "errors"-object

Former Member
0 Kudos


I'm using the possibility to highlight inputfields dynamically by adding a message to the errors object of the corresponding model.

In fact: I have a view "test.html" with several inputfields like this one:

<htmlb:inputField id = "if_text"
           maxlength = "10"
           size      = "10"
           value     = "//model/test.text"
           type      = "STRING" />

The model has the attribute "test" for the data binding and a method which checks the data. This method adds messages to the errors-object in case of erroneous data:

errors->add_message_from_t100( condition = 'test.text'
                               msgid     = 'Z01'
                               msgno     = '001'
                               msgty     = 'E' ).

This really works very well, the field is highlighted "red" (invalid). The only problem is that the inputfield doesn't show the incorrect data I entered. The field is empty although the data is still held in the attribute of the model.

I doubt that this is an expected behaviour, cause those fields which auto-check their inputs (dates, etc.) are highlighted too but hold their data.

Is this a known problem? Is there any way to hold the data?

Thanks in advance,


Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

You should insert the wrong value in the DUMMY parameter of the method ADD_MESSAGE_FROM_T100.


Former Member
0 Kudos

Thanks a lot, this works.

Was it that obvious or is it just some kind of "special hack"?

Active Contributor
0 Kudos

As you can image, I already had issue and I discovered after hours of debugging...

Answers (0)