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

Examples of org.apache.wicket.extensions.markup.html.form.palette.Palette


        });

        add(new DropDownChoice("defaultInterpolationMethod", new PropertyModel(coverage, "defaultInterpolationMethod"),
               new WCSInterpolationModel()));
        Palette interpolationMethods = new Palette("interpolationMethods", LiveCollectionModel
                .list(new PropertyModel(coverage, "interpolationMethods")),
                new WCSInterpolationModel(), new SimpleChoiceRenderer(), 7, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newSelectedHeader(final String componentId) {
                return new Label(componentId, new ResourceModel(
                        "InterpolationMethodsPalette.selectedHeader"));
            }

            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
            public Component newAvailableHeader(final String componentId) {
                return new Label(componentId, new ResourceModel(
                        "InterpolationMethodsPalette.availableHeader"));
            }
        };
        add(interpolationMethods);

        // don't allow editing the native format
        TextField nativeFormat = new TextField("nativeFormat", new PropertyModel(coverage, "nativeFormat"));
        nativeFormat.setEnabled(false);
        add(nativeFormat);

        Palette formatPalette = new Palette("formatPalette", LiveCollectionModel
                .list(new PropertyModel(coverage, "supportedFormats")), new WCSFormatsModel(),
                new SimpleChoiceRenderer(), 10, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
 
View Full Code Here


            }
        });

        // build a palette with no reordering allowed, since order doesn't affect anything
        IModel stylesModel = LiveCollectionModel.set(new PropertyModel(layerModel, "styles"));
        Palette extraStyles = new Palette("extraStyles", stylesModel, styles,
                new StyleNameRenderer(), 10, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
View Full Code Here

     *
     * @param userModel
     * @return
     */
    Palette rolesPalette(final IModel choiceModel) {
        return new Palette("roles", choiceModel, new Model((Serializable) roles),
                new SimpleChoiceRenderer(), 10, false) {

            // trick to force the palette to have at least one selected elements
            // tried with a nicer validator but it's not used at all, the required thing
            // instead is working (don't know why...)
View Full Code Here

  public PalettePage()
  {
    List persons = ComponentReferenceApplication.getPersons();
    IChoiceRenderer renderer = new ChoiceRenderer("fullName", "fullName");

    final Palette palette = new Palette("palette", new Model(new ArrayList()), new Model(
        (Serializable)persons), renderer, 10, true);


    Form form = new Form("form")
    {
      protected void onSubmit()
      {
        info("selected person(s): " + palette.getModelObjectAsString());
      }
    };

    add(form);
    form.add(palette);
View Full Code Here

        ListModel<String> selectedEntitlements = new ListModel<String>(roleTO.getEntitlements());

        ListModel<String> availableEntitlements = new ListModel<String>(entitlementRestClient.getAllEntitlements());

        entitlementsPalette = new Palette("entitlementsPalette", selectedEntitlements, availableEntitlements,
                new SelectChoiceRenderer(), 20, false);

        this.add(entitlementsPalette);
    }
View Full Code Here

    }

    private Palette<T> createPalette(final IModel<List<T>> model, final ListModel<T> choices,
            final IChoiceRenderer<T> renderer, final boolean allowOrder) {

        return new Palette("paletteField", model, choices, renderer, 8, allowOrder);
    }
View Full Code Here

    form.add(date);
    form.add(longitude);
    form.add(latitude);
   
    Roles roles = settings.getUserManagement().getAllRoles();
    Palette role = new Palette("roles", new Model(roles), new ChoiceRenderer("label", "label"), 6, false);
    form.add(role);
   
    form.add(new AjaxSubmitButton("save", form) {

      @Override
View Full Code Here

    name.setOutputMarkupId(true);
    form.add(name);
    form.add(password);

    Roles roles = settings.getUserManagement().getAllRoles();
    Palette role = new Palette("roles", new Model(roles), new ChoiceRenderer("label", "label"), 6, false);
    form.add(role);
   
    CheckBox admin = new CheckBox("admin");
    form.add(admin);
   
View Full Code Here

     *
     * @param userModel
     * @return
     */
    Palette rolesPalette(final IModel choiceModel) {
        return new Palette("roles", choiceModel, new Model((Serializable) roles),
                new SimpleChoiceRenderer(), 10, false) {

            // trick to force the palette to have at least one selected elements
            // tried with a nicer validator but it's not used at all, the required thing
            // instead is working (don't know why...)
View Full Code Here

            }
        });

        // build a palette with no reordering allowed, since order doesn't affect anything
        IModel stylesModel = LiveCollectionModel.set(new PropertyModel(layerModel, "styles"));
        Palette extraStyles = new Palette("extraStyles", stylesModel, styles,
                new StyleNameRenderer(), 10, false) {
            /**
             * Override otherwise the header is not i18n'ized
             */
            @Override
View Full Code Here

TOP

Related Classes of org.apache.wicket.extensions.markup.html.form.palette.Palette

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.