Package wicket.model

Examples of wicket.model.Model


   * @param andKeywords
   *            <code>true</code> if to AND keywords
   */
  public KeywordSelectionForm(final String wicketId, final String title,
      final String keywords, final Boolean andKeywords) {
    super(wicketId, new Model());
    try {
      add(new Label("title", title));
      keywordsField = new TextField("keywords", new Model(keywords));
      add(keywordsField);
      andKeywordsBox = new CheckBox("and", new Model(andKeywords));
      add(andKeywordsBox);
    } catch (Exception e) {
      log.error("Error in KeywordSelectionForm: " + title + " - "
          + e.getMessage());
    }
View Full Code Here


  {
    // Doit pointer ailleurs...
    this.add(HomePage.link("cancel", ViewPersonnePanel.class, null));

    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")));
    this.add(new RequiredTextField("province", new PropertyModel(
        this.personne, "province")).setLabel(new Model("Province")));

    this.add(new PaysDropDownChoice("pays", new PropertyModel(
        this.personne, "pays")).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);
  }
View Full Code Here

  public void createComponent()
  {

    this.add(new RequiredTextField("username", new PropertyModel(this,
        "username")).setLabel(new Model("Username")));
    this.add(new PasswordTextField("password", new PropertyModel(this,
        "password")).setLabel(new Model("Password")));
    this.add(HomePage.link("inscription", CreationComptePersonnePanel.class, null));
    this.add(HomePage.link("motPasseOublie", RetrievePassword.class, null));
  }
View Full Code Here

      ConceptConfig countryLanguageConceptConfig = countryLanguages
          .getConceptConfig();
      String currentLanguage = countryLanguage.getLanguage();
      List languageList = countryLanguages.getLanguageList();

      IModel choiceModel = new Model(currentLanguage);
      DropDownChoice countryLanguageChoice = new CountryLanguageChoice(
          "countryLanguageChoice", choiceModel, languageList);
      add(countryLanguageChoice);
      if (!app.isConceptDisplayAllowed(getAppSession(),
          countryLanguageConceptConfig)) {
View Full Code Here

   * @param attributeValue
   *            attribute value
   */
  public void setAttribute(String attributeName, String attributeValue) {
    AttributeModifier attributeModifier = new AttributeModifier(
        attributeName, true, new Model(attributeValue));
    label.add(attributeModifier);
  }
View Full Code Here

     * @param viewContext
     *            view context
     */
    public LookupCheckBox(final ModelContext lookupModelContext,
        final ViewContext lookupViewContext) {
      super(lookupViewContext.getWicketId(), new Model(Boolean.FALSE));
      this.lookupModelContext = lookupModelContext;
    }
View Full Code Here

  }

  private void createComponents(final Course course, final boolean isMale)
  {

    final RadioGroup singleChoice = new RadioGroup("radioGroup", new Model(
        ""));
    singleChoice.setRequired(true);
    this.add(singleChoice);

    if (isMale)
View Full Code Here

    this.add(new Label("prenom", new PropertyModel(this.updatePersonne,
        "prenom")));
    this.add(new Label("nom", new PropertyModel(this.updatePersonne, "nom")));

    this.add(new RequiredTextField("adresse", new PropertyModel(
        this.updatePersonne, "adresse")).setLabel(new Model("Adresse")));
    this.add(new RequiredTextField("ville", new PropertyModel(
        this.updatePersonne, "ville")).setLabel(new Model("Ville")));
    this.add(new RequiredTextField("province", new PropertyModel(
        this.updatePersonne, "province")).setLabel(new Model("Province")));
    this.add(HomePage.link("cancel", DisplayPersonnePanel.class,
        this.session.getUser().getPersonneOidMap()));
    this.add(new PaysDropDownChoice("pays", new PropertyModel(
        this.updatePersonne, "pays")).setLabel(new Model("Pays"))
        .setRequired(true));

    this.add(new RequiredTextField("codePostal", new PropertyModel(
        this.updatePersonne, "codePostal")).setLabel(new Model(
        "Code postal")));

    this.add(new RequiredTextField("telephone", new PropertyModel(
        this.updatePersonne, "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 Label("sexe", new PropertyModel(this.updatePersonne, "sexe")));
   
    this.add(new Label("dateNaissance", new PropertyModel(this.updatePersonne, "dateNaissance")));

    final RequiredTextField courriel = new RequiredTextField("courriel",
        new PropertyModel(this.updatePersonne, "courriel"));
    courriel.setLabel(new Model("Courriel")).setRequired(true);
    courriel.add(EmailAddressPatternValidator.getInstance());
    this.add(courriel);
   
    this.add(new PaysDropDownChoice("nationalite", new PropertyModel(
        this.updatePersonne, "nationalite")).setLabel(new Model("nationalite"))
        .setRequired(true));

  }
View Full Code Here

  {

    final PasswordTextField currentPassword = new PasswordTextField(
        "currentPassword", new PropertyModel(this.password,
            "currentPassword"));
    currentPassword.setLabel(new Model("Mot de passe actuel "));
    currentPassword.setResetPassword(false);
    this.add(currentPassword);

    final PasswordTextField newPassword = new PasswordTextField("newPassword",
        new PropertyModel(this.password, "newPassword"));
    newPassword.setLabel(new Model("Nouveau mot de passe"));
    newPassword.setResetPassword(false);
    this.add(newPassword);

    final PasswordTextField confirmPassword = new PasswordTextField(
        "confirmPassword", new PropertyModel(this.password,
            "confirmPassword"));
    confirmPassword.setLabel(new Model(
        "Confirmation du nouveau mot de passe"));
    confirmPassword.setResetPassword(false);
    this.add(confirmPassword);

    this.add(HomePage.link("cancel", DisplayPersonnePanel.class,
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

TOP

Related Classes of wicket.model.Model

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.