Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.LocalizedChoiceRenderer


        ApplicationContext applicationContext = GeoServerApplication.get().getApplicationContext();
        List<String> providers = new ArrayList<String>( Arrays.asList(applicationContext.getBeanNamesForType( LockProvider.class )));
        providers.remove("lockProvider"); // remove the global lock provider
        Collections.sort(providers);;
       
        DropDownChoice<String> lockProviderChoice = new DropDownChoice<String>("lockProvider", lockProviderModel, providers, new LocalizedChoiceRenderer(this));
       
        form.add( lockProviderChoice );
       
        // Extension plugin for Global Settings
        // Loading of the settings from the Global Info
View Full Code Here


        PropertyModel<String> storeNameModel = new PropertyModel<String>(diskQuotaModel, "quotaStore");
        if(diskQuotaModel.getObject().getQuotaStore() == null) {
            storeNameModel.setObject(JDBCQuotaStoreFactory.H2_STORE);
        }
        final DropDownChoice<String> quotaStoreChooser = new DropDownChoice<String>("diskQuotaStore", storeNameModel, storeNames,
                new LocalizedChoiceRenderer(this));
        quotaStoreChooser.setOutputMarkupId(true);
        quotaStoreContainer.add(quotaStoreChooser);
       
        // add the JDBC container
        final WebMarkupContainer jdbcContainer = new WebMarkupContainer("jdbcQuotaStoreContainer");
        jdbcContainer.setOutputMarkupId(true);
        jdbcContainer.setVisible("JDBC".equals(quotaStoreChooser.getModelObject()));
        quotaStoreContainer.add(jdbcContainer);
       
        // add a chooser for the dialect type
        List<String> dialectBeanNames = new ArrayList<String>(applicationContext.getBeansOfType(SQLDialect.class).keySet());
        List<String> dialectNames = new ArrayList<String>();
        for (String beanName : dialectBeanNames) {
            int idx = beanName.indexOf("QuotaDialect");
            if(idx > 0) {
                dialectNames.add(beanName.substring(0, idx));
            }
        }
        JDBCConfiguration config = jdbcQuotaConfigModel.getObject();
        IModel<String> dialectModel = new PropertyModel<String>(jdbcQuotaConfigModel, "dialect");
        DropDownChoice<String> dialectChooser = new DropDownChoice<String>("dialectChooser", dialectModel, dialectNames);
        dialectChooser.setRequired(true);
        jdbcContainer.add(dialectChooser);
       
        // add a chooser for the connection type
        List<String> connectionTypes = Arrays.asList("JNDI", "PRIVATE_POOL");
        Model<String> connectionTypeModel = new Model<String>();
        if(config.getJNDISource() == null) {
            connectionTypeModel.setObject("PRIVATE_POOL");
        } else {
            connectionTypeModel.setObject("JNDI");
        }
        final DropDownChoice<String> connectionTypeChooser = new DropDownChoice<String>("connectionTypeChooser",
                connectionTypeModel, connectionTypes, new LocalizedChoiceRenderer(this));
        connectionTypeChooser.setOutputMarkupId(true);
        jdbcContainer.add(connectionTypeChooser);
       
        // make the JDBC configuration visible only when the user chose a JDBC store
        quotaStoreChooser.add(new AjaxFormComponentUpdatingBehavior("onChange") {
View Full Code Here

        ApplicationContext applicationContext = GeoServerApplication.get().getApplicationContext();
        String[] lockProviders = applicationContext.getBeanNamesForType(LockProvider.class);
        List<String> lockProviderChoices = new ArrayList<String>(Arrays.asList(lockProviders));
        Collections.sort(lockProviderChoices); // make sure we get a stable listing order
        DropDownChoice<String> lockProviderChoice = new DropDownChoice<String>("lockProvider", lockProviderModel,
                lockProviderChoices, new LocalizedChoiceRenderer(this));
        configs.add(lockProviderChoice);


        IModel<Boolean> nonDefaultStylesModel;
        nonDefaultStylesModel = new PropertyModel<Boolean>(gwcConfigModel, "cacheNonDefaultStyles");
View Full Code Here

TOP

Related Classes of org.geoserver.web.wicket.LocalizedChoiceRenderer

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.