cancel
Showing results for 
Search instead for 
Did you mean: 

Catch False data binding in MVC

Former Member
0 Kudos

Hi,

I do have an Input field mapped to an attribute of my model instance this attribute as a type PERSNO which 8 DIGIT.

i DO HAVE A BUTTON for the display details of selected pernr.

When I try to enter 'AZERTY' I still go to the next page, when click back I do have the field underligned in red!

My objectif is then to catch this false binding before calling the page and give an error message...

Thanks! Great reward for my Heros

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I did use the GLOBAL_MESSAGES which is a parameter of the method DO_HANDLE_EVENT of the Controller.

If I do have an error message I reset the messages using method reset and give an output to the user.

Does it seems the "best" way or the PROPER to do It ?

How could I know that the error come from this or this field ?

cheerz

SergioFerrari
Active Contributor
0 Kudos

Have a look to the recent thread "Message Handling from model to controller"

Sergio

former_member181879
Active Contributor
0 Kudos

When the model is filled again from the incoming request, the error/message object in the controller is filled with error/conversion messages. You should check this before you continue to follow the navigation of your button.