public LayerAuthoritiesAndIdentifiersConfigPanel( String id, IModel<? extends PublishedInfo> layerGroupModel) { super(id, layerGroupModel); // authority URLs and identifiers for this layer LayerAuthoritiesAndIdentifiersPanel authAndIds; authAndIds = new LayerAuthoritiesAndIdentifiersPanel( "authoritiesAndIds", false, layerGroupModel); add(authAndIds); } }
@SuppressWarnings("unchecked") public LayerAuthoritiesAndIdentifiersPanel(final String id, final boolean isRootLayer, final IModel<? extends CatalogInfo> layerModel) { super(id); // authority URLs for the this layer IModel<List<AuthorityURLInfo>> authURLsModel; authURLsModel = LiveCollectionModel.list(new PropertyModel<List<AuthorityURLInfo>>( layerModel, "authorityURLs")); AuthorityURLListEditor authUrlEditor = new AuthorityURLListEditor("authorityurls", authURLsModel); add(authUrlEditor); // Layer Identifiers for this layer IModel<List<LayerIdentifierInfo>> identifiersModel; identifiersModel = LiveCollectionModel.list(new PropertyModel<List<LayerIdentifierInfo>>( layerModel, "identifiers")); LayerIdentifierListEditor identifiersEditor = new LayerIdentifierListEditor( "layerIdentifiers", identifiersModel, authUrlEditor); if (!isRootLayer) { WMSInfo serviceInfo = WMS.get().getServiceInfo(); List<AuthorityURLInfo> rootLayerAuthorities = serviceInfo.getAuthorityURLs(); identifiersEditor.setBaseAuthorities(rootLayerAuthorities); } add(identifiersEditor); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public WMSLayerGroupConfig(String id, IModel layerGroupModel) { super(id, layerGroupModel); // authority URLs and identifiers for this layer LayerAuthoritiesAndIdentifiersPanel authAndIds; authAndIds = new LayerAuthoritiesAndIdentifiersPanel("authoritiesAndIds", false, layerGroupModel); add(authAndIds); } }
authAndIds = new LayerAuthoritiesAndIdentifiersPanel("authoritiesAndIds", false, layerModel); add(authAndIds);
authAndIds = new LayerAuthoritiesAndIdentifiersPanel("authoritiesAndIds", true, info); form.add(authAndIds);
authAndIds = new LayerAuthoritiesAndIdentifiersPanel("authoritiesAndIds", true, info); form.add(authAndIds);