Package org.apache.wicket.markup.html.form

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


        }
        // if none is found use the default set
        if(logProfiles == null || logProfiles.size() == 0)
            logProfiles = DEFAULT_LOG_PROFILES;

        form.add(new ListChoice("log4jConfigFile", new PropertyModel(loggingInfoModel,
                "level"), logProfiles));
    }
View Full Code Here


    // Add a list choice component that uses Input's 'site' property to
    // designate the
    // current selection, and that uses the SITES list for the available
    // options.
    ListChoice listChoice = new ListChoice("site", SITES);
    listChoice.setMaxRows(4);
    form.add(listChoice);
  }
View Full Code Here

    initialCheckGroup.add(candidateChoices.get(2));
    initialCheckGroup.add(candidateChoices.get(3));

    // single select family
    form.add(new DropDownChoice("dropDownChoice", candidateChoices, bookChoiceRenderer));
    form.add(new ListChoice("listChoice", candidateChoices, bookChoiceRenderer).setMaxRows(4));
    form.add(new RadioChoice("radioChoice", candidateChoices, bookChoiceRenderer));
    form.add(new CheckBox("checkBox"));
    form.add(newRadioGroup(candidateChoices));

    // multiple select family
View Full Code Here

      setCepToRemove(cepCourse.get(0));
    }

    Form form = new Form("form");

    final ListChoice cepToAddList = new ListChoice("cepToAdd",
        new PropertyModel(this, "cepToAdd"), cepDisponibles,
        new CourseEnsemblePucesChoiceRenderer());
    form.add(cepToAddList.setMaxRows(10).setNullValid(false).setEnabled(
        course.isUtilisationPuces()));
    final ListChoice cepToRemoveList = new ListChoice("cepToRemove",
        new PropertyModel(this, "cepToRemove"), cepCourse,
        new CourseEnsemblePucesChoiceRenderer());
    form.add(cepToRemoveList.setMaxRows(10).setNullValid(false).setEnabled(
        course.isUtilisationPuces()));

    final Button addToCourseButton = new Button("addToCourse")
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onSubmit()
      {
        if (cepToAdd != null)
        {
          try
          {
            course.addCourseEnsemblePuce(cepToAdd);
            courseService.save(course);
            courseEnsemblePucesService.save(cepToAdd);
            setResponsePage(new CoursePucesPage(course));
          }
          catch (ValidationException vex)
          {
            course.removeCourseEnsemblePuce(cepToAdd);
            ValidationUtils.transferToComponent(vex, this);
          }
        }
      }
    };
    form.add(addToCourseButton.setEnabled(course.isUtilisationPuces()));

    final Button removeFromCourseButton = new Button("removeFromCourse")
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onSubmit()
      {
        if (cepToRemove != null)
        {
          course.removeCourseEnsemblePuce(cepToRemove);
          courseService.save(course);
          courseEnsemblePucesService.delete(cepToRemove);
          setResponsePage(new CoursePucesPage(course));
        }
      }
    };
    form.add(removeFromCourseButton.setDefaultFormProcessing(false)
        .setEnabled(course.isUtilisationPuces()));

    form.add(new CoursePucesUpdatePanel("coursePucesUpdatePanel", course)
    {

      private static final long serialVersionUID = 1L;

      @Override
      protected void onUtilisationPucesChanged(boolean value)
      {
        cepToAddList.setEnabled(value);
        cepToRemoveList.setEnabled(value);
        addToCourseButton.setEnabled(value);
        removeFromCourseButton.setEnabled(value);
      }

    });
View Full Code Here

        }
        // if none is found use the default set
        if(logProfiles == null || logProfiles.size() == 0)
            logProfiles = DEFAULT_LOG_PROFILES;

        form.add(new ListChoice("log4jConfigFile", new PropertyModel(loggingInfoModel,
                "level"), logProfiles));
    }
View Full Code Here

    initialCheckGroup.add(candidateChoices.get(2));
    initialCheckGroup.add(candidateChoices.get(3));

    // single select family
    form.add(new DropDownChoice("dropDownChoice", candidateChoices, bookChoiceRenderer));
    form.add(new ListChoice("listChoice", candidateChoices, bookChoiceRenderer).setMaxRows(4));
    form.add(new RadioChoice("radioChoice", candidateChoices, bookChoiceRenderer));
    form.add(new CheckBox("checkBox"));
    form.add(newRadioGroup(candidateChoices));

    // multiple select family
View Full Code Here

        }
        // if none is found use the default set
        if(logProfiles == null || logProfiles.size() == 0)
            logProfiles = DEFAULT_LOG_PROFILES;

        form.add(new ListChoice("log4jConfigFile", new PropertyModel(loggingInfoModel,
                "level"), logProfiles));
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.ListChoice

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.