Foren
liferay not display ui:error message
Christian Perez, geändert vor 9 Jahren.
liferay not display ui:error message
Junior Member Beiträge: 47 Beitrittsdatum: 19.07.13 Neueste Beiträge
I'm develop a portlet and I need to show some error messages but liferay doesn't show anything, this is in my java class.
and this is in my jsp
when the condition is false liferay only shows in the console te message Action false and doesn't show the ui:error
when the condition is true liferay shows Action true in the console and also show the ui:success message
Somebody knows why this, why liferay doesn't shows the ui:error message?
some help?
thanks
//if condition is false
SessionMessages.add(actionRequest, "error");
System.out.printpn("Action false");
SessionMessages.add(actionRequest, "success");
System.out.printpn("Action true");
and this is in my jsp
<liferay-ui:error key="error" message="El telefono no se encuentra registrado." />
<liferay-ui:success key="success" message="Consulta exitosa!!!." />
when the condition is false liferay only shows in the console te message Action false and doesn't show the ui:error
when the condition is true liferay shows Action true in the console and also show the ui:success message
Somebody knows why this, why liferay doesn't shows the ui:error message?
some help?
thanks
Jeffrey Paul Handa, geändert vor 9 Jahren.
RE: liferay not display ui:error message (Antwort)
Liferay Master Beiträge: 541 Beitrittsdatum: 01.12.08 Neueste Beiträge
Try adding your error to SessionErrors, not SessionMessages.
Christian Perez, geändert vor 9 Jahren.
RE: liferay not display ui:error message
Junior Member Beiträge: 47 Beitrittsdatum: 19.07.13 Neueste BeiträgeJeffrey Paul Handa:
Try adding your error to SessionErrors, not SessionMessages.
thanks, everything works fine now, only a doubt, now liferay shows me two error messages,
first the default message of liferay for the errors and second my custom error message, some sugestion to hide the default message and only show my custom message?
regards
Jeffrey Paul Handa, geändert vor 9 Jahren.
RE: liferay not display ui:error message
Liferay Master Beiträge: 541 Beitrittsdatum: 01.12.08 Neueste Beiträge
Hi Christian,
There are couple options depending on if you want to disable that for all portlets or just for that one portlet. If you Google 'Liferay hide default error message' you'll find several threads from the forums that describe both scenarios.
There are couple options depending on if you want to disable that for all portlets or just for that one portlet. If you Google 'Liferay hide default error message' you'll find several threads from the forums that describe both scenarios.