incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1357908 - /incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
Date Thu, 05 Jul 2012 20:59:08 GMT
Author: rmatthews
Date: Thu Jul  5 20:59:07 2012
New Revision: 1357908

URL: http://svn.apache.org/viewvc?rev=1357908&view=rev
Log:
ISIS-162 - Now if no object exists the form is simply not rendered (so no error is generated).


Modified:
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java?rev=1357908&r1=1357907&r2=1357908&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
Thu Jul  5 20:59:07 2012
@@ -43,8 +43,6 @@ public abstract class AbstractFormView e
     @Override
     public void process(final Request request, final ObjectAdapter object) {
         final LinkedFieldsBlock tag = new LinkedFieldsBlock();
-        request.setBlockContent(tag);
-        request.processUtilCloseTag();
 
         if (object != null) {
             final String id = request.getOptionalProperty(ID, object.getSpecification().getShortIdentifier());

@@ -55,6 +53,9 @@ public abstract class AbstractFormView e
             final String evenRowClass = request.getOptionalProperty(EVEN_ROW_CLASS);
             final boolean showIcons = request.isRequested(SHOW_ICON, true); 
 
+            request.setBlockContent(tag);
+            request.processUtilCloseTag();
+
             final AuthenticationSession session = IsisContext.getAuthenticationSession();

             List<ObjectAssociation> associations = object.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(session,
object));
             final List<ObjectAssociation> fields = tag.includedFields(associations);
@@ -77,8 +78,10 @@ public abstract class AbstractFormView e
             }
 
             write(request, object, fields, linkFields, classString, title, oddRowClass, evenRowClass,
showIcons);
+            request.popBlockContent();
+        } else {
+            request.skipUntilClose(); 
         }
-        request.popBlockContent();
     }
 
     private void write(final Request request, final ObjectAdapter object, final List<ObjectAssociation>
fields, final LinkedObject[] linkFields, final String classString, final String title, final
String oddRowClass, final String evenRowClass, final boolean showIcons) {



Mime
View raw message