incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1051708 - in /incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher: debug/ processor/ view/action/ view/display/ view/edit/ view/form/ view/simple/
Date Wed, 22 Dec 2010 00:14:08 GMT
Author: rmatthews
Date: Wed Dec 22 00:14:07 2010
New Revision: 1051708

URL: http://svn.apache.org/viewvc?rev=1051708&view=rev
Log:
Fixed some invalid XHTML constructs

Modified:
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugView.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/ProcessorLookup.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionButton.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/FieldValue.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableView.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormEntry.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/RadioListField.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/AbstractLink.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugView.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugView.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugView.java
Wed Dec 22 00:14:07 2010
@@ -35,8 +35,10 @@ public class DebugView {
     }
     
     public void header() {
+        appendln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
         appendln("<html>");
         appendln("<head>");
+        appendln("<title>Debug Details</title>");
         appendln("<style type=\"text/css\">");
         appendln("body { margin: 15px; }\n" +
                 "links { font-size: 80%; padding-bottom:5px; }\n" +  
@@ -54,7 +56,7 @@ public class DebugView {
 
     public void startTable() {
         writer.flush();
-        writer.println("<table class=\"debug\" width=\"100%\">");
+        writer.println("<table class=\"debug\" width=\"100%\" summary=\"Debug details\"
>");
     }
 
     public void exception(Throwable e) {

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/ProcessorLookup.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/ProcessorLookup.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/ProcessorLookup.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/ProcessorLookup.java
Wed Dec 22 00:14:07 2010
@@ -76,6 +76,7 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.ContentTag;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.DefaultValue;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.EditLink;
+import org.apache.isis.viewer.scimpi.dispatcher.view.simple.EndSession;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.GetCookie;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.Import;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.InitializeFromCookie;
@@ -89,6 +90,7 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.SetCookie;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.SetCookieFromField;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.SetFieldFromCookie;
+import org.apache.isis.viewer.scimpi.dispatcher.view.simple.StartSession;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.TemplateTag;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.Unless;
 import org.apache.isis.viewer.scimpi.dispatcher.view.simple.Variable;
@@ -175,6 +177,9 @@ public class ProcessorLookup {
         addElementProcessor(new Warnings());
         addElementProcessor(new When());
         
+        addElementProcessor(new StartSession());
+        addElementProcessor(new EndSession());
+
         addElementProcessor(new SetCookie());
         addElementProcessor(new GetCookie());
         addElementProcessor(new SetCookieFromField());

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionButton.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionButton.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionButton.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionButton.java
Wed Dec 22 00:14:07 2010
@@ -124,13 +124,13 @@ public class ActionButton extends Abstra
         request.appendHtml("\n<form " + idSegment + classSegment + " action=\"action.app\"
method=\"post\">\n");
         if (objectId == null) {
             request.appendHtml("  <input type=\"hidden\" name=\"" + OBJECT + "\" value=\""
+ 
-                    context.getVariable(RequestContext.RESULT) + "\">\n");
+                    context.getVariable(RequestContext.RESULT) + "\" />\n");
         } else {
-            request.appendHtml("  <input type=\"hidden\" name=\"" + OBJECT + "\" value=\""
+ objectId + "\">\n");
+            request.appendHtml("  <input type=\"hidden\" name=\"" + OBJECT + "\" value=\""
+ objectId + "\" />\n");
         }
-        request.appendHtml("  <input type=\"hidden\" name=\"" + VERSION + "\" value=\""
+ version + "\">\n");
+        request.appendHtml("  <input type=\"hidden\" name=\"" + VERSION + "\" value=\""
+ version + "\" />\n");
         if (scope != null) {
-            request.appendHtml("  <input type=\"hidden\" name=\"" + SCOPE + "\" value=\""
+ scope + "\">\n");
+            request.appendHtml("  <input type=\"hidden\" name=\"" + SCOPE + "\" value=\""
+ scope + "\" />\n");
         }
         request.appendHtml("  <input type=\"hidden\" name=\"" + METHOD + "\" value=\""
+ action.getId() + "\" />\n");
         if (forwardResultTo != null) {

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
Wed Dec 22 00:14:07 2010
@@ -38,14 +38,14 @@ public class ActionLink extends Abstract
         String forwardResultTo = request.getOptionalProperty(VIEW);
         String forwardVoidTo = request.getOptionalProperty(VOID);
         String resultOverride = request.getOptionalProperty(RESULT_OVERRIDE);
-        String resultOverrideSegment = resultOverride == null ? "" : "&" + RESULT_OVERRIDE
+ "=" + resultOverride;
+        String resultOverrideSegment = resultOverride == null ? "" : "&amp;" + RESULT_OVERRIDE
+ "=" + resultOverride;
         String resultName = request.getOptionalProperty(RESULT_NAME);
-        String resultNameSegment = resultName == null ? "" : "&" + RESULT_NAME + "="
+ resultName;
+        String resultNameSegment = resultName == null ? "" : "&amp;" + RESULT_NAME +
"=" + resultName;
         String scope = request.getOptionalProperty(SCOPE);
-        String scopeSegment = scope == null ? "" : "&" + SCOPE + "=" + scope;
+        String scopeSegment = scope == null ? "" : "&amp;" + SCOPE + "=" + scope;
         String confirm = request.getOptionalProperty(CONFIRM);
         // TODO need a mechanism for globally dealing with encoding; then use the new encode
method
-        String confirmSegment = confirm == null ? "" : "&" + CONFIRM + "=" + URLEncoder.encode(confirm);
+        String confirmSegment = confirm == null ? "" : "&amp;" + CONFIRM + "=" + URLEncoder.encode(confirm);
 
         RequestContext context = request.getContext();
         ObjectAdapter object = MethodsUtils.findObject(context, objectId);
@@ -88,10 +88,10 @@ public class ActionLink extends Abstract
         }
         
         String interactionParamters = context.encodedInteractionParameters();
-        String forwardResultSegment = forwardResultTo == null ? "" :  "&" + VIEW + "="
+ context.fullFilePath(forwardResultTo);
+        String forwardResultSegment = forwardResultTo == null ? "" :  "&amp;" + VIEW
+ "=" + context.fullFilePath(forwardResultTo);
         String voidView = context.fullFilePath(forwardVoidTo == null ? context.getResourceFile()
: forwardVoidTo);
-        String forwardVoidSegment = "&" + VOID + "=" + voidView;
-        request.appendHtml("<a href=\"action.app?" + OBJECT + "=" + objectId + "&"
+ VERSION + "=" + version + "&" + METHOD + "=" + method
+        String forwardVoidSegment = "&amp;" + VOID + "=" + voidView;
+        request.appendHtml("<a href=\"action.app?" + OBJECT + "=" + objectId + "&amp;"
+ VERSION + "=" + version + "&amp;" + METHOD + "=" + method
                 + forwardResultSegment + forwardVoidSegment + resultNameSegment + parameterSegment
+ scopeSegment + confirmSegment + interactionParamters + "\">");
         request.appendHtml(text);
         request.appendHtml("</a>");

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java
Wed Dec 22 00:14:07 2010
@@ -141,7 +141,7 @@ public class Methods extends AbstractEle
                   //  parameters.id = request.getOptionalProperty(ID);
                     ActionForm.createForm(request, params, true);
                 } else {
-                    request.appendHtml("<a href=\"_generic_action." + Dispatcher.EXTENSION
+ "?_result=" + objectId + "&" + VERSION + "=" + version + "&method="
+                    request.appendHtml("<a href=\"_generic_action." + Dispatcher.EXTENSION
+ "?_result=" + objectId + "&amp;" + VERSION + "=" + version + "&method="
                             + action.getId() + "\" title=" + action.getDescription() + ">"
+ action.getName() + "</a>");
                 }
             }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
Wed Dec 22 00:14:07 2010
@@ -97,18 +97,16 @@ public abstract class AbstractFormView e
             } else {
                 cls = " class=\"field " + (evenRowClass == null ? EVEN_ROW_CLASS : evenRowClass)
+ "\"";
             }
-            request.appendHtml("<div " + cls + description + "><span class=\"label\">");
-            request.appendHtml(field.getName());
-            request.appendHtml(":</span><span class=\"value\">");
+            request.appendHtml("<div " + cls + description + "><span class=\"label\">"
+ field.getName() + ":</span>");
             LinkedObject linkedObject = linkFields[i];
             addField(request, object, field, linkedObject);
-            request.appendHtml("</span></div>");
+            request.appendHtml("</div>");
         }
         request.appendHtml("</div>");
     }
 
     protected void addField(Request request, ObjectAdapter object, ObjectAssociation field,
LinkedObject linkedObject) {
-        FieldValue.write(request, object, field, linkedObject, null, true, 0);
+        FieldValue.write(request, object, field, linkedObject, "value", true, 0);
     }
 
     protected boolean ignoreField(ObjectAssociation objectField) {

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java
Wed Dec 22 00:14:07 2010
@@ -68,6 +68,7 @@ public abstract class AbstractTableView 
             facet = collection.getTypeOfFacet();
         }
 
+        String summary = request.getOptionalProperty("summary");
         String rowClassesList = request.getOptionalProperty(ROW_CLASSES, ODD_ROW_CLASS +
"|" + EVEN_ROW_CLASS);
         String[] rowClasses = null;
         if (rowClassesList.length() > 0) {
@@ -77,7 +78,7 @@ public abstract class AbstractTableView 
         List<ObjectAssociation> allFields = facet.valueSpec().getAssociations(
                 ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
         TableContentWriter rowBuilder = createRowBuilder(request, context, isFieldEditable
? parentObjectId : null, allFields);
-        write(request, collection, rowBuilder, rowClasses);
+        write(request, collection, summary, rowBuilder, rowClasses);
 
     }
 
@@ -87,10 +88,10 @@ public abstract class AbstractTableView 
             final String parent,
             final List<ObjectAssociation> allFields);
 
-    public static void write(Request request, ObjectAdapter collection, TableContentWriter
rowBuilder, String[] rowClasses) {
+    public static void write(Request request, ObjectAdapter collection, String summary, TableContentWriter
rowBuilder, String[] rowClasses) {
         RequestContext context = request.getContext();
 
-        request.appendHtml("<table>");
+        request.appendHtml("<table summary=\"" + summary + "\">");
         rowBuilder.writeHeaders(request);
 
         CollectionFacet facet = collection.getSpecification().getFacet(CollectionFacet.class);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/FieldValue.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/FieldValue.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/FieldValue.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/FieldValue.java
Wed Dec 22 00:14:07 2010
@@ -97,7 +97,7 @@ public class FieldValue extends Abstract
                 boolean flag = facet.isSet(fieldReference);
                 String valueSegment =  flag ? " checked=\"checked\"" : "";
                 String disabled = " disabled=\"disabled\"";
-                value =  "<input type=\"checkbox\"" + valueSegment + disabled + ">";
+                value =  "<input type=\"checkbox\"" + valueSegment + disabled + " />";
             }
             
             request.appendHtml(value);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java
Wed Dec 22 00:14:07 2010
@@ -42,7 +42,8 @@ public class LongFormView extends Abstra
             List<ObjectAssociation> fields = facet.valueSpec().getAssociations(
                     ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
             boolean isFieldEditable = field.isUsable(IsisContext.getAuthenticationSession(),
object).isAllowed();
-            TableView.write(request, object, field, collection, fields, isFieldEditable);
+            String summary = "Table of elements in " + field.getName();
+            TableView.write(request, summary, object, field, collection, fields, isFieldEditable);
         } else {
             FieldValue.write(request, object, field, linkedObject, null, true, 0);
         }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableView.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableView.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableView.java
Wed Dec 22 00:14:07 2010
@@ -104,8 +104,8 @@ public class TableView extends AbstractT
         @Override
         public void writeElement(Request request, RequestContext context, ObjectAdapter element)
{
             String rowId = context.mapObject(element, Scope.INTERACTION);
-            String scope = linkRow == null ? "" : "&" + SCOPE + "=" + linkRow.getScope();
-            String result = ""; // linkRow.getVariable().equals("_result") ? "" : "&"
+
+            String scope = linkRow == null ? "" : "&amp;" + SCOPE + "=" + linkRow.getScope();
+            String result = ""; // linkRow.getVariable().equals("_result") ? "" : "&amp;"
+
                                 // RequestContext.RESULT + "=" + context.mapObject(collection,
                                 // Scope.REQUEST);
             result = context.encodedInteractionParameters();
@@ -232,6 +232,7 @@ public class TableView extends AbstractT
 
     public static void write(
             Request request,
+            String summary,
             ObjectAdapter object,
             ObjectAssociation field,
             ObjectAdapter collection,
@@ -245,7 +246,7 @@ public class TableView extends AbstractT
         }
         RequestContext context = request.getContext();
         TableContentWriter rowBuilder = rowBuilder(request, context, context.mapObject(object,
Scope.REQUEST), field.getId(), fields);
-        write(request, collection, rowBuilder, null);
+        write(request, collection, summary, rowBuilder, null);
     }
 
     @Override

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormEntry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormEntry.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormEntry.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormEntry.java
Wed Dec 22 00:14:07 2010
@@ -33,7 +33,7 @@ public class FormEntry extends AbstractE
         boolean isHidden =  request.isRequested(HIDDEN, true);
         block.exclude(field);
         // TODO this is replaced because the field is marked as hidden!
-        String content = "refernce <input type=\"" + (isHidden ? "hidden" : "text") +
"\" disabled=\"disabled\" name=\"" + field + "\" value=\"" + value + "\" />";
+        String content = "reference <input type=\"" + (isHidden ? "hidden" : "text") +
"\" disabled=\"disabled\" name=\"" + field + "\" value=\"" + value + "\" />";
         block.replaceContent(field, content);
     }
 

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/RadioListField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/RadioListField.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/RadioListField.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/RadioListField.java
Wed Dec 22 00:14:07 2010
@@ -56,7 +56,7 @@ public class RadioListField extends Abst
                 }
                 String title = element.titleString();
                 String checked = "";
-                buffer.append("<input type=\"radio\" name=\"" + field + "\" value=\""
+ elementId + "\"" + checked + ">" + title
+                buffer.append("<input type=\"radio\" name=\"" + field + "\" value=\""
+ elementId + "\"" + checked + " />" + title
                         + "</input><br/>\n");
             }
 

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=1051708&r1=1051707&r2=1051708&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
Wed Dec 22 00:14:07 2010
@@ -123,7 +123,7 @@ public class Selector extends AbstractEl
         String elementId = context.mapObject(element, Scope.INTERACTION);
         buffer.append("<img class=\"small-icon\" src=\"" + request.getContext().imagePath(element)
                 + "\" alt=\"" + element.getSpecification().getShortName() + "\"/>" + element.titleString()
+ "\n");
-        buffer.append("<input type=\"hidden\" name=\"" + field + "\" value=\"" + elementId
+ "\"" + "/>\n");
+        buffer.append("<input type=\"hidden\" name=\"" + field + "\" value=\"" + elementId
+ "\" />\n");
         return buffer.toString();
     }
 

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=1051708&r1=1051707&r2=1051708&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
Wed Dec 22 00:14:07 2010
@@ -53,14 +53,14 @@ public class InputForm {
                 continue;
             }
             request.appendHtml("  <input type=\"hidden\" name=\"" + hiddenField.getName()
+ "\" value=\"" + hiddenField.getValue()
-                    + "\">\n");
+                    + "\" />\n");
         }
         request.appendHtml(request.getContext().interactionFields());
         for (int i = 0; i < fields.length; i++) {
             InputField fld = fields[i];
             if (fld.isHidden()) {
                 request.appendHtml("  <input type=\"hidden\" name=\"" + fld.getName()
+ "\" value=\"" + fld.getValue()
-                        + "\">\n");
+                        + "\" />\n");
             } else {
                 String errorSegment = fld.getErrorText() == null ? "" : "<span class=\"error\">"
+ fld.getErrorText() + "</span>";
                 String fieldSegment = createField(fld);
@@ -72,7 +72,7 @@ public class InputForm {
 
         Errors.append(request, null);
         
-        request.appendHtml("  <input class=\"button\" type=\"submit\" value=\"" + buttonTitle
+ "\" name=\"execute\">\n");
+        request.appendHtml("  <input class=\"button\" type=\"submit\" value=\"" + buttonTitle
+ "\" name=\"execute\" />\n");
         // TODO reinstate fieldsets when we can specify them
         //request.appendHtml("</fieldset>\n");
         request.appendHtml("</form>\n");
@@ -111,7 +111,7 @@ public class InputForm {
     private static String createObjectField(InputField field, String type) {
         String value = field.getValue();
         String valueSegment = value == null ? "" : " value=\"" + value + "\"";
-        return field.getHtml() + "\n  <input type=\"hidden\" name=\"" + field.getName()
+ "\"" + valueSegment + ">";
+        return field.getHtml() + "\n  <input type=\"hidden\" name=\"" + field.getName()
+ "\"" + valueSegment + " />";
     }
 
     private static String createTextArea(InputField field) {
@@ -137,18 +137,18 @@ public class InputForm {
         String value = field.getValue();
         String valueSegment = value == null ? "" : " value=\"" + value + "\"";
         String lengthSegment = field.getWidth() == 0 ? "" : " size=\"" + field.getWidth()
+ "\"";
-        String maxLengthSegment = field.getMaxLength() == 0 ? "" : " value=\"" + field.getMaxLength()
+ "\"";
+        String maxLengthSegment = field.getMaxLength() == 0 ? "" : " maxlength=\"" + field.getMaxLength()
+ "\"";
         String requiredSegment = !field.isRequired() ? "" : " <span class=\"required\">*</span>";
         String disabled = field.isEditable() ? "" : " disabled=\"disabled\"";
         return "<input type=\"" + type + "\" name=\"" + field.getName() + "\"" + valueSegment
+ lengthSegment + 
-            maxLengthSegment + disabled + ">" + requiredSegment;
+            maxLengthSegment + disabled + " />" + requiredSegment;
     }
 
     private static String createCheckbox(InputField field) {
         String entryText = field.getValue();
         String valueSegment = entryText != null && entryText.toLowerCase().equals("true")
? " checked=\"checked\"" : "";
         String disabled = field.isEditable() ? "" : " disabled=\"disabled\"";
-        return "<input type=\"checkbox\" value=\"TRUE\" name=\"" + field.getName() + "\""
+ valueSegment + disabled + ">";
+        return "<input type=\"checkbox\" name=\"" + field.getName() + "\"" + valueSegment
+ disabled + " />";
     }
 
     private static String createOptions(InputField field) {
@@ -169,7 +169,7 @@ public class InputForm {
         if (field.getType()  == InputField.TEXT) {
             String lengthSegment = field.getWidth() == 0 ? "" : " size=\"" + field.getWidth()
+ "\"";
             String hideSegment = " style=\"display: none;\" "; // TODO only hide when JS
enabled
-            str.append("  <input type=\"text\" name=\"" + field.getName() + "-other\""
+ hideSegment + lengthSegment + disabled + "/>");
+            str.append("  <input type=\"text\" name=\"" + field.getName() + "-other\""
+ hideSegment + lengthSegment + disabled + " />");
         }
         str.append("\n");
         return str.toString();

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractLink.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractLink.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractLink.java
Wed Dec 22 00:14:07 2010
@@ -70,7 +70,7 @@ public abstract class AbstractLink exten
             String classSegment = " class=\"" + cls + "\"";
             String titleSegment = title == null ? "" : (" title=\"" + title + "\"");
             String additionalSegment = additionalParameters(request);
-            additionalSegment = additionalSegment == null ? "" : "&" + additionalSegment;
+            additionalSegment = additionalSegment == null ? "" : "&amp;" + additionalSegment;
             request.appendHtml("<a" + classSegment + titleSegment + " href=\"" + view
+ "?" + variableSegment + context.encodedInteractionParameters()
                     + additionalSegment + "\">");
             request.pushNewBuffer();

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java?rev=1051708&r1=1051707&r2=1051708&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java
Wed Dec 22 00:14:07 2010
@@ -88,7 +88,7 @@ public class RemoveElement extends Abstr
             String objectId = request.getContext().mapObject(adapter, Scope.INTERACTION);
             String elementId = request.getContext().mapObject(element, Scope.INTERACTION);
             String action = RemoveAction.ACTION + Dispatcher.COMMAND_ROOT;
-            request.appendHtml("<form" + classSegment + " method=\"POST\" action=\"" +
action + "\" >");
+            request.appendHtml("<form" + classSegment + " method=\"post\" action=\"" +
action + "\" >");
             request.appendHtml("<input type=\"hidden\" name=\"" + OBJECT + "\" value=\""
+ objectId + "\" />");
             request.appendHtml("<input type=\"hidden\" name=\"" + FIELD + "\" value=\""
+ fieldName + "\" />");
             request.appendHtml("<input type=\"hidden\" name=\"" + ELEMENT + "\" value=\""
+ elementId + "\" />");



Mime
View raw message