@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); }
WMSInfo serviceInfo = WMS.get().getServiceInfo(); List<AuthorityURLInfo> rootLayerAuthorities = serviceInfo.getAuthorityURLs(); identifiersEditor.setBaseAuthorities(rootLayerAuthorities);