Getting the model hints in the code

Posted on 19/01/2016 by Charalampos Chrysikopoulos

While trying to make a custom validator in a form, there was the need to reuse the information set in the portlet-model-hints.xml file. You can do this by using the following Util class:

int maxLength = ModelHintsUtil.getMaxLength(klass.getName(), name);
This entry was posted in Uncategorized and tagged Liferay, model hints, snippet, validation by Charalampos Chrysikopoulos