Examples of DropDownChoice


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

        declaredCRS = new CRSPanel("declaredSRS",
                new SRSToCRSModel(new PropertyModel(model, "sRS")));
        declaredCRS.setRequired(true);
        refForm.add(declaredCRS);

        projectionPolicy = new DropDownChoice("srsHandling", new PropertyModel(model,
                "projectionPolicy"), Arrays.asList(ProjectionPolicy.values()),
                new ProjectionPolicyRenderer());
        ResourceInfo ri = (ResourceInfo) model.getObject();
        if (((ResourceInfo) model.getObject()).getCRS() == null) {
            // no native, the only meaningful policy is to force
View Full Code Here

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

       
        updateSLD();
       
        //TODO: do not pass in layers directly, but load them via a detachable model
        form.add(layerChoice =
            new DropDownChoice("layers", new Model(), catalog.getLayers(), new ChoiceRenderer() {
                @Override
                public Object getDisplayValue(Object object) {
                    return ((LayerInfo)object).getName();
                }
        }));
        layerChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                LayerInfo l = (LayerInfo) layerChoice.getModelObject();
                mapPanel.update(l, null, target);

                updateStyles(l);
                target.addComponent(styleChoice);
               
                updateSLD();
                target.addComponent(sldTextArea);
            }
        });
        layerChoice.setModelObject(layer);
        layerChoice.setEnabled(l == null);
       
        form.add(styleChoice =
            new DropDownChoice("styles", new Model(), new ArrayList(layer.getStyles()), new ChoiceRenderer() {
                @Override
                public Object getDisplayValue(Object object) {
                    return ((StyleInfo)object).getName();
                }
        }));
View Full Code Here

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

                coverage.getResponseSRS().add(newResponseSRS);
                newResponseSRS = "";
            }
        });

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

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

            RasterTableSelectionPanel selectionPanel;
            selectionPanel = new RasterTableSelectionPanel(panelId, paramsModel, storeEditForm,
                    server, port, instance, user, password);
            add(selectionPanel);

            DropDownChoice tableDropDown = selectionPanel.getFormComponent();
            tableNameComponent = tableDropDown;
        } else {
            /*
             * We're editing an existing store. Don't allow to change the table name, it could be
             * catastrophic for the Catalog/ResourcePool as ability to get to the coverage is really
View Full Code Here

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

        final String title = String.valueOf(new ResourceModel(resourceKey + ".title").getObject());
        final SimpleAttributeModifier titleSetter = new SimpleAttributeModifier("title", title);
        label.add(titleSetter);
        add(label);

        final DropDownChoice existingArcSDECoverages;
        existingArcSDECoverages = new DropDownChoice("connectionPrototype", new Model(),
                new ArcSDEStoreListModel(), new ArcSDEStoreListChoiceRenderer());

        existingArcSDECoverages.add(titleSetter);
        add(existingArcSDECoverages);

        existingArcSDECoverages.add(new OnChangeAjaxBehavior() {
            private static final long serialVersionUID = 1L;

            @SuppressWarnings("unchecked")
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                final String storeId = existingArcSDECoverages.getValue();
                final List<StoreInfo> choices = existingArcSDECoverages.getChoices();
                for (StoreInfo store : choices) {
                    if (store.getId().equals(storeId)) {
                        Map<String, String> connParams = parseConnectionParameters(store);
                        server.setModelObject(connParams.get(SERVER_NAME_PARAM_NAME));
                        port.setModelObject(connParams.get(PORT_NUMBER_PARAM_NAME));
View Full Code Here

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

        if (tableNameModel.getObject() != null) {
            Object currentTableName = tableNameModel.getObject();
            choices.add(String.valueOf(currentTableName));
        }

        choice = new DropDownChoice("rasterTable", tableNameModel, choices);

        /*
         * Make table name match the option id
         */
        choice.setChoiceRenderer(new IChoiceRenderer() {
View Full Code Here

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

   
    public KMLLayerConfigPanel(String id, IModel model){
        super(id, model);

        PropertyModel metadata = new PropertyModel(model, "resource.metadata");
        add(new DropDownChoice("kml.regionateAttribute",
                new MapModel(metadata, "kml.regionateAttribute"),
                new AttributeNamesModel(new PropertyModel(model, "resource"))));
        add(new DropDownChoice("kml.regionateStrategy",
                    new MapModel(metadata, "kml.regionateStrategy"), KML_STRATEGIES)
           );
        TextField maxFeatures = new TextField("kml.regionateFeatureLimit",
                    new MapModel(metadata, "kml.regionateFeatureLimit"), Integer.class);
        maxFeatures.add(NumberValidator.minimum(1));
View Full Code Here

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

        });

        //print(page, true, true);

        final String dropDownPath = base + "tableNamePanel:border:rasterTable";
        final DropDownChoice choice = (DropDownChoice) tester
                .getComponentFromLastRenderedPage(dropDownPath);
        assertTrue(choice.getChoices().isEmpty());

        // simulate clicking on the refresh button
        String submitLink = base + "tableNamePanel:refresh";
        tester.executeAjaxEvent(submitLink, "onclick");
        FeedbackMessage feedbackMessage = formTester.getForm().getFeedbackMessage();
        assertNull(feedbackMessage);

        assertEquals(rasterColumns, choice.getChoices());
    }
View Full Code Here

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

        demoRequestsForm.setOutputMarkupId(true);
        demoRequestsForm.setModel(requestModel);
        add(demoRequestsForm);

        final List<String> demoList = getDemoList(demoDir);
        final DropDownChoice demoRequestsList;
        final IModel reqFileNameModel = new PropertyModel(requestModel, "requestFileName");
        demoRequestsList = new DropDownChoice("demoRequestsList", reqFileNameModel, demoList,
                new IChoiceRenderer() {
                    public String getIdValue(Object obj, int index) {
                        return String.valueOf(obj);
                    }

                    public Object getDisplayValue(Object obj) {
                        return obj;
                    }
                });
        demoRequestsForm.add(demoRequestsList);

        /*
         * Wanted to use a simpler OnChangeAjaxBehavior but target.addComponent(body) does not make
         * the EditAreaBehavior to update the body contents inside it, but instead puts the plain
         * TextArea contents above the empty xml editor
         */
        demoRequestsList.add(new AjaxFormSubmitBehavior(demoRequestsForm, "onchange") {

            @Override
            protected void onSubmit(AjaxRequestTarget target) {
                final String reqFileName = demoRequestsList.getModelValue();
                final String contents;

                final String baseUrl;
                {
                    WebRequest request = (WebRequest) DemoRequestsPage.this.getRequest();
View Full Code Here

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

        super(id, layerModel);

        // default style chooser. A default style is required
        StylesModel styles = new StylesModel();
        final PropertyModel defaultStyleModel = new PropertyModel(layerModel, "defaultStyle");
        final DropDownChoice defaultStyle = new DropDownChoice("defaultStyle", defaultStyleModel,
                styles, new StyleChoiceRenderer());
        defaultStyle.setRequired(true);
        add(defaultStyle);

        final Image defStyleImg = new Image("defaultStyleLegendGraphic");
        defStyleImg.setOutputMarkupId(true);
        add(defStyleImg);

        String wmsURL = getRequest().getRelativePathPrefixToContextRoot();
        wmsURL += wmsURL.endsWith("/")? "wms?" : "/wms?";
        final LegendGraphicAjaxUpdater defaultStyleUpdater;
        defaultStyleUpdater = new LegendGraphicAjaxUpdater(wmsURL, defStyleImg, defaultStyleModel);

        defaultStyle.add(new OnChangeAjaxBehavior() {
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                defaultStyleUpdater.updateStyleImage(target);
            }
        });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.