2

I am practising JSF. I created a login screen with user Id and password fields. Now both the input fields have required="true". I created message.properties file and added the below validation Id to it,

javax.faces.component.UIInput.REQUIRED= {0} is mandatory field

I added message-bundle to the faces-config.xml.

No when I click the submit without any field value given, the message shown is as below,

j_idt13:userid is mandatory field

I want to remove that j_idt13 which is the component Id from the message. How to do it?

Thanks

4

1 に答える 1

7

入力コンポーネントで、属性を使用してlabel、idの代わりに次のことを示します。

<h:inputText .. label="User Id" />
于 2012-06-09T13:11:24.110 に答える