How can I fill in the blanks to display just my image?

Posted by Ignacio on Stack Overflow See other posts from Stack Overflow or by Ignacio
Published on 2011-03-03T21:44:56Z Indexed on 2011/03/03 23:24 UTC
Read the original article Hit count: 332

Filed under:
|
|
|
           <h:inputText id="email" value="#{user.user.email}" title="Email" onchange="this.form.submit()"
                         required="true" requiredMessage="_____">
            <f:validator validatorId="checkvalidemail"/>
            </h:inputText>
            <h:message for="email" styleClass="error"/>

validation:

String enteredEmail = (String)object;
Pattern p = Pattern.compile(".+@.+\\.[a-z]+");
Matcher m = p.matcher(enteredEmail);
boolean matchFound = m.matches();    

if (!matchFound) {
FacesMessage message = new FacesMessage();
message.setSummary("____");
throw new ValidatorException(message);

and css

.error {
background-image: url('includes/style/delete2.png');
text-align: left;
font-size: 36px;
}

Thank you very much Best Regards Ignacio

© Stack Overflow or respective owner

Related posts about java

Related posts about html