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

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


        CheckGroup checkGroup = new CheckGroup("checkGroup", new PropertyModel(this, "selected"));
        add(checkGroup);
        checkGroup.add(new ListView("roleKeys", new PropertyModel(this, "choices")) {           
            protected void populateItem(ListItem listItem) {
                String roleKey = (String) listItem.getModelObject();
                listItem.add(new Check("checkBox", listItem.getModel()));
                listItem.add(new Label("roleKey", roleKey));
            }
        });
    }
View Full Code Here


        public List getObjectList() {
            return excelFile.getColumns();
        }               
       
        protected void populateItem(Item item) {
            item.add(new Check("check", new PropertyModel(item, "index")));
        }
View Full Code Here

       
        protected void populateItem(Item rowItem) {
            if(rowItem.getIndex() % 2 == 1) {
                rowItem.add(CLASS_ALT);
            }
            rowItem.add(new Check("check", new PropertyModel(rowItem, "index")));
            rowItem.add(new Label("index", rowItem.getIndex() + 1 + ""));
            List<Cell> rowCells = (List<Cell>) rowItem.getModelObject();
            rowItem.add(new ListView("cols", rowCells) {
                protected void populateItem(ListItem colItem) {                   
                    Cell cell = (Cell) colItem.getModelObject();
View Full Code Here

            private static final long serialVersionUID = 9101744072914090143L;

            @Override
            protected void populateItem(ListItem<String> item) {
                item.add(new Check("dcheck", item.getModel()));
                item.add(new Label("dname", new ResourceModel(item.getModelObject(), item.getModelObject())));
            }
        };
        dgroup.add(details);

        if (names.getObject() != null && !names.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("schemas", "sfragment", form);
            form.add(fragment);

            final CheckGroup sgroup = new CheckGroup("sCheckGroup", new PropertyModel(this, "selectedSchemas"));
            fragment.add(sgroup);

            final ListView<String> schemas = new ListView<String>("schemas", names) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("scheck", item.getModel()));
                    item.add(new Label("sname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            sgroup.add(schemas);
        } else {
            final Fragment fragment = new Fragment("schemas", "emptyFragment", form);
            form.add(fragment);

            selectedSchemas.clear();
        }

        if (vsnames.getObject() != null && !vsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("vschemas", "vsfragment", form);
            form.add(fragment);

            final CheckGroup vsgroup = new CheckGroup("vsCheckGroup", new PropertyModel(this, "selectedVirSchemas"));
            fragment.add(vsgroup);

            final ListView<String> virSchemas = new ListView<String>("virSchemas", vsnames) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("vscheck", item.getModel()));
                    item.add(new Label("vsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            vsgroup.add(virSchemas);
        } else {
            final Fragment fragment = new Fragment("vschemas", "emptyFragment", form);
            form.add(fragment);

            selectedVirSchemas.clear();
        }

        if (dsnames.getObject() != null && !dsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("dschemas", "dsfragment", form);
            form.add(fragment);

            final CheckGroup dsgroup = new CheckGroup("dsCheckGroup", new PropertyModel(this, "selectedDerSchemas"));
            fragment.add(dsgroup);

            final ListView<String> derSchemas = new ListView<String>("derSchemas", dsnames) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("dscheck", item.getModel()));
                    item.add(new Label("dsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            dsgroup.add(derSchemas);
        } else {
View Full Code Here

            private static final long serialVersionUID = 9101744072914090143L;

            @Override
            protected void populateItem(ListItem<String> item) {
                item.add(new Check("dcheck", item.getModel()));
                item.add(new Label("dname", new ResourceModel(item.getModelObject(), item.getModelObject())));
            }
        };
        dgroup.add(details);

        if (names.getObject() != null && !names.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("schemas", "sfragment", form);
            form.add(fragment);

            final CheckGroup sgroup = new CheckGroup("sCheckGroup", new PropertyModel(this, "selectedSchemas"));
            fragment.add(sgroup);

            final ListView<String> schemas = new ListView<String>("schemas", names) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("scheck", item.getModel()));
                    item.add(new Label("sname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            sgroup.add(schemas);
        } else {
            final Fragment fragment = new Fragment("schemas", "emptyFragment", form);
            form.add(fragment);

            selectedSchemas.clear();
        }

        if (vsnames.getObject() != null && !vsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("vschemas", "vsfragment", form);
            form.add(fragment);

            final CheckGroup vsgroup = new CheckGroup("vsCheckGroup", new PropertyModel(this, "selectedVirSchemas"));
            fragment.add(vsgroup);

            final ListView<String> virSchemas = new ListView<String>("virSchemas", vsnames) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("vscheck", item.getModel()));
                    item.add(new Label("vsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            vsgroup.add(virSchemas);
        } else {
            final Fragment fragment = new Fragment("vschemas", "emptyFragment", form);
            form.add(fragment);

            selectedVirSchemas.clear();
        }

        if (dsnames.getObject() != null && !dsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("dschemas", "dsfragment", form);
            form.add(fragment);

            final CheckGroup dsgroup = new CheckGroup("dsCheckGroup", new PropertyModel(this, "selectedDerSchemas"));
            fragment.add(dsgroup);

            final ListView<String> derSchemas = new ListView<String>("derSchemas", dsnames) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("dscheck", item.getModel()));
                    item.add(new Label("dsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            dsgroup.add(derSchemas);
        } else {
View Full Code Here

                final Fragment checkFrag;

                if (!enabled) {
                    checkFrag = new Fragment("rowCheck", "emptyCheckFrag", group.getParent());
                } else {
                    final Check check = new Check("check", item.getModel(), group);

                    check.setEnabled(checkVisibility);
                    check.setVisible(checkVisibility);

                    checkFrag = new Fragment("rowCheck", "rowCheckFrag", getParent());

                    checkFrag.add(check);
                }
View Full Code Here

      ListView checksList = new ListView("numbers", NUMBERS)
      {
        @Override
        protected void populateItem(ListItem item)
        {
          item.add(new Check("check", item.getModel()));
          item.add(new Label("number", item.getModelObjectAsString()));
        };
      }.setReuseItems(true);
      checks.add(checksList);
View Full Code Here

            private static final long serialVersionUID = 9101744072914090143L;

            @Override
            protected void populateItem(final ListItem<String> item) {
                item.add(new Check("dcheck", item.getModel()));
                item.add(new Label("dname", new ResourceModel(item.getModelObject(), item.getModelObject())));
            }
        };
        dgroup.add(details);

        if (names.getObject() == null || names.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("schemas", "emptyFragment", form);
            form.add(fragment);

            selectedSchemas.clear();
        } else {
            final Fragment fragment = new Fragment("schemas", "sfragment", form);
            form.add(fragment);

            final CheckGroup sgroup = new CheckGroup("sCheckGroup", new PropertyModel(this, "selectedSchemas"));
            fragment.add(sgroup);

            final ListView<String> schemas = new ListView<String>("schemas", names) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("scheck", item.getModel()));
                    item.add(new Label("sname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            sgroup.add(schemas);
        }

        if (dsnames.getObject() == null || dsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("dschemas", "emptyFragment", form);
            form.add(fragment);

            selectedDerSchemas.clear();
        } else {
            final Fragment fragment = new Fragment("dschemas", "dsfragment", form);
            form.add(fragment);

            final CheckGroup dsgroup = new CheckGroup("dsCheckGroup", new PropertyModel(this, "selectedDerSchemas"));
            fragment.add(dsgroup);

            final ListView<String> derSchemas = new ListView<String>("derSchemas", dsnames) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("dscheck", item.getModel()));
                    item.add(new Label("dsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            dsgroup.add(derSchemas);
        }

        if (vsnames.getObject() == null || vsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("vschemas", "emptyFragment", form);
            form.add(fragment);

            selectedVirSchemas.clear();
        } else {
            final Fragment fragment = new Fragment("vschemas", "vsfragment", form);
            form.add(fragment);

            final CheckGroup vsgroup = new CheckGroup("vsCheckGroup", new PropertyModel(this, "selectedVirSchemas"));
            fragment.add(vsgroup);

            final ListView<String> virSchemas = new ListView<String>("virSchemas", vsnames) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("vscheck", item.getModel()));
                    item.add(new Label("vsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            vsgroup.add(virSchemas);
        }
View Full Code Here

        }
        assignValueToFormComponent(formComponent, foundRadio.getValue());
      }
      else if (formComponent instanceof CheckGroup)
      {
        Check foundCheck = (Check)formComponent.visitChildren(Check.class,
            new SearchOptionByIndexVisitor(index));
        if (foundCheck == null)
        {
          fail("CheckGroup " + formComponent.getPath() + " does not have index:" + index);
        }

        assignValueToFormComponent(formComponent, foundCheck.getValue());
      }
      else
      {
        String idValue = selectAbstractChoice(formComponent, index);
        if (idValue == null)
View Full Code Here

        }
        assignValueToFormComponent(formComponent, foundRadio.getValue());
      }
      else if (formComponent instanceof CheckGroup)
      {
        Check foundCheck = (Check)formComponent.visitChildren(Check.class,
            new SearchOptionByIndexVisitor(index));
        if (foundCheck == null)
        {
          fail("CheckGroup " + formComponent.getPath() + " does not have index:"
              + index);
        }

        assignValueToFormComponent(formComponent, foundCheck.getValue());
      }
      else
      {
        String idValue = selectAbstractChoice(formComponent, index);
        if (idValue == null)
View Full Code Here

TOP

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

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.