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

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


  {
    super(id);

    Form tarificationForm = new Form("tarificationForm");

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

    singleChoice
        .add(new TarificationListView("tarificationListView", items));

    tarificationForm.add(singleChoice);

    tarificationForm.add(new Button("precedent", new ResourceModel(
        "precedent"))
    {
      private static final long serialVersionUID = 3534043602619164257L;

      @Override
      public void onSubmit()
      {
        this.setResponsePage(gestionProcessusInscription.onClickEtape(
            ProcessusInscription.Etapes.Tarification,
            ProcessusInscription.Action.Precedent, null));
      }

    }.setDefaultFormProcessing(false));

    tarificationForm
        .add(new Button("suivant", new ResourceModel("suivant"))
        {
          private static final long serialVersionUID = 3534043622619164257L;

          @Override
          public void onSubmit()
          {
            this
                .setResponsePage(gestionProcessusInscription
                    .onClickEtape(
                        ProcessusInscription.Etapes.Tarification,
                        ProcessusInscription.Action.Suivant,
                        singleChoice.getModelObject()));
          }

        });

    this.add(tarificationForm);
View Full Code Here


  {
    super(id);

    Form saisonForm = new Form("saisonForm");

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

    singleChoice.add(new SaisonListView("saisonListView", items));

    saisonForm.add(singleChoice);

    saisonForm.add(new Button("suivant", new ResourceModel("suivant"))
    {
      private static final long serialVersionUID = 3534043602619164257L;

      @Override
      public void onSubmit()
      {
        this.setResponsePage(gestionProcessusInscription.onClickEtape(
            ProcessusInscription.Etapes.Saison,
            ProcessusInscription.Action.Suivant, singleChoice
                .getModelObject()));
      }

    });
View Full Code Here

      dropDownChoiceMembresClub.setVisible(false);
    }

    dropDownChoiceMembresClub.setRequired(false);

    final RadioGroup radioGroup = new RadioGroup("mode")
    {
      private static final long serialVersionUID = 1L;

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

      @Override
      protected void onSelectionChanged(Object arg0)
      {
        updateFields(email, dropDownChoice, dropDownChoiceMembresClub);
      }
    };

    Radio rdPersonneAssociee = new Radio("rdbPersonneAssociee", new Model(
        DelegateRegistrationMode.PERSONNEASSOCIEE));

    if (personnesAssociees.size() < 1)
    {
      rdPersonneAssociee.setEnabled(false);
    }

    radioGroup.add(labelNomClub);
    radioGroup.add(rdPersonneAssociee);
    radioGroup.add(email);
    radioGroup.add(dropDownChoice);

    radioGroup.add(new Radio("manual", new Model(
        DelegateRegistrationMode.MANUAL)));
    radioGroup.add(new Radio("lookup", new Model(
        DelegateRegistrationMode.LOOKUP)));

    radioGroup.add(radioCoach);

    radioGroup.add(dropDownChoiceMembresClub);

    radioGroup.clearInput();

    form.add(radioGroup);
    form.add(next);

    form.add(back);
View Full Code Here

  {
    model = new ManualRegistrationModeModel();
    model.setMode(ManualRegistrationMode.MANUAL);

    final Form form = new Form("form", new CompoundPropertyModel(model));
    final RadioGroup radioGroup = new RadioGroup("mode");

    radioGroup.add(new Radio("manual", new Model(
        ManualRegistrationMode.MANUAL)));
    radioGroup.add(new Radio("lookup", new Model(
        ManualRegistrationMode.LOOKUP)));
    form.add(radioGroup);
    form.add(next);

    this.add(form);
View Full Code Here

    else
    {
      noPlaque.setRequired(true);
    }

    RadioGroup createNewEquipe = new RadioGroup("createNewEquipe")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onSelectionChanged(Object newSelection)
      {
        updateChampsEquipe((Boolean) newSelection, model);
      }

      @Override
      protected boolean wantOnSelectionChangedNotifications()
      {
        return true;
      }
    };
    createNewEquipe.setVisible(model.getInscription().getCourse()
        .isCourseParEquipe());
    createNewEquipe.add(new Radio("newEquipeOui", new Model(true))
        .setVisible(model.getInscription().getCourse()
            .isCourseParEquipe()));
    createNewEquipe.add(new Radio("newEquipeNon", new Model(false))
        .setVisible(model.getInscription().getCourse()
            .isCourseParEquipe()));
    autresInfosForm.add(createNewEquipe);

    equipeExistante = new DropDownChoice("equipeExistante",
View Full Code Here

    {
      conditionCheckBox.setVisible(false);
      conditionCheckBox.setRequired(false);
    }

    RadioGroup createNewEquipe = new RadioGroup("createNewEquipe",
        new PropertyModel(composantAutresInfos, "createNewEquipe"))
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onSelectionChanged(Object newSelection)
      {
        updateChampsEquipe((Boolean) newSelection, composantAutresInfos);
      }

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

    createNewEquipe.setVisible(composantAutresInfos.isNeedEquipe());
    createNewEquipe.add(new Radio("newEquipeOui", new Model(true))
        .setVisible(composantAutresInfos.isNeedEquipe()));
    createNewEquipe.add(new Radio("newEquipeNon", new Model(false))
        .setVisible(composantAutresInfos.isNeedEquipe()));
    autresInfosForm.add(createNewEquipe);

    equipeExistante = new DropDownChoice("equipeExistante",
        new PropertyModel(composantAutresInfos, "equipeExistante"),
View Full Code Here

            public void onClick(AjaxRequestTarget target) {
                setSearchType(ALL);
                setResponsePage(TweetSearchPage.class, getParams(query, selectedIndex, null, loggedInUser));
            }
        }));
        final RadioGroup rg = new RadioGroup("searchTypes", new PropertyModel(this, "selectedIndex"));
        final Button buttonRight = new Button("submitbutton") {

            @Override
            public void onSubmit() {
                setResponsePage(TweetSearchPage.class, getParams(query, selectedIndex, userName, loggedInUser));
            }
        };
        final Button bttnLeft = new Button("submitbuttonleft") {

            @Override
            public void onSubmit() {
                buttonRight.onSubmit();
            }
        };
        form = new Form("searchform") {

            @Override
            public void onSubmit() {
                buttonRight.onSubmit();
            }
        };
       
        form.add(new BookmarkablePageLink("homelink", TweetSearchPage.class));
//        buttonRight.add(new EffectBehavior(new BounceEffect()));
        form.add(buttonRight);
        form.add(bttnLeft);
        form.setMarkupId("queryform");
        add(form);

        AutoCompleteSettings config = new AutoCompleteSettings().setUseHideShowCoveredIEFix(false);
        config.setThrottleDelay(200);

        // connect the form's textfield with the java property       
        queryTF = new MyAutoCompleteTextField("textField",
                new PropertyModel(this, "query"), config) {

            @Override
            protected Iterator getChoices(String input) {
                return SearchBox.this.getQueryChoices(input).iterator();
            }

            @Override
            protected void onSelectionChange(AjaxRequestTarget target, String newValue) {
                SearchBox.this.onSelectionChange(target, newValue);
            }
        };
        queryTF.add(new DefaultFocusBehaviour());
        // autosubmit when user selects choice -> problem: the user text will be submitted although it should be cleared before submit
//        queryTF.add(new AjaxFormSubmitBehavior(form, "onchange") {
//
//            @Override
//            protected void onSubmit(AjaxRequestTarget target) {
//            }
//
//            @Override
//            protected void onError(AjaxRequestTarget target) {
//            }
//        });
        queryTF.setMarkupId("querybox");
        form.add(queryTF);

        MyAutoCompleteTextField userTF = new MyAutoCompleteTextField("userTextField",
                new PropertyModel(this, "userName"), config) {

            @Override
            protected Iterator getChoices(String input) {
                return SearchBox.this.getUserChoices(input).iterator();
            }

            @Override
            protected void onSelectionChange(AjaxRequestTarget target, String newValue) {
                //"Not supported yet."
            }
        };
        userTF.setMarkupId("userbox");

        rg.add(new Radio("0", new Model(0)).setMarkupId("sbnone"));
        rg.add(new Radio("1", new Model(1)).setMarkupId("sbfriends"));
        rg.add(new Radio("2", new Model(2)).setMarkupId("sbuser"));
        rg.add(userTF);
        if (showSpacer)
            form.add(new AttributeAppender("class", new Model("not-logged-in-spacer"), " "));

        form.add(rg);
       
View Full Code Here

            Form<Object> form = new Form<Object>("form");

            form.add(new TextArea<String>("opts", new PropertyModel<String>(YuiPanelAsWindowPage.this, "opts")));

            RadioGroup panelSelect = new RadioGroup("panelSelect", new PropertyModel(YuiPanelAsWindowPage.this, "panelId"));
            form.add(panelSelect);
            panelSelect.add(new Radio("p1", new Model(1)));
            panelSelect.add(new Radio("p2", new Model(2)));
            panelSelect.add(new Radio("p3", new Model(3)));
            panelSelect.add(new Radio("p4", new Model(4)));

            form.add(new AjaxSubmitLink("show") {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                    final String panelMarkupId = "yuiPanel" + YuiPanelAsWindowPage.this.panelId;
View Full Code Here

      RadioChoice rc = new RadioChoice("numberRadioChoice", NUMBERS).setSuffix("");
      rc.setLabel(new Model("number"));
      rc.setRequired(true);
      add(rc);

      RadioGroup group = new RadioGroup("numbersGroup");
      add(group);
      ListView persons = new ListView("numbers", NUMBERS)
      {
        @Override
        protected void populateItem(ListItem item)
        {
          item.add(new Radio("radio", item.getModel()));
          item.add(new Label("number", item.getModelObjectAsString()));
        };
      }.setReuseItems(true);
      group.add(persons);

      CheckGroup checks = new CheckGroup("numbersCheckGroup");
      add(checks);
      ListView checksList = new ListView("numbers", NUMBERS)
      {
View Full Code Here

      add(new CheckBox("booleanProperty"));
      RadioChoice rc = new RadioChoice("numberRadioChoice", NUMBERS).setSuffix("");
      rc.setLabel(new Model("number"));
      add(rc);

      RadioGroup group = new RadioGroup("numbersGroup");
      add(group);
      ListView persons = new ListView("numbers", NUMBERS) {
        protected void populateItem(ListItem item) {
          item.add(new Radio("radio", item.getModel()));
          item.add(new Label("number", item.getModelObjectAsString()));
        };
      };
      group.add(persons);

      CheckGroup checks = new CheckGroup("numbersCheckGroup");
      add(checks);
      ListView checksList = new ListView("numbers", NUMBERS) {
        protected void populateItem(ListItem item) {
View Full Code Here

TOP

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

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.