Validation feedback from a Java action

0
Hi, Im trying to create a Java action that can do a validation feedback, given a Entity and AttributeName. I have tried to use the DataValidationInfo class and .addErrorField(MemberName, Message), but it won't be shown on screen. I think I'm missing something ;-) // .... DataValidationInfo dvi = new DataValidationInfo(Entity.getId().toLong()); dvi.addErrorField(this.AttributeName, "Oops!"); // .... How do I do this? So just a custom version of the existing “show Validation message” action.  
asked
1 answers
0

You need to look at addDataValidationFeedback in the Core API.

https://apidocs.rnd.mendix.com/8/runtime/com/mendix/core/actionmanagement/CoreAction.html#addDatavalidationFeedback(com.mendix.systemwideinterfaces.core.IMendixIdentifier,java.util.Map)

Mina covered this as part of his talk on Creating and Debugging Java actions at this years Mendix World. Here's a link to the session, it’s worth a watch.

https://events.mendixworld.com/widget/mendix/world21/catalog/session/1621626724715001fi3l

Hope this helps.

answered