Cancel-Button beim Anlegen von Child-Apps gefixt
git-svn-id: https://svn.libreccm.org/ccm/trunk@1882 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
a4b6fa2a04
commit
04ae9b5867
|
|
@ -15,7 +15,6 @@
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.arsdigita.portalworkspace.ui.admin;
|
package com.arsdigita.portalworkspace.ui.admin;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -42,15 +41,10 @@ import com.arsdigita.web.ApplicationTypeCollection;
|
||||||
public class ApplicationPane extends SimpleContainer {
|
public class ApplicationPane extends SimpleContainer {
|
||||||
|
|
||||||
private Map m_edit; // Map of application type -> edit config form
|
private Map m_edit; // Map of application type -> edit config form
|
||||||
|
|
||||||
private Map m_create;
|
private Map m_create;
|
||||||
|
|
||||||
private NewApplicationForm m_newApp;
|
private NewApplicationForm m_newApp;
|
||||||
|
|
||||||
private ApplicationDetails m_appDetails;
|
private ApplicationDetails m_appDetails;
|
||||||
|
|
||||||
private ActionLink m_editLink;
|
private ActionLink m_editLink;
|
||||||
|
|
||||||
private ApplicationSelectionModel m_app;
|
private ApplicationSelectionModel m_app;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -80,6 +74,7 @@ public class ApplicationPane extends SimpleContainer {
|
||||||
public Object initialValue(PageState state) {
|
public Object initialValue(PageState state) {
|
||||||
return m_app.getSelectedObject(state);
|
return m_app.getSelectedObject(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ApplicationTypeCollection types = ApplicationType
|
ApplicationTypeCollection types = ApplicationType
|
||||||
|
|
@ -119,6 +114,7 @@ public class ApplicationPane extends SimpleContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ApplicationCreateListener implements ActionListener {
|
private class ApplicationCreateListener implements ActionListener {
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
PageState state = e.getPageState();
|
PageState state = e.getPageState();
|
||||||
|
|
||||||
|
|
@ -131,9 +127,11 @@ public class ApplicationPane extends SimpleContainer {
|
||||||
m_appDetails.setVisible(state, false);
|
m_appDetails.setVisible(state, false);
|
||||||
m_editLink.setVisible(state, false);
|
m_editLink.setVisible(state, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ApplicationEditListener implements ActionListener {
|
private class ApplicationEditListener implements ActionListener {
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
PageState state = e.getPageState();
|
PageState state = e.getPageState();
|
||||||
|
|
||||||
|
|
@ -147,9 +145,11 @@ public class ApplicationPane extends SimpleContainer {
|
||||||
m_appDetails.setVisible(state, false);
|
m_appDetails.setVisible(state, false);
|
||||||
m_editLink.setVisible(state, false);
|
m_editLink.setVisible(state, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ApplicationCompleteCreateListener implements ActionListener {
|
private class ApplicationCompleteCreateListener implements ActionListener {
|
||||||
|
|
||||||
private Component m_src;
|
private Component m_src;
|
||||||
|
|
||||||
public ApplicationCompleteCreateListener(Component src) {
|
public ApplicationCompleteCreateListener(Component src) {
|
||||||
|
|
@ -161,12 +161,16 @@ public class ApplicationPane extends SimpleContainer {
|
||||||
|
|
||||||
ResourceConfigComponent c = (ResourceConfigComponent) m_src;
|
ResourceConfigComponent c = (ResourceConfigComponent) m_src;
|
||||||
Resource newResource = c.createResource(state);
|
Resource newResource = c.createResource(state);
|
||||||
|
if (newResource != null) {
|
||||||
|
|
||||||
|
|
||||||
c.setVisible(state, false);
|
c.setVisible(state, false);
|
||||||
|
|
||||||
// Copy categorization from nav app instance
|
// Copy categorization from nav app instance
|
||||||
Resource parentResource = newResource.getParentResource();
|
Resource parentResource = newResource.getParentResource();
|
||||||
Category.setRootForObject(newResource, Category
|
Category.setRootForObject(newResource, Category
|
||||||
.getRootForObject(parentResource));
|
.getRootForObject(parentResource));
|
||||||
|
}
|
||||||
|
|
||||||
m_newApp.setVisible(state, true);
|
m_newApp.setVisible(state, true);
|
||||||
m_appDetails.setVisible(state, true);
|
m_appDetails.setVisible(state, true);
|
||||||
|
|
@ -174,9 +178,11 @@ public class ApplicationPane extends SimpleContainer {
|
||||||
|
|
||||||
m_app.clearSelection(state);
|
m_app.clearSelection(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ApplicationCompleteEditListener implements ActionListener {
|
private class ApplicationCompleteEditListener implements ActionListener {
|
||||||
|
|
||||||
private Component m_src;
|
private Component m_src;
|
||||||
|
|
||||||
public ApplicationCompleteEditListener(Component src) {
|
public ApplicationCompleteEditListener(Component src) {
|
||||||
|
|
@ -196,6 +202,6 @@ public class ApplicationPane extends SimpleContainer {
|
||||||
|
|
||||||
m_app.clearSelection(state);
|
m_app.clearSelection(state);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue