Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Andreas Ra
"requiredMessage"-Tag not working?
September 28, 2012 5:39 AM
Answer

Andreas Ra

Rank: New Member

Posts: 2

Join Date: September 20, 2012

Recent Posts

Hi everybody,

the "requiredMessage"-Tag doesn't seem to work for inputText. When i submit the form, nothing happens.
Here the Html-Code

1
2<h:form>
3<h:inputText value="#{userBean.name}" required="true" requiredMessage="please enter a name"/>
4            <h:commandButton action="#{userBean.addUser()}" value="Bestaetigen" />   
5</h:form>



Greetings,
Andi
Neil Griffin
RE: "requiredMessage"-Tag not working?
September 28, 2012 8:56 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2499

Join Date: July 26, 2005

Recent Posts

I would recommend that you replace the line with h:inputText with the following:

1<h:inputText [b]id="userName"[/b] value="#{userBean.name}" required="true" requiredMessage="please enter a name"/>
2[b]<h:message for="userName" />[/b]
Andreas Ra
RE: "requiredMessage"-Tag not working?
September 30, 2012 1:49 AM
Answer

Andreas Ra

Rank: New Member

Posts: 2

Join Date: September 20, 2012

Recent Posts

Thx and sorry for the dumb question !!
Neil Griffin
RE: "requiredMessage"-Tag not working?
October 2, 2012 7:53 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2499

Join Date: July 26, 2005

Recent Posts

No worries, thanks for using Liferay Faces. emoticon