using custom Message with p:messages

UI Components for JSF
Post Reply
autobots
Posts: 2
Joined: 09 Sep 2011, 17:43

13 Sep 2011, 12:12

Hey guys, i'm just learning JSF with primefaces.. And I need little help
I wanna validate the inputText so it could only contain numbers only.. I'm using f:validateRegex like this :

Code: Select all

   <p:inputText id="npm" value="#{tableManager.NPM}">
                        <f:validateRegex pattern="([0-9]{1,8})"/>
                        <f:ajax execute="@this" event="keyup" render="messages" />
                    </p:inputText>

<p:messages id="messages"/>
but I don't know how to change the error message if the message get rendered.. Anyone could help?? :?
PS : Sorry for my baad English :oops:

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests