Package freemarker.ext.beans

Examples of freemarker.ext.beans.CollectionModel


                super.createConfiguration(data, clazz);
            cfg.setObjectWrapper(new ObjectToMapWrapper<NamespaceInfo>(NamespaceInfo.class) {
                @Override
                protected void wrapInternal(Map properties, SimpleHash model, NamespaceInfo object) {
                    List<ResourceInfo> stores = catalog.getResourcesByNamespace(object, ResourceInfo.class);
                    properties.put( "resources", new CollectionModel( stores, new ObjectToMapWrapper(ResourceInfo.class) ) );
                    properties.put( "isDefault",  object.equals( catalog.getDefaultNamespace() ) );
                }
            });
           
            return cfg;
View Full Code Here


            cfg.setObjectWrapper(new ObjectToMapWrapper<WMSStoreInfo>(WMSStoreInfo.class) {
                @Override
                protected void wrapInternal(Map properties, SimpleHash model, WMSStoreInfo object) {
                    List<WMSLayerInfo> wmsLayers = catalog.getResourcesByStore(object, WMSLayerInfo.class);
                   
                    properties.put( "wmsLayers", new CollectionModel( wmsLayers, new ObjectToMapWrapper(WMSLayerInfo.class) ) );
                }
            });
           
            return cfg;
        }
View Full Code Here

            cfg.setObjectWrapper(new ObjectToMapWrapper<DataStoreInfo>(DataStoreInfo.class) {
                @Override
                protected void wrapInternal(Map properties, SimpleHash model, DataStoreInfo object) {
                    List<FeatureTypeInfo> featureTypes = catalog.getFeatureTypesByDataStore(object);
                   
                    properties.put( "featureTypes", new CollectionModel( featureTypes, new ObjectToMapWrapper(FeatureTypeInfo.class) ) );
                }
            });
           
            return cfg;
        }
View Full Code Here

TOP

Related Classes of freemarker.ext.beans.CollectionModel

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.