Examples of TextField


Examples of org.apache.wicket.markup.html.form.TextField

      }
     
      public HotelSearchForm(String id)
      {
         super(id);
         add(new TextField("searchString", new SeamPropertyModel("searchString")
         {
           
            @Override
            public Object getTarget()
            {
View Full Code Here

Examples of org.apache.wicket.markup.html.form.TextField

    
      public RegisterForm(String id)
      {
         super(id);
         add(new PageLink("cancel", Home.class));
         username = new TextField("username");
         username.setRequired(true);
         add(new FormInputBorder("usernameDecorate", "Username", username, new SeamPropertyModel("username")
         {
           
            @Override
            public Object getTarget()
            {
               return user;
            }
           
         }));
         add(new FormInputBorder("nameDecorate", "Real Name", new TextField("name").setRequired(true), new SeamPropertyModel("name")
         {
            @Override
            public Object getTarget()
            {
               return user;
View Full Code Here

Examples of org.apache.wicket.markup.html.form.TextField

        });
        cronTemplateChooser.setChoices(Arrays.asList(CRON_TEMPLATES));
        cronTemplateChooser.setChoiceRenderer(new SelectChoiceRenderer());
        add(cronTemplateChooser);

        seconds = new TextField("seconds", new Model(getCronField(cronExpression, 0)));
        add(seconds);

        minutes = new TextField("minutes", new Model(getCronField(cronExpression, 1)));
        add(minutes);

        hours = new TextField("hours", new Model(getCronField(cronExpression, 2)));
        add(hours);

        daysOfMonth = new TextField("daysOfMonth", new Model(getCronField(cronExpression, 3)));
        add(daysOfMonth);

        months = new TextField("months", new Model(getCronField(cronExpression, 4)));
        add(months);

        daysOfWeek = new TextField("daysOfWeek", new Model(getCronField(cronExpression, 5)));
        add(daysOfWeek);

        cronTemplateChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;
View Full Code Here

Examples of org.beryl.gui.widgets.TextField

/**
* A strict validator which only accepts certain ASCII characters
*/
public class StrictTextFieldValidator implements Validator {
  public void validate(View view) throws ValidationException {
    TextField field = (TextField) view;

    String text = field.getText().toLowerCase();
    for (int i = 0; i < text.length(); i++) {
      char c = text.charAt(i);

      if ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_' || c == '@' || c == '.');
      else
View Full Code Here

Examples of org.beryl.gui.widgets.TextField

public class EmailValidator implements Validator {
  private String sPattern =
    "^[\\w\\d\\.-]{1,50}@[\\w\\d-]{1,50}\\.[\\w\\.]{2,8}$";

  public void validate(View view) throws ValidationException, GUIException {
    TextField field = (TextField) view;
    String validationString = field.getText();

    RE r = null;

    try {
      r = new RE(sPattern);
View Full Code Here

Examples of org.beryl.gui.widgets.TextField

public class PhoneNumberValidator implements Validator {
  private static final String sPattern =
    "^\\+[1-9]{2,2}\\s[0-9]{2,10}\\s[0-9]{2,10}\\-{0,1}[0-9]{1,7}$";

  public void validate(View view) throws ValidationException, GUIException {
    TextField field = (TextField) view;
    String validationString = field.getText();

    RE r = null;

    try {
      r = new RE(sPattern);
View Full Code Here

Examples of org.beryl.gui.widgets.TextField

*/
public class PhoneOrEmptyValidator implements Validator {
  private static final String sPattern = "^\\+[1-9]{2,2}\\s[0-9]{2,10}\\s[0-9]{2,10}\\-{0,1}[0-9]{1,7}$";
 
  public void validate(View view) throws ValidationException, GUIException {
    TextField field = (TextField) view;
    String validationString = field.getText();
   
    if (validationString.trim().length() >= 1) {
     
      RE r = null;
      try {
View Full Code Here

Examples of org.beryl.gui.widgets.TextField

/**
* A validator for fixed-point numbers
*/
public class IntegerValidator implements Validator {
  public void validate(View view) throws ValidationException {
    TextField field = (TextField) view;
    String text = field.getText();

    try {
      Integer.parseInt(text);
    } catch (NumberFormatException e) {
      throw new ValidationException(view, InternationalizationManager.getString("xmlgui.validator.number.invalid"));
View Full Code Here

Examples of org.beryl.gui.widgets.TextField

    this.format = format;
    length = format.toPattern().length();
  }

  public void validate(View view) throws ValidationException {
    TextField field = (TextField) view;
    String text = field.getText();

    try {
      format.parse(field.getText());
      if (text.length() != length)
        throw new ValidationException(view, InternationalizationManager.getString("xmlgui.validator.date.invalid"));
    } catch (ParseException e) {
      throw new ValidationException(view, InternationalizationManager.getString("xmlgui.validator.date.invalid"));
    }
View Full Code Here

Examples of org.beryl.gui.widgets.TextField

import org.beryl.gui.View;
import org.beryl.gui.widgets.TextField;

public class FloatValidator implements Validator {
  public void validate(View view) throws ValidationException {
    TextField field = (TextField) view;
    String text = field.getText();

    try {
      Float.parseFloat(text);
    } catch (NumberFormatException e) {
      throw new ValidationException(view, InternationalizationManager.getString("xmlgui.validator.number.invalid"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.