What is the correct way to put validation for property. The one from the site
is obviously not correct as the validateXxx does not have a return type. I m
continually having this error
2: todoapp.dom.module.game.GameEntity#validateClosingDate: has prefix validate,
is probably a supporting method for a property, collection or action. If the
method is intended to be an action, then rename and use
@ActionLayout(named="...") or ignore completely using @Programmatic
public class Exam {
public int getMark() { ... }
public void setMark(int mark) { ... }
public validateMark(int mark) {
return !withinRange(mark)? "Mark must be in range 0 to 30":null;
}
private boolean withinRange(int mark) { return mark >= 0 && mark <= 30; }
}
James Agada
Chief Technology Officer
[cid:03079D33-D6EF-43C4-BC68-409961ED49D7][cid:0A85BA30-39DD-4C9D-AF4D-6ECD6761CB96]
This email and any attachment thereto are confidential and priviledged. if you
have received it in error, please delete immediately and notify the sender. Do
not disclose, copy, circulate or in any way use it. The information contained
therein is for the address only, if you reply on it, its at your own risk.
Emails are not guaranteed to be secure or error free, the message and any
attachment could be intercepted, corrupted, lost, delayed, incomplete or
ammended. Computer warehouse group and its divisions do not accept liability
for damage caused by this email or any attachment. The message you tried to
print is protected with Information Rights Management. You don't have the
necessary user rights to print the message.