Skip to content

Commit

Permalink
Merge pull request #1709 from deegree/fix_faces_errors
Browse files Browse the repository at this point in the history
Fix some faces errors in admin console
  • Loading branch information
stephanr authored Jun 7, 2024
2 parents b735de0 + 8a5c3e3 commit 32086f1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,21 +378,23 @@ public String getTitle() throws ClassNotFoundException {
return fileName;
}

Workspace workspace = OGCFrontController.getServiceWorkspace().getNewWorkspace();
Class<?> cls = workspace.getModuleClassLoader().loadClass(resourceProviderClass);
ResourceMetadata<?> md = workspace.getResourceMetadata((Class) cls, id);

if (md == null) {
// lookup path if file will be created from template
ResourceManager<?> mgr = lookupResourceManager(workspace, cls);
if (mgr != null) {
return mgr.getMetadata().getWorkspacePath() + "/" + id;
if (resourceProviderClass != null) {
Workspace workspace = OGCFrontController.getServiceWorkspace().getNewWorkspace();
Class<?> cls = workspace.getModuleClassLoader().loadClass(resourceProviderClass);
ResourceMetadata<?> md = workspace.getResourceMetadata((Class) cls, id);

if (md == null) {
// lookup path if file will be created from template
ResourceManager<?> mgr = lookupResourceManager(workspace, cls);
if (mgr != null) {
return mgr.getMetadata().getWorkspacePath() + "/" + id;
}
}
}
else {
for (ResourceManager<? extends Resource> resourceManager : workspace.getResourceManagers()) {
if (resourceManager.getProviders().contains(md.getProvider())) {
return resourceManager.getMetadata().getWorkspacePath() + "/" + id;
else {
for (ResourceManager<? extends Resource> resourceManager : workspace.getResourceManagers()) {
if (resourceManager.getProviders().contains(md.getProvider())) {
return resourceManager.getMetadata().getWorkspacePath() + "/" + id;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<!-- end -->

<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<exception-type>jakarta.faces.application.ViewExpiredException</exception-type>
<location>/index.jsf</location>
</error-page>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<h:outputStylesheet name="buttons.css" />
<ui:insert name="additionCssInHeader" />
<h:outputScript library="js" name="console.js" />
<h:outputScript library="primefaces" name="jquery/jquery.js" />
</h:head>
<h:body>
<div id="PLEASEWAIT">
Expand Down

0 comments on commit 32086f1

Please sign in to comment.