Author: chathura
Date: Thu Dec 20 21:23:04 2007
New Revision: 11622
Log:
More UI improvements.
Modified:
branches/registry/0_1/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
branches/registry/0_1/modules/webapps/src/main/webapp/admin/error.jsp
branches/registry/0_1/modules/webapps/src/main/webapp/admin/js/CodeThatCalendar/dt_ex.js
Modified:
branches/registry/0_1/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
==============================================================================
---
branches/registry/0_1/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
(original)
+++
branches/registry/0_1/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
Thu Dec 20 21:23:04 2007
@@ -21,6 +21,7 @@
import org.wso2.registry.RegistryException;
import org.wso2.registry.Resource;
import org.wso2.registry.secure.SecureRegistry;
+import org.wso2.registry.secure.AuthorizationFailedException;
import org.wso2.registry.servlet.FileUploadUtil;
import org.wso2.registry.servlet.Utils;
import org.wso2.registry.web.actions.*;
@@ -836,9 +837,26 @@
request.getSession().setAttribute(UIConstants.RESOURCE_BEAN,
details);
request.getSession().setAttribute(UIConstants.COLLECTION_BEAN,
collection);
- } catch (Exception e) {
- setErrorMessage(request, e.getMessage());
- e.printStackTrace();
+ } catch (AuthorizationFailedException e) {
+
+ request.getSession().setAttribute(UIConstants.PATH_ATTR,
RegistryConstants.ROOT_PATH);
+ request.getSession().setAttribute(UIConstants.ERROR_CODE, "401
Unauthorized");
+ request.getSession().setAttribute(UIConstants.ERROR_MESSAGE,
e.getMessage());
+
+ try {
+
request.getRequestDispatcher(UIConstants.ERROR_JSP).forward(request, response);
+ } catch (ServletException e1) {
+ e1.printStackTrace();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+
+ return;
+
+ } catch(RegistryException re) {
+
+ setErrorMessage(request, re.getMessage());
+ re.printStackTrace();
}
try {
Modified: branches/registry/0_1/modules/webapps/src/main/webapp/admin/error.jsp
==============================================================================
--- branches/registry/0_1/modules/webapps/src/main/webapp/admin/error.jsp
(original)
+++ branches/registry/0_1/modules/webapps/src/main/webapp/admin/error.jsp
Thu Dec 20 21:23:04 2007
@@ -16,6 +16,8 @@
if (o != null) {
msg = (String) o;
}
+
+ request.getSession().setAttribute(UIConstants.ERROR_MESSAGE, null);
%>
<% if (errorCode != null) { %>
Modified:
branches/registry/0_1/modules/webapps/src/main/webapp/admin/js/CodeThatCalendar/dt_ex.js
==============================================================================
---
branches/registry/0_1/modules/webapps/src/main/webapp/admin/js/CodeThatCalendar/dt_ex.js
(original)
+++
branches/registry/0_1/modules/webapps/src/main/webapp/admin/js/CodeThatCalendar/dt_ex.js
Thu Dec 20 21:23:04 2007
@@ -1,6 +1,6 @@
var caldef3 = {
firstday:1,
- dtype:'MM/dd/yyyy:HH/mm/ss',
+ dtype:'yyyy/MM/dd:HH/mm/ss',
width:220,
windoww:270,
windowh:230,
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev