incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1063200 - in /incubator/isis/trunk/viewer/scimpi: dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/ dispatcher/src/main/java/org/apache/isis/viewer...
Date Tue, 25 Jan 2011 10:04:37 GMT
Author: rmatthews
Date: Tue Jan 25 10:04:36 2011
New Revision: 1063200

URL: http://svn.apache.org/viewvc?rev=1063200&view=rev
Log:
Imrpoved error handling and hiding for users

Modified:
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/UserlessSession.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Diagnostics.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/ThrowException.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableCell.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FieldFactory.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/Selector.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractConditionalBlock.java
    incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/Dispatcher.java Tue Jan 25 10:04:36 2011
@@ -20,6 +20,7 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -32,13 +33,8 @@ import java.util.Map;
 import java.util.Stack;
 import java.util.TreeSet;
 
-import org.apache.log4j.Logger;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.io.SAXReader;
-
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.config.ConfigurationConstants;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.commons.factory.InstanceUtil;
@@ -63,8 +59,14 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.processor.HtmlFileParser;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.ProcessorLookup;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
+import org.apache.isis.viewer.scimpi.dispatcher.processor.TagProcessingException;
 import org.apache.isis.viewer.scimpi.dispatcher.util.MethodsUtils;
 import org.apache.isis.viewer.scimpi.dispatcher.view.Snippet;
+import org.apache.log4j.Logger;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
 
 
 public class Dispatcher {
@@ -82,12 +84,11 @@ public class Dispatcher {
     private HtmlFileParser parser = new HtmlFileParser(processors);
 
     public void process(RequestContext context, String servletPath) {
-
+        LOG.info("processing request " + servletPath);
         try {
             AuthenticationSession session = UserManager.startRequest(context);
             LOG.debug("exsiting session: " + session);
-            LOG.info("processing request " + servletPath);
-
+            
             IsisContext.getPersistenceSession().getTransactionManager().startTransaction();
             context.setRequestPath(servletPath);
             context.startRequest();
@@ -107,14 +108,17 @@ public class Dispatcher {
             if (transactionManager.getTransaction().getState().canCommit()) {
                 IsisContext.getPersistenceSession().getTransactionManager().endTransaction();
             }
+            
+            context.endRequest();
+            UserManager.endRequest(context.getSession());
+
         } catch (Throwable e) {
-           LOG.error(e.getMessage(), e);
+            LOG.error(e.getMessage(), e);
             
             DebugString error = new DebugString();
-            
             List<String> messages =  IsisContext.getMessageBroker().getMessages();
             for (String message : messages) {
-                context.getWriter().append("<div class=\"message\">message: " + message + "</div>");
+                context.getWriter().append("<div class=\"messaEge\">message: " + message + "</div>");
                 error.appendln("message", message);
             }
             messages =  IsisContext.getMessageBroker().getWarnings();
@@ -124,6 +128,7 @@ public class Dispatcher {
             }
 
             generateErrorPage(e, context, error);
+             
             PersistenceSession checkSession = IsisContext.getPersistenceSession();
             IsisTransactionManager transactionManager = checkSession.getTransactionManager();
             if (transactionManager.getTransaction().getState().canAbort()) {
@@ -133,20 +138,88 @@ public class Dispatcher {
             String message = "failed while processing " + servletPath;
             LOG.error(message + "\n" + error + "\n" + message, e);
 
-        } finally {
-            try {
-                context.endRequest();
-            } catch (Exception e) {
-                LOG.error("endRequest call failed", e);
-            }
+            
             try {
                 UserManager.endRequest(context.getSession());
-            } catch (Exception e) {
-                LOG.error("endRequest call failed", e);
+            } catch (Exception e1) {
+                LOG.error("endRequest call failed", e1);
+            }
+
+            Throwable ex;
+            if (e instanceof TagProcessingException) {
+                ex = e.getCause();
+            } else {
+                ex = e;
+            }
+            if (ex instanceof ForbiddenException) {
+                context.raiseError(403);
+            } else if (ex instanceof ScimpiNotFoundException) {
+                context.raiseError(404);
+            } else {
+                context.raiseError(500);    
             }
         }
     }
 
+
+    int nextId = 1000;
+    
+    private void generateErrorPage(Throwable exception, RequestContext requestContext, DebugString error) {
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        writeErrorContent(requestContext, exception, error, new PrintWriter(out), false);
+        
+        PrintWriter writer;
+        try {
+            String ref = Long.toString(System.currentTimeMillis(), 36).toUpperCase();
+            requestContext.addVariable("_error-ref", ref, Scope.INTERACTION);
+            String directory = IsisContext.getConfiguration().getString(ConfigurationConstants.ROOT + "scimpi.error-snapshots", ".");
+            writer = new PrintWriter(new File(directory, "error_" + ref + ".html"));
+            writeErrorContent(requestContext, exception, error, writer, true);
+        } catch (FileNotFoundException e) {
+            LOG.error("Failed to archive error page", e);
+        }
+    
+        String replace = "\\$\\{";
+        String withReplacement = "\\$&#x7B;";
+        requestContext.addVariable("_error-message", exception.getMessage().replaceAll(replace, withReplacement), Scope.INTERACTION);
+        requestContext.addVariable("_error-details", out.toString().replaceAll(replace, withReplacement), Scope.INTERACTION);
+        requestContext.clearTransientVariables();
+    }
+
+
+    public void writeErrorContent(
+            RequestContext requestContext,
+            Throwable exception,
+            DebugString error,
+            PrintWriter writer,
+            boolean includeHeader) {
+        DebugView errorView = new DebugView(writer, error);
+        if (includeHeader) {
+            errorView.header();
+        }
+        errorView.startTable();
+
+        errorView.divider("User");
+        errorView.appendRow("Session", requestContext.getSession());
+        errorView.appendRow("Name", requestContext.getSession().getUserName());
+        errorView.appendRow("Roles", requestContext.getSession().getRoles());
+
+        try {
+            errorView.exception(exception);
+            requestContext.append(errorView);
+        } catch (RuntimeException e) {
+            errorView.exception(e);
+        }
+        errorView.divider("Processing"); 
+        errorView.appendDebugTrace(requestContext.getDebugTrace()); 
+        errorView.endTable();
+        if (includeHeader) {
+            errorView.footer();
+        }
+        writer.close();
+    }
+
+    
     public void addParameter(String name, String value) {
         parameters.put(name, value);
     }
@@ -313,29 +386,6 @@ public class Dispatcher {
      */
     }
 
-    private void generateErrorPage(Throwable exception, RequestContext requestContext, DebugString error) {
-        requestContext.setStatus(500);
-        requestContext.setContentType("text/html");
-
-        PrintWriter writer = requestContext.getWriter();
-        DebugView errorView = new DebugView(writer, error);
-        errorView.header();
-        errorView.startTable();
-        try {
-            errorView.exception(exception);
-            requestContext.append(errorView);
-        } catch (RuntimeException e) {
-            errorView.exception(e);
-        }
-        errorView.divider("Processing"); 
-        errorView.appendDebugTrace(requestContext.getDebugTrace()); 
-        errorView.endTable();
-        errorView.footer();
-        writer.close();
-        
-        requestContext.clearTransientVariables();
-    }
-
     public void init(String dir) {
         addAction(new ActionAction());
         addAction(new DebugAction(this));

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/ForbiddenException.java Tue Jan 25 10:04:36 2011
@@ -20,6 +20,9 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher;
 
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.runtime.context.IsisContext;
+
 /**
  * Indicates that request could not complete as it could not access (for security reasons) some of the content.
  */
@@ -29,7 +32,7 @@ public class ForbiddenException extends 
     public ForbiddenException() {}
 
     public ForbiddenException(String message) {
-        super(message);
+        super(appendUsers(message));
     }
 
     public ForbiddenException(Throwable cause) {
@@ -37,7 +40,12 @@ public class ForbiddenException extends 
     }
 
     public ForbiddenException(String message, Throwable cause) {
-        super(message, cause);
+        super(appendUsers(message), cause);
+    }
+    
+    private static String appendUsers(String message) {
+        AuthenticationSession session = IsisContext.getAuthenticationSession();
+        return  message + " " + session.getUserName() + " " + session.getRoles();
     }
 
 }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/UserlessSession.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/UserlessSession.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/UserlessSession.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/UserlessSession.java Tue Jan 25 10:04:36 2011
@@ -21,23 +21,22 @@
 package org.apache.isis.viewer.scimpi.dispatcher;
 
 import java.io.IOException;
+import java.util.Arrays;
 
 import org.apache.isis.core.commons.authentication.AuthenticationSessionAbstract;
 import org.apache.isis.core.commons.encoding.DataInputExtended;
 
-public class UserlessSession extends AuthenticationSessionAbstract {
 
-	private static final long serialVersionUID = 1L;
+public class UserlessSession extends AuthenticationSessionAbstract {
 
-	public UserlessSession() {
-		super("__web_default", "");
-	}
+    private static final long serialVersionUID = 1L;
 
-	public UserlessSession(DataInputExtended input) throws IOException {
-		super(input);
-	}
+    public UserlessSession() {
+        super("__web_default", Arrays.asList(new String[] { "not-logged-in" }), "");
+    }
+
+    public UserlessSession(DataInputExtended input) throws IOException {
+        super(input);
+    }
 
-	
 }
-
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/context/RequestContext.java Tue Jan 25 10:04:36 2011
@@ -346,6 +346,7 @@ public abstract class RequestContext {
     }
 
     public String replaceVariables(String value, boolean ensureExists) {
+        LOG.debug("replacing" + value);
         int start = value.indexOf("${");
         if (start == -1) {
             return value;
@@ -656,7 +657,7 @@ public abstract class RequestContext {
 
     public abstract String getUri();
 
-    public void setStatus(int status) {}
+    public void raiseError(int status) {}
 
     public void setContentType(String string) {}
 

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java Tue Jan 25 10:04:36 2011
@@ -70,6 +70,8 @@ public class DebugAction implements Acti
         String action = context.getParameter("action");
         if ("i18n".equals(action)) {
             i18n(context, null);            
+        } else if ("authorization".equals(action)) {
+            authorization(context, null);            
         } else {
             DebugView view = new DebugView(context.getWriter(), new DebugString());
             view.header();
@@ -77,6 +79,7 @@ public class DebugAction implements Acti
             view.appendln("<a href=\"debug.app?action=system\">System</a>");
             view.appendln(" | <a href=\"debug.app?action=specifications\">List specifications</a>");
             view.appendln(" | <a href=\"debug.app?action=i18n\">I18N File</a>");
+            view.appendln(" | <a href=\"debug.app?action=authorization\">Authorization File</a>");
             view.appendln(" | <a href=\"debug.app?action=context\">Context</a>");
             view.appendln(" | <a href=\"debug.app?action=dispatcher\">Dispatcher</a>");
             view.appendln("</div>");
@@ -153,6 +156,38 @@ public class DebugAction implements Acti
         }
     }
 
+    private void authorization(RequestContext context, DebugView view) {
+        Collection<ObjectSpecification> allSpecifications = getSpecificationLoader().allSpecifications();
+        final List<ObjectSpecification> specs = Lists.newArrayList(allSpecifications);
+        Collections.sort(specs, new Comparator<ObjectSpecification>() {
+            public int compare(ObjectSpecification o1, ObjectSpecification o2) {
+                return o1.getShortIdentifier().compareTo(o2.getShortIdentifier());
+            }
+        });
+        Function<ObjectSpecification, String> className = ObjectSpecification.FUNCTION_FULLY_QUALIFIED_CLASS_NAME;
+        final List<String> fullIdentifierList = Lists.newArrayList(Collections2.transform(specs, className));
+        for (String fullIdentifier : fullIdentifierList) {
+            ObjectSpecification spec = getSpecificationLoader().loadSpecification(fullIdentifier);
+            if (spec.getAssociations().size() == 0 && spec.getObjectActionsAll().size() == 0) {
+                continue;
+            }
+            String name = spec.getIdentifier().toClassIdentityString();
+            context.getWriter().append("# " + spec.getShortIdentifier() +"\n");
+            context.getWriter().append("" + name + ":roles\n");
+            for (ObjectAssociation assoc : spec.getAssociations()) {
+                context.getWriter().append("#" + name + "#" + assoc.getId() + ":roles\n");
+             //   context.getWriter().append("#" + name + ".property." + assoc.getId() + ".description" + "=\n");
+              //  context.getWriter().append("#" + name + ".property." + assoc.getId() + ".help" + "=\n");
+            }
+            for (ObjectAction action : spec.getObjectActionsAll()) {
+                context.getWriter().append("#" + name + "#" + action.getId() + "():roles\n");
+             //   context.getWriter().append("#" + name + ".action." + action.getId() + ".description" + "=\n");
+            //    context.getWriter().append("#" + name + ".action." + action.getId() + ".help" + "=\n");
+            }
+            context.getWriter().append("\n");
+        }
+    }
+
     private void specification(RequestContext context, DebugView view) {
         String name = context.getParameter("name");
         ObjectSpecification spec = getSpecificationLoader().loadSpecification(name);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java Tue Jan 25 10:04:36 2011
@@ -22,6 +22,7 @@ package org.apache.isis.viewer.scimpi.di
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.version.Version;
@@ -58,6 +59,12 @@ public class EditAction implements Actio
             resultName = resultName == null ? RequestContext.RESULT : resultName;
             String override = context.getParameter(RESULT_OVERRIDE);
             
+            Locale locale = Locale.getDefault();
+            String localeString = context.getParameter("locale");
+            if (localeString != null) {
+                locale = new Locale(localeString);
+            }
+            
             ObjectAdapter adapter = context.getMappedObject(objectId);
             List<ObjectAssociation> fields = adapter.getSpecification().getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
             FormState entryState = validateObject(context, adapter, fields);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java Tue Jan 25 10:04:36 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.action;
 
 import java.util.List;
@@ -25,6 +24,7 @@ import java.util.List;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+import org.apache.isis.core.runtime.context.IsisContext;
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.ScimpiException;
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
@@ -34,7 +34,7 @@ import org.apache.isis.viewer.scimpi.dis
 
 
 public class RunAction extends AbstractElementProcessor {
-    
+
     @Override
     public void process(Request request) {
         RequestContext context = request.getContext();
@@ -52,11 +52,21 @@ public class RunAction extends AbstractE
         request.setBlockContent(parameterBlock);
         request.processUtilCloseTag();
         ObjectAdapter[] parameters = parameterBlock.getParameters(request);
-        
+
         if (!MethodsUtils.isVisibleAndUsable(object, action)) {
-            throw new ScimpiException("Action is not visible/enabled: " + action.getName());
+            throw new ScimpiException("Action '" + action.getId() + "' is not visible/enabled in "
+                    + action.getOnType().getFullIdentifier() + ", for " + IsisContext.getSession().getAuthenticationSession().getRoles());
+            /* TODO remove if the above is correct
+            if (action.isContributed()) {
+                throw new ScimpiException("Action '" + action.getId() + "' is not visible/enabled in "
+                        + action.getOnType().getFullIdentifier() + ", for " + IsisContext.getSession().getAuthenticationSession().getRoles());
+            } else {
+                throw new ScimpiException("Action '" + action.getId() + "' is not visible/enabled in "
+                        + object.getSpecification().getFullIdentifier() + ", for " + IsisContext.getSession().getAuthenticationSession().getRoles());
+            }
+            */
         }
-        
+
         // swap null parameter of the object's type to run a contributed method
         if (action.isContributed()) {
             final List<ObjectActionParameter> parameterSpecs = action.getParameters();
@@ -67,7 +77,7 @@ public class RunAction extends AbstractE
                 }
             }
         }
-        
+
         Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);
         MethodsUtils.runMethod(context, action, object, parameters, variableName, scope);
         request.popBlockContent();
@@ -79,4 +89,3 @@ public class RunAction extends AbstractE
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Diagnostics.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Diagnostics.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Diagnostics.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Diagnostics.java Tue Jan 25 10:04:36 2011
@@ -20,6 +20,9 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.debug;
 
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.runtime.context.IsisContext;
+import org.apache.isis.core.runtime.session.IsisSession;
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
@@ -38,6 +41,11 @@ public class Diagnostics extends Abstrac
             request.appendHtml("URI:  " + context.getUri());
             request.appendHtml("\n");
             request.appendHtml("File: " + context.fullFilePath(context.getResourceFile()));
+            request.appendHtml("\n");
+            
+            AuthenticationSession session = IsisContext.getAuthenticationSession();
+            request.appendHtml("Session:  " + session.getUserName() + " " + session.getRoles());
+            
             if (!isExcludeVariables) {
                 request.appendHtml("\n\n");
                 request.appendHtml("<a class=\"option\" target=\"debug\" href=\"debug.app\">Object</a>");

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/ThrowException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/ThrowException.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/ThrowException.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/ThrowException.java Tue Jan 25 10:04:36 2011
@@ -29,10 +29,8 @@ import org.apache.isis.viewer.scimpi.dis
 public class ThrowException extends AbstractElementProcessor {
 
     public void process(Request request) {
-        if (request.getContext().getDebug() == RequestContext.Debug.ON) {
-            String message = request.getOptionalProperty("message", "Exception throw for testing purposes");
-            throw new IsisException(message);
-        }
+		String message = request.getOptionalProperty("message", "Exception throw for testing purposes");
+        throw new IsisException(message);
     }
 
     public String getName() {

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java Tue Jan 25 10:04:36 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.display;
 
 import java.text.DecimalFormat;
@@ -25,6 +24,7 @@ import java.text.Format;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.progmodel.facets.value.date.DateValueFacet;
@@ -50,10 +50,12 @@ public class GetField extends AbstractEl
         if (field == null) {
             throw new ScimpiException("No field " + fieldName + " in " + object.getSpecification().getFullIdentifier());
         }
-        if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
-            throw new ForbiddenException("Field " + fieldName + " in " + object + " is not visible");
+        AuthenticationSession session = IsisContext.getAuthenticationSession();
+        if (field.isVisible(session, object).isVetoed()) {
+            throw new ForbiddenException("Field '" + fieldName + "' in " + object.getSpecification().getFullIdentifier()
+                    + " is not visible for " + session.getUserName() + " " + session.getRoles());
         }
-        
+
         String pattern = request.getOptionalProperty("decimal-format");
         Format format = null;
         if (pattern != null) {
@@ -63,11 +65,11 @@ public class GetField extends AbstractEl
         if (pattern != null) {
             format = new SimpleDateFormat(pattern);
         }
-        
+
         String name = request.getOptionalProperty(RESULT_NAME, fieldName);
         String scopeName = request.getOptionalProperty(SCOPE);
         Scope scope = RequestContext.scope(scopeName, Scope.REQUEST);
-        
+
         process(request, object, field, format, name, scope);
     }
 
@@ -77,11 +79,11 @@ public class GetField extends AbstractEl
             DateValueFacet facet = fieldReference.getSpecification().getFacet(DateValueFacet.class);
             Date date = facet.dateValue(fieldReference);
             String value = format.format(date);
-            request.appendDebug("    " + object + " -> " + value); 
+            request.appendDebug("    " + object + " -> " + value);
             request.getContext().addVariable(name, value, scope);
         } else {
             String source = fieldReference == null ? "" : request.getContext().mapObject(fieldReference, scope);
-            request.appendDebug("    " + object + " -> " + source); 
+            request.appendDebug("    " + object + " -> " + source);
             request.getContext().addVariable(name, source, scope);
         }
     }
@@ -91,4 +93,3 @@ public class GetField extends AbstractEl
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableCell.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableCell.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableCell.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableCell.java Tue Jan 25 10:04:36 2011
@@ -24,7 +24,6 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.runtime.context.IsisContext;
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
-import org.apache.isis.viewer.scimpi.dispatcher.ForbiddenException;
 import org.apache.isis.viewer.scimpi.dispatcher.ScimpiException;
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
@@ -42,22 +41,23 @@ public class TableCell extends AbstractE
         if (field == null) {
             throw new ScimpiException("No field " + fieldName + " in " + object.getSpecification().getFullIdentifier());
         }
-        if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
-            throw new ForbiddenException("Field " + fieldName + " in " + object + " is not visible");
-        }
         request.appendHtml("<td" + className + ">");
-        ObjectAdapter fieldReference = field.get(object);
-        String source = fieldReference == null ? "" : request.getContext().mapObject(fieldReference, Scope.REQUEST);
-        String name = request.getOptionalProperty(RESULT_NAME, fieldName);
-        request.getContext().addVariable(name, source, Scope.REQUEST);
-        
-        request.pushNewBuffer();
-        request.processUtilCloseTag();
-        String buffer = request.popBuffer();
-        if (buffer.trim().length() == 0) {
-            request.appendHtml( fieldReference == null ? "" : fieldReference.titleString());
+        if (field.isVisible(IsisContext.getAuthenticationSession(), object).isAllowed()) {
+            ObjectAdapter fieldReference = field.get(object);
+            String source = fieldReference == null ? "" : request.getContext().mapObject(fieldReference, Scope.REQUEST);
+            String name = request.getOptionalProperty(RESULT_NAME, fieldName);
+            request.getContext().addVariable(name, source, Scope.REQUEST);
+            
+            request.pushNewBuffer();
+            request.processUtilCloseTag();
+            String buffer = request.popBuffer();
+            if (buffer.trim().length() == 0) {
+                request.appendHtml( fieldReference == null ? "" : fieldReference.titleString());
+            } else {
+                request.appendHtml(buffer);
+            }
         } else {
-            request.appendHtml(buffer);
+            request.skipUntilClose();
         }
         request.appendHtml("</td>");
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java Tue Jan 25 10:04:36 2011
@@ -21,6 +21,8 @@
 package org.apache.isis.viewer.scimpi.dispatcher.view.edit;
 
 import java.util.List;
+import java.util.Locale;
+import java.util.TimeZone;
 
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -59,6 +61,13 @@ public class EditObject extends Abstract
         String scope = request.getOptionalProperty(SCOPE);
         String className = request.getOptionalProperty(CLASS, "edit");
         String id = request.getOptionalProperty(ID);
+/*        
+        String localeId = request.getOptionalProperty("locale");
+        String timeZoneId = request.getOptionalProperty("timezone");
+        
+ */
+        Locale locale = null; // new Locale(localeId);
+        TimeZone timeZone = null; //TimeZone.getTimeZone(timeZoneId);
 
         final ObjectAdapter object = context.getMappedObjectOrResult(objectId);
         String actualObjectId = context.mapObject(object, Scope.INTERACTION);
@@ -84,7 +93,7 @@ public class EditObject extends Abstract
         FormState entryState = (FormState) context.getVariable(ENTRY_FIELDS);
         initializeFields(context, object, formFields, entryState, !hideNonEditableFields);
         setDefaults(context, object, formFields, entryState);
-        copyFieldContent(context, object, formFields);
+        copyFieldContent(context, object, formFields, locale, timeZone);
         overrideWithHtml(context, containedBlock, formFields);
         if (entryState != null && entryState.isForForm(actualObjectId)) {
             copyEntryState(context, object, formFields, entryState);
@@ -197,7 +206,7 @@ public class EditObject extends Abstract
         }
     }
 
-    private void copyFieldContent(RequestContext context, ObjectAdapter object, InputField[] formFields) {
+    private void copyFieldContent(RequestContext context, ObjectAdapter object, InputField[] formFields, Locale locale, TimeZone TimeZone) {
         for (int i = 0; i < formFields.length; i++) {
             String fieldName = formFields[i].getName();
             ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
@@ -206,12 +215,12 @@ public class EditObject extends Abstract
                 IsisContext.getPersistenceSession().resolveField(object, field);
                 ObjectAdapter fieldValue = field.get(object);
                 if (inputField.isEditable()) {
-                    String value = getValue(context, fieldValue);
+                    String value = getValue(context, fieldValue, locale, TimeZone);
                     if (!value.equals("") || inputField.getValue() == null) {
                         inputField.setValue(value);
                     }
                 } else {
-                    String entry = getValue(context, fieldValue);
+                    String entry = getValue(context, fieldValue, locale, TimeZone);
                     inputField.setHtml(entry);
                     inputField.setType(InputField.HTML);
 
@@ -305,13 +314,25 @@ public class EditObject extends Abstract
         }
     }
 
-    private String getValue(RequestContext context, ObjectAdapter field) {
+    private String getValue(RequestContext context, ObjectAdapter field, Locale locale, TimeZone timeZone) {
         if (field == null) {
             return "";
         }
-        if (field.getSpecification().getFacet(ParseableFacet.class) == null) {
+        ParseableFacet facet = field.getSpecification().getFacet(ParseableFacet.class);
+        if (facet == null) {
             return context.mapObject(field, Scope.INTERACTION);
         } else {
+            /*
+            if ( field.getObject() instanceof DateTime) {
+                Date date = ((DateTime) field.getObject()).dateValue();
+                
+                DateFormat format = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, locale);
+                format.setTimeZone(timeZone);
+                
+                return format.format(date);
+            } else {
+            }
+            */
             return field.titleString();
         }
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FieldFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FieldFactory.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FieldFactory.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FieldFactory.java Tue Jan 25 10:04:36 2011
@@ -75,7 +75,7 @@ public class FieldFactory {
             } else if (spec.getFullIdentifier().endsWith(".Password")) {
                 field.setType(InputField.PASSWORD);
             } else {
-                field.setType(InputField.TEXT);
+                field.setType(InputField.TEXT); 
             }
 
         } else {

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/Selector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/Selector.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/Selector.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/Selector.java Tue Jan 25 10:04:36 2011
@@ -97,19 +97,21 @@ public class Selector extends AbstractEl
         }
     }
         
-    private String showSelectionList(Request request,  ObjectAdapter collection, String type) {
+    private String showSelectionList(Request request, ObjectAdapter collection, String type) {
             String field = request.getRequiredProperty(FIELD);
             CollectionFacet facet = (CollectionFacet) collection.getSpecification().getFacet(CollectionFacet.class);
             
-            if (facet.size(collection) == 1) {
+            boolean allowNotSet = true;
+            
+            if (facet.size(collection) == 1 && !allowNotSet) {
                 return onlyItem(request, field, collection, facet);
             } else if (type.equals("radio")) {
-                return radioButtonList(request, field, collection, facet);
+                return radioButtonList(request, field, allowNotSet, collection, facet);
             } else if (type.equals("list")) {
                 String size = request.getOptionalProperty("size", "5");
-                return dropdownList(request, field, collection, size, facet);
+                return dropdownList(request, field, allowNotSet, collection, size, facet);
             } else if (type.equals("dropdown")) {
-                return dropdownList(request, field, collection, null, facet);
+                return dropdownList(request, field, allowNotSet, collection, null, facet);
             } else {
                 throw new UnknownTypeException(type);
             }
@@ -127,10 +129,14 @@ public class Selector extends AbstractEl
         return buffer.toString();
     }
 
-    private String radioButtonList(Request request, String field, ObjectAdapter collection, CollectionFacet facet) {
+    private String radioButtonList(Request request, String field, boolean allowNotSet, ObjectAdapter collection, CollectionFacet facet) {
         RequestContext context = request.getContext();
         Iterator<ObjectAdapter> iterator = facet.iterator(collection);
         StringBuffer buffer = new StringBuffer();
+        if (allowNotSet) {
+            buffer.append("<input type=\"radio\" name=\"" + field + "\" value=\"null\">" + "[not set]"
+                    + "</input><br/>\n");
+        }
         while (iterator.hasNext()) {
             ObjectAdapter element = iterator.next();
             String elementId = context.mapObject(element, Scope.INTERACTION);
@@ -143,12 +149,15 @@ public class Selector extends AbstractEl
         return buffer.toString();
     }
 
-    private String dropdownList(Request request, String field, ObjectAdapter collection, String size, CollectionFacet facet) {
+    private String dropdownList(Request request, String field, boolean allowNotSet, ObjectAdapter collection, String size, CollectionFacet facet) {
         RequestContext context = request.getContext();
         Iterator<ObjectAdapter> iterator = facet.iterator(collection);
         StringBuffer buffer = new StringBuffer();
         size = size == null ? "" : " size =\"" + size + "\"";
         buffer.append("<select name=\"" + field + "\"" + size + " >\n");
+        if (allowNotSet) {
+            buffer.append("  <option value=\"null\">" + "[not set]" + "</option>\n");
+        }
         while (iterator.hasNext()) {
             ObjectAdapter element = iterator.next();
             String elementId = context.mapObject(element, Scope.INTERACTION);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java Tue Jan 25 10:04:36 2011
@@ -167,7 +167,7 @@ public class InputForm {
             String selectedSegment = field.getValue() == null || ids[i].equals(field.getValue()) ? " selected=\"selected\"" : "";
             str.append("    <option value=\"" + ids[i] + "\"" + selectedSegment + ">" + options[i] + "</option>\n");
         }
-        if (field.getType()  == InputField.TEXT) {
+        if (field.getType() == InputField.TEXT) {
             str.append("    <option value=\"-OTHER-\">Other:</option>\n");
         }
         str.append("  </select>");

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractConditionalBlock.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractConditionalBlock.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractConditionalBlock.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractConditionalBlock.java Tue Jan 25 10:04:36 2011
@@ -22,6 +22,7 @@ package org.apache.isis.viewer.scimpi.di
 
 import java.util.List;
 
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
@@ -159,6 +160,21 @@ public abstract class AbstractConditiona
             processTags(hasType, request);
             return;
         }
+
+        String hasRole = request.getOptionalProperty("has-role");
+        if (hasRole != null) {
+            AuthenticationSession session = IsisContext.getSession().getAuthenticationSession();
+            List<String> roles = session.getRoles();
+            boolean hasMatchingRole = false;
+            for (String role : roles) {
+                if (role.equals(hasRole.trim())) {
+                    hasMatchingRole = true;
+                    break;
+                }
+            }
+            processTags(hasMatchingRole, request);
+            return;
+        }
         
         if (request.isPropertySpecified("empty")) {
             if (request.isPropertySet("empty")) {

Modified: incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java?rev=1063200&r1=1063199&r2=1063200&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java (original)
+++ incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java Tue Jan 25 10:04:36 2011
@@ -47,9 +47,10 @@ public class ServletRequestContext exten
     private ServletContext servletContext;
 
     public void append(DebugView view) {
+        /*
         view.divider("System");
-     //   Runtime.getRuntime().
-
+        Runtime.getRuntime().
+		*/
         view.divider("Request");
         view.appendRow("Auth type", request.getAuthType());
         view.appendRow("Character encoding", request.getCharacterEncoding());
@@ -222,14 +223,14 @@ public class ServletRequestContext exten
         }
     }
     
-    public void setStatus(int status) {
-        /*
+    public void raiseError(int status) {
+        
         try {
             getResponse().sendError(status);
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
-        */
+        
         getResponse().setStatus(status);
     }
     



Mime
View raw message