public void templateListener(ValueChangeEvent event) throws Exception { if (event != null && event.getNewValue() != event.getOldValue()) { this.template = event.getNewValue().toString(); MetadataProfile tp = ObjectCachedLoader.loadProfile(URI.create(this.template)); profile.getStatements().clear(); profile.setStatements(tp.getStatements()); collectionSession.setProfile(profile); initBeanObjects(profile); } }
/** Check that at least one image is editable and if the profile is not empty */ @Override public boolean isImageEditable() { return super.isImageDeletable() && ObjectCachedLoader.loadProfile(collection.getProfile()).getStatements().size() > 0; }