Package wicket.model

Examples of wicket.model.PropertyModel


  }

  private void createComponent()
  {
    this.add(new Label("nom", new PropertyModel(this.personne, "nom")));
    this
        .add(new Label("prenom", new PropertyModel(this.personne,
            "prenom")));

  }
View Full Code Here


    map.put( ConfirmationCopiePanel.TypeParameters.COURSE, this.course);
    map.put( ConfirmationCopiePanel.TypeParameters.COURSEACOPIER, course);
    item.add(HomePage.link("selection", ConfirmationCopiePanel.class, map));
   
    //Autres propriétés
    item.add(new Label("nomCourse", new PropertyModel(course, "nom")));
    item.add(new Label("nomEvenement", new PropertyModel(course.getEvenement(), "nom")));
   }
View Full Code Here

  }
 
  private void createComponents()
  { 
   
    this.add(new RequiredTextField("username", new PropertyModel(this, "username")).setLabel(new Model("Code Usager")));
   
    this.add(HomePage.link("cancel", WelcomePanel.class, null));
    final PasswordTextField txtPassword = new PasswordTextField("password", new PropertyModel(this.password, "newPassword"));
    txtPassword.setLabel(new Model("Mot de passe"));
    txtPassword.setResetPassword(false);
    this.add(txtPassword);
   
   
    final PasswordTextField confirmPassword = new PasswordTextField("confirmpassword", new PropertyModel(this.password, "confirmPassword"));
    confirmPassword.setLabel(new Model("Confirmation du mot de passe"));
    confirmPassword.setResetPassword(false);
    this.add(confirmPassword);
   
    this.add(new EqualPasswordInputValidator(txtPassword, confirmPassword));
   
    this.add(new RequiredTextField("nom", new PropertyModel(this.personne, "nom")).setLabel(new Model("Nom")));
    this.add(new RequiredTextField("prenom", new PropertyModel(this.personne, "prenom")).setLabel(new Model("Prenom")));
    this.add(new RequiredTextField("adresse", new PropertyModel(this.personne, "adresse")).setLabel(new Model("Adresse")));
    this.add(new RequiredTextField("ville", new PropertyModel(this.personne, "ville")).setLabel(new Model("Ville")));
   
    final ProvincesDropDownChoice province = new ProvincesDropDownChoice("province", new PropertyModel(this.personne, "province"));
    province.setLabel(new Model("Province"));
    this.add(province);
   
       
    this.add(new PaysDropDownChoice("pays", new PropertyModel(this.personne, "pays")){
   
      private static final long serialVersionUID = -2426618314309535060L;

      @Override
      protected boolean wantOnSelectionChangedNotifications() {
                return true;
            }

      @Override
      protected void onSelectionChanged(final Object newSelection) {
       
        final String pays = (String) newSelection;
       
        if(pays == "Canada"){
         
          province.clearInput();
          province.setRequired(true);
          province.setCanada();         
          province.setEnabled(true);
        }       
        else if(pays == "Etats-Unis"){
         
          province.clearInput();
          province.setRequired(true);
          province.setUSA();
          province.setEnabled(true);     
        }
        else{
          province.clearInput();
          province.setEnabled(false);
          province.setRequired(false);
        }
            }

     
    }
    .setLabel(new Model("Pays")).setRequired(true));
   
    this.add(new RequiredTextField("codePostal", new PropertyModel(this.personne, "codePostal")).setLabel(new Model("Code postal")));
       
    this.add(new RequiredTextField("telephone", new PropertyModel(this.personne, "telephone"), Telephone.class)
    {
      /**
       *
       */
      private static final long serialVersionUID = -1622892079642695231L;

      @Override
      public IConverter getConverter()
      {
        return new MaskConverter("###-###-####", Telephone.class);
      }
    }.setLabel(new Model("Telephone")));

   
    this.add(new SexeDropDownChoice("sexe", new PropertyModel(this.personne, "sexe")).setLabel(new Model("Sexe")).setRequired(true));
           
    this.add(new AnneesDropDownChoice("annees", new PropertyModel(this.dateNaissance, "annee")).setLabel(new Model("Annees")).setRequired(true));
    this.add(new MoisDropDownChoice("mois", new PropertyModel(this.dateNaissance, "mois")).setLabel(new Model("Mois")).setRequired(true));
    this.add(new JoursDropDownChoice("jours", new PropertyModel(this.dateNaissance, "jour")).setLabel(new Model("Jours")).setRequired(true));
   
       
    final RequiredTextField courriel = new RequiredTextField("courriel", new PropertyModel(this.personne, "courriel"));
    courriel.setLabel(new Model("Courriel")).setRequired(true);
    courriel.add(EmailAddressPatternValidator.getInstance());
    this.add(courriel);
   
    final PaysDropDownChoice nationalite = new PaysDropDownChoice("nationalite", new PropertyModel(this.personne, "nationalite"));
    nationalite.setLabel(new Model("Nationalite"));
    this.add(nationalite);
   
    this.add(new Button("enregistrer")
    {
View Full Code Here

    map.put( ChoixCourse.TypeParameters.COURSE, this.course);
    map.put( ChoixCourse.TypeParameters.SAISON, saison);
    item.add(HomePage.link("selection", ChoixCourse.class, map));
   
    //Autres propriétés
    item.add(new Label("nom", new PropertyModel(saison, "nom")));
    item.add(new Label("annee", new PropertyModel(saison, "annee")));
   }
View Full Code Here

              String firstEssentialPropertyCode = firstEssentialPropertyConfig
                  .getCode();
              Class firstEssentialPropertyClass = firstEssentialPropertyConfig
                  .getPropertyClassObject();
              textField = new TextField("propertyValue",
                  new PropertyModel(neighborParent,
                      firstEssentialPropertyCode,
                      firstEssentialPropertyClass));
            }
          }
        }
        if (textField == null) {
          textField = new TextField("propertyValue",
              new PropertyModel(entity, propertyCode,
                  propertyClass));
          textField.setVisible(false);
        }
      } else if (propertyClass == String.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass));
        if (propertyConfig.isScramble()) {
          setAttribute("type", "password");
        }
      } else if (propertyClass == Integer.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200911L;
          public IConverter getConverter() {
            return new IntegerConverter();
          }
        };
        textField.setType(Integer.class);
      } else if (propertyClass == Long.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200912L;
          public IConverter getConverter() {
            return new LongConverter();
          }
        };
        textField.setType(Long.class);
      } else if (propertyClass == Float.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200913L;
          public IConverter getConverter() {
            return new FloatConverter();
          }
        };
        textField.setType(Float.class);
      } else if (propertyClass == Double.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200914L;
          public IConverter getConverter() {
            return new DoubleConverter();
          }
        };
        textField.setType(Double.class);
      } else if (propertyClass == Date.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200915L;
          public IConverter getConverter() {
            return new DateConverter();
          }
        };
        textField.setType(Date.class);
      } else if (propertyClass == URL.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200916L;
          public IConverter getConverter() {
            return new UrlConverter();
          }
        };
        textField.setType(URL.class);
      } else if (propertyClass == Email.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200917L;
          public IConverter getConverter() {
            return new EmailConverter();
          }
View Full Code Here

      } else {
        entity = modelContext.getEntity();
      }
      PropertyConfig propertyConfig = modelContext.getPropertyConfig();

      checkBox = new CheckBox("propertyValue", new PropertyModel(entity,
          propertyConfig.getCode()));
      add(checkBox);
    } catch (Exception e) {
      log.error("Error in CheckBoxPanel: "
          + modelContext.getPropertyCode() + " - " + e.getMessage());
View Full Code Here

            .getEntitiesCode()
            + " entities are not ordered.");
      }
      List propertyValueList = orderedEntities
          .getPropertyList(propertyCode);
      PropertyModel propertyModel = new PropertyModel(entity,
          propertyCode, propertyClass);
      dropDownChoice = new PropertyValueDropDownChoice(
          "propertyValueDropDownChoice", propertyModel,
          propertyValueList);
      add(dropDownChoice);
View Full Code Here

          } else {
            throw new OrderException(validationTypeEntities
                .getConceptConfig().getEntitiesCode()
                + " entities are not ordered.");
          }
          PropertyModel propertyModel = new PropertyModel(entity,
              propertyCode, propertyClass);
          dropDownChoice = new TypeValueDropDownChoice(
              "typeValueDropDownChoice", propertyModel,
              validationTypeList);
          add(dropDownChoice);
View Full Code Here

      } else {
        entity = modelContext.getEntity();
      }
      PropertyConfig propertyConfig = modelContext.getPropertyConfig();

      textArea = new TextArea("propertyValue", new PropertyModel(entity,
          propertyConfig.getCode()));

      ModelConfig modelConfig = propertyConfig.getContextConceptConfig()
          .getContextModelConfig();
      if (modelConfig.isValidateForm()) {
View Full Code Here

TOP

Related Classes of wicket.model.PropertyModel

Copyright © 2018 www.massapicom. 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.