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

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


        template.append("if (");
       
       
        for (int i = 0; i < radioList.size(); i++) {
         
          Radio radio = radioList.get(i);
         
          template.append ("(Wicket.$('"+ radio.getMarkupId(true) +"').checked == false)");
       
          if (i > 0 && (i < (radioList.size()-1))) {
            template.append (" and ");
          }
          radio.setOutputMarkupId(true);
        }
       
        template.append("{"
          + "\nalert ('A selected row is required.');"
          + "\nreturn false;" + "\n}");
View Full Code Here


            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

      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);
View Full Code Here

     */
    protected final void doSelect(final int index)
    {
      if (formComponent instanceof RadioGroup)
      {
        Radio foundRadio = (Radio)formComponent.visitChildren(Radio.class,
            new SearchOptionByIndexVisitor(index));
        if (foundRadio == null)
        {
          fail("RadioGroup " + formComponent.getPath() + " does not have index:" + index);
        }
        assignValueToFormComponent(formComponent, foundRadio.getValue());
      }
      else if (formComponent instanceof CheckGroup)
      {
        Check foundCheck = (Check)formComponent.visitChildren(Check.class,
            new SearchOptionByIndexVisitor(index));
View Full Code Here

     */
    protected final void doSelect(final int index)
    {
      if (formComponent instanceof RadioGroup)
      {
        Radio foundRadio = (Radio)formComponent.visitChildren(Radio.class,
            new SearchOptionByIndexVisitor(index));
        if (foundRadio == null)
        {
          fail("RadioGroup " + formComponent.getPath() + " does not has index:"
              + index);
        }
        assignValueToFormComponent(formComponent, foundRadio.getValue());
      }
      else if (formComponent instanceof CheckGroup)
      {
        Check foundCheck = (Check)formComponent.visitChildren(Check.class,
            new SearchOptionByIndexVisitor(index));
View Full Code Here

     */
    protected final void doSelect(final int index)
    {
      if (formComponent instanceof RadioGroup)
      {
        Radio foundRadio = (Radio)formComponent.visitChildren(Radio.class,
            new SearchOptionByIndexVisitor(index));
        if (foundRadio == null)
        {
          fail("RadioGroup " + formComponent.getPath() + " does not has index:"
              + index);
        }
        assignValueToFormComponent(formComponent, foundRadio.getValue());
      }
      else if (formComponent instanceof CheckGroup)
      {
        Check foundCheck = (Check)formComponent.visitChildren(Check.class,
            new SearchOptionByIndexVisitor(index));
View Full Code Here

      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);
View Full Code Here

    {
      private static final long serialVersionUID = 1L;

      protected void populateItem(ListItem item)
      {
        item.add(new Radio("radio", new Model((Book)item.getModelObject())));
      }

    };
    radioGroupComponent.add(listView);
    return radioGroupComponent;
View Full Code Here

      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()));
        };
      }.setReuseItems(true);
      group.add(persons);
View Full Code Here

        form.add( new CheckBox("hitsIgnoreMaxFeatures"));
       
        //service level
        RadioGroup sl = new RadioGroup( "serviceLevel" );
        form.add( sl );
        sl.add( new Radio( "basic", new Model( WFSInfo.ServiceLevel.BASIC ) ) );
        sl.add( new Radio( "transactional", new Model( WFSInfo.ServiceLevel.TRANSACTIONAL  ) ) );
        sl.add( new Radio( "complete", new Model( WFSInfo.ServiceLevel.COMPLETE ) ) );
       
        IModel gml2Model = new LoadableDetachableModel(){
            public Object load(){
                return ((WFSInfo)info.getObject()).getGML().get(WFSInfo.Version.V_10);
            }
        };

        IModel gml3Model = new LoadableDetachableModel(){
            public Object load(){
                return ((WFSInfo)info.getObject()).getGML().get(WFSInfo.Version.V_11);
            }
        };

        IModel gml32Model = new LoadableDetachableModel() {
            @Override
            protected Object load() {
                return ((WFSInfo)info.getObject()).getGML().get(WFSInfo.Version.V_20);
            }
        };

        form.add(new GMLPanel("gml2", gml2Model));
        form.add(new GMLPanel("gml3", gml3Model));
        form.add(new GMLPanel("gml32", gml32Model));

        form.add( new CheckBox("canonicalSchemaLocation") );
       
        // Encode response with one featureMembers element or multiple featureMember elements
        RadioGroup eo = new RadioGroup("encodeFeatureMember");
        form.add(eo);
        eo.add(new Radio("featureMembers", new Model(Boolean.FALSE)));
        eo.add(new Radio("featureMember", new Model(Boolean.TRUE)));
       
        PropertyModel metadataModel = new PropertyModel(info, "metadata");
        IModel<Boolean> prjFormatModel = new MapModel(metadataModel,
                ShapeZipOutputFormat.SHAPE_ZIP_DEFAULT_PRJ_IS_ESRI);
        CheckBox defaultPrjFormat = new CheckBox("shapeZipPrjFormat", prjFormatModel);
View Full Code Here

TOP

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

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.