incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1063836 - in /incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view: action/ display/ edit/ form/ logon/ simple/
Date Wed, 26 Jan 2011 19:13:04 GMT
Author: rmatthews
Date: Wed Jan 26 19:13:03 2011
New Revision: 1063836

URL: http://svn.apache.org/viewvc?rev=1063836&view=rev
Log:
Consolidating class names (xhtml) for form based elements.

Added:
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormFieldBlock.java
      - copied, changed from r1061795, incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditFieldBlock.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/HtmlFormBuilder.java
      - copied, changed from r1063200, incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java
Removed:
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditFieldBlock.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java
Modified:
    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/ActionForm.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/LongFormView.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/FormEntry.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormField.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/HiddenField.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/logon/Logon.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/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=1063836&r1=1063835&r2=1063836&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 Jan 26 19:13:03 2011
@@ -47,7 +47,7 @@ public class ActionButton extends Abstra
         String scope = request.getOptionalProperty(SCOPE);
         String buttonTitle = request.getOptionalProperty(BUTTON_TITLE);
         String resultOverride = request.getOptionalProperty(RESULT_OVERRIDE);
-        String idName = request.getOptionalProperty(ID);
+        String idName = request.getOptionalProperty(ID, methodName);
         String className = request.getOptionalProperty(CLASS);
 
         ObjectAdapter object = MethodsUtils.findObject(request.getContext(), objectId);
@@ -121,7 +121,7 @@ public class ActionButton extends Abstra
          */
 
         String idSegment = idName == null ? "" : ("id=\"" + idName + "\" ");
-        String classSegment = "class=\"" + (className == null ? "button" : className) + "\"";
+        String classSegment = "class=\"" + (className == null ? "action in-line" : className) + "\"";
         request.appendHtml("\n<form " + idSegment + classSegment + " action=\"action.app\" method=\"post\">\n");
         if (objectId == null) {
             request.appendHtml("  <input type=\"hidden\" name=\"" + OBJECT + "\" value=\"" + 

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java?rev=1063836&r1=1063835&r2=1063836&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java Wed Jan 26 19:13:03 2011
@@ -26,7 +26,9 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
+import org.apache.isis.viewer.scimpi.dispatcher.ScimpiException;
 import org.apache.isis.viewer.scimpi.dispatcher.action.ActionAction;
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope;
@@ -34,11 +36,11 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.edit.FormState;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 import org.apache.isis.viewer.scimpi.dispatcher.util.MethodsUtils;
-import org.apache.isis.viewer.scimpi.dispatcher.view.edit.EditFieldBlock;
 import org.apache.isis.viewer.scimpi.dispatcher.view.edit.FieldFactory;
+import org.apache.isis.viewer.scimpi.dispatcher.view.edit.FormFieldBlock;
 import org.apache.isis.viewer.scimpi.dispatcher.view.form.HiddenInputField;
+import org.apache.isis.viewer.scimpi.dispatcher.view.form.HtmlFormBuilder;
 import org.apache.isis.viewer.scimpi.dispatcher.view.form.InputField;
-import org.apache.isis.viewer.scimpi.dispatcher.view.form.InputForm;
 
 
 public class ActionForm extends AbstractElementProcessor {
@@ -56,9 +58,9 @@ public class ActionForm extends Abstract
         parameters.resultName = request.getOptionalProperty(RESULT_NAME);
         parameters.resultOverride = request.getOptionalProperty(RESULT_OVERRIDE);
         parameters.scope = request.getOptionalProperty(SCOPE);
-        parameters.className = request.getOptionalProperty(CLASS, "action");
+        parameters.className = request.getOptionalProperty(CLASS, "action full");
         parameters.showMessage = request.isRequested("show-message", false);
-        parameters.id = request.getOptionalProperty(ID);
+        parameters.id = request.getOptionalProperty(ID, parameters.methodName);
         createForm(request, parameters);
     }
     
@@ -70,13 +72,13 @@ public class ActionForm extends Abstract
         RequestContext context = request.getContext();
         ObjectAdapter object = MethodsUtils.findObject(context, parameterObject.objectId);
         String version = request.getContext().mapVersion(object);
-        ObjectAction action = MethodsUtils.findAction(object, parameterObject.methodName);
+        final ObjectAction action = MethodsUtils.findAction(object, parameterObject.methodName);
         // TODO how do we distinguish between overloaded methods?
 
-        /*
+        // REVIEW Is this useful?
         if (action.getParameterCount() == 0) {
             throw new ScimpiException("Action form can only be used for actions with parameters");
-        }*/
+        }
         if (parameterObject.showMessage && MethodsUtils.isVisible(object, action)) {
             String notUsable = MethodsUtils.isUsable(object, action);
             if (notUsable != null) {
@@ -113,7 +115,13 @@ public class ActionForm extends Abstract
                         .getContext().getVariable(RequestContext.RESULT)) };
 
         // TODO when the block contains a selector tag it doesn't disable it if the field cannot be edited!!!
-        EditFieldBlock containedBlock = new EditFieldBlock();
+        FormFieldBlock containedBlock = new FormFieldBlock() {
+            public boolean isNullable(String name) {
+                int index = Integer.parseInt(name.substring(5)) - 1;
+                ObjectActionParameter param = action.getParameters().get(index);
+                return param.isOptional();
+            }
+        };
         request.setBlockContent(containedBlock);
         if (!withoutProcessing) {
             request.processUtilCloseTag();
@@ -139,8 +147,8 @@ public class ActionForm extends Abstract
             formTitle = parameterObject.formTitle;
         }
 
-        InputForm.createForm(request, ActionAction.ACTION + ".app", parameterObject.buttonTitle, formFields, hiddenFields,
-                formTitle, action.getDescription(), action.getHelp(), parameterObject.className, parameterObject.id);
+        HtmlFormBuilder.createForm(request, ActionAction.ACTION + ".app", hiddenFields, formFields, parameterObject.className,
+                parameterObject.id, formTitle, action.getDescription(), action.getHelp(), parameterObject.buttonTitle);
 
         request.popBlockContent();
     }
@@ -162,71 +170,8 @@ public class ActionForm extends Abstract
             
             ObjectAdapter[] optionsForParameter = action.getChoices(object)[i];
             FieldFactory.initializeField(context, object, param, optionsForParameter, !param.isOptional(), true, field);
-            
-            
-/*            
-            field.setLabel(param.getName());
-            field.setDescription(param.getDescription());
-            field.setRequired(!param.isOptional());
-
-            if (param.getSpecification().getFacet(ParseableFacet.class) != null) {
-                final int maxLength = param.getFacet(MaxLengthFacet.class).value();
-                field.setMaxLength(maxLength);
-
-                TypicalLengthFacet typicalLengthFacet = param.getFacet(TypicalLengthFacet.class);
-                if (typicalLengthFacet.isDerived() && maxLength > 0) {
-                    field.setWidth(maxLength);
-                } else {
-                    field.setWidth(typicalLengthFacet.value());
-                }
-
-                MultiLineFacet multiLineFacet = param.getFacet(MultiLineFacet.class);
-                field.setHeight(multiLineFacet.numberOfLines());
-                field.setWrapped(!multiLineFacet.preventWrapping());
-
-                // TODO figure out a better way to determine if boolean or a password
-                ObjectSpecification spec = param.getSpecification();
-                if (spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(boolean.class))
-                        || spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(Boolean.class.getName()))) {
-                    field.setType(InputField.CHECKBOX);
-                } else if (spec.getFullName().endsWith(".Password")) {
-                    field.setType(InputField.PASSWORD);
-                } else {
-                    field.setType(InputField.TEXT);
-                }
-
-            } else {
-                field.setType(InputField.REFERENCE);
-            }
-
-            ObjectAdapter[] optionsForParameter = action.getChoices(object)[i];
-            if (optionsForParameter != null) {
-                int noOptions = optionsForParameter.length;
-                String[] optionValues = new String[noOptions];
-                String[] optionTitles = new String[noOptions];
-                for (int j = 0; j < noOptions; j++) {
-                    optionValues[j] = getValue(context, optionsForParameter[j]);
-                    optionTitles[j] = optionsForParameter[j].titleString();
-                }
-                fields[i].setOptions(optionTitles, optionValues);
-            }
- */
-        }
-    }
-/*
-    private static String getValue(RequestContext context, ObjectAdapter field) {
-        if (field == null) {
-            return "";
-        }
-        if (field.getSpecification().getFacet(ParseableFacet.class) == null) {
-            return context.mapObject(field, Scope.INTERACTION);
-        } else {
-            return field.titleString();
         }
     }
-*/
-    
-    
     
     /**
      * Sets up the fields with their initial values
@@ -255,17 +200,11 @@ public class ActionForm extends Abstract
                     String value = context.mapObject(defaultValue, Scope.INTERACTION);
                     field.setValue(value);
                     field.setHtml(html);
-                    /*
-                     * } else { html = "<em>none specified</em>"; value = null;
-                     * field.setType(InputField.HTML);
-                     */}
-
+                }
             } else {
                 field.setValue(title);
             }
-
         }
-
     }
 
     private static void copyEntryState(
@@ -290,14 +229,13 @@ public class ActionForm extends Abstract
         }
     }
 
-    private static void overrideWithHtml(RequestContext context, EditFieldBlock containedBlock, InputField[] formFields) {
+    private static void overrideWithHtml(RequestContext context, FormFieldBlock containedBlock, InputField[] formFields) {
         for (int i = 0; i < formFields.length; i++) {
             String id = ActionAction.parameterName(i);
             if (containedBlock.hasContent(id)) {
                 String content = containedBlock.getContent(id);
                 if (content != null) {
                     formFields[i].setHtml(content);
-                    //formFields[i].setValue(null);
                     formFields[i].setType(InputField.HTML);
                 }
             }

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=1063836&r1=1063835&r2=1063836&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 Jan 26 19:13:03 2011
@@ -47,7 +47,8 @@ public abstract class AbstractFormView e
         String classString = " class=\"" + cls + "\"";
         String title = request.getOptionalProperty(FORM_TITLE);
         String oddRowClass = request.getOptionalProperty(ODD_ROW_CLASS);
-        String evenRowClass = request.getOptionalProperty(EVEN_ROW_CLASS);;
+        String evenRowClass = request.getOptionalProperty(EVEN_ROW_CLASS);
+        boolean showIcons = request.isRequested(SHOW_ICON, true);
 
         LinkedFieldsBlock tag = new LinkedFieldsBlock();
         request.setBlockContent(tag);
@@ -67,7 +68,7 @@ public abstract class AbstractFormView e
                 }
             }
     
-            write(request, object, fields, linkFields, classString, title, oddRowClass, evenRowClass);
+            write(request, object, fields, linkFields, classString, title, oddRowClass, evenRowClass, showIcons);
         }
         request.popBlockContent();
     }
@@ -76,7 +77,7 @@ public abstract class AbstractFormView e
             Request request,
             ObjectAdapter object,
             List<ObjectAssociation> fields,
-            LinkedObject[] linkFields, String classString, String title, String oddRowClass, String evenRowClass) {
+            LinkedObject[] linkFields, String classString, String title, String oddRowClass, String evenRowClass, boolean showIcons) {
         request.appendHtml("<div" + classString + ">");
         if (title != null) {
             request.appendHtml("<div class=\"title\">" + title+ "</div>");
@@ -101,15 +102,15 @@ public abstract class AbstractFormView e
             }
             request.appendHtml("<div " + cls + description + "><span class=\"label\">" + field.getName() + ":</span>");
             LinkedObject linkedObject = linkFields[i];
-            addField(request, object, field, linkedObject);
+            addField(request, object, field, linkedObject, showIcons);
             HelpLink.append(request, field.getDescription(), field.getHelp());
             request.appendHtml("</div>");
         }
         request.appendHtml("</div>");
     }
 
-    protected void addField(Request request, ObjectAdapter object, ObjectAssociation field, LinkedObject linkedObject) {
-        FieldValue.write(request, object, field, linkedObject, "value", true, 0);
+    protected void addField(Request request, ObjectAdapter object, ObjectAssociation field, LinkedObject linkedObject, boolean showIcons) {
+        FieldValue.write(request, object, field, linkedObject, "value", showIcons, 0);
     }
 
     protected boolean ignoreField(ObjectAssociation objectField) {

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=1063836&r1=1063835&r2=1063836&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 Jan 26 19:13:03 2011
@@ -34,7 +34,7 @@ import org.apache.isis.viewer.scimpi.dis
 public class LongFormView extends AbstractFormView {
 
     @Override
-    protected void addField(Request request, ObjectAdapter object, ObjectAssociation field, LinkedObject linkedObject) {
+    protected void addField(Request request, ObjectAdapter object, ObjectAssociation field, LinkedObject linkedObject, boolean showIcon) {
         if (field.isOneToManyAssociation()) {
             IsisContext.getPersistenceSession().resolveField(object, field);
             ObjectAdapter collection = field.get(object);
@@ -45,7 +45,7 @@ public class LongFormView extends Abstra
             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);
+            FieldValue.write(request, object, field, linkedObject, null, showIcon, 0);
         }
     }
 

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=1063836&r1=1063835&r2=1063836&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 Wed Jan 26 19:13:03 2011
@@ -21,8 +21,6 @@
 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;
@@ -40,8 +38,8 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.edit.FormState;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 import org.apache.isis.viewer.scimpi.dispatcher.view.form.HiddenInputField;
+import org.apache.isis.viewer.scimpi.dispatcher.view.form.HtmlFormBuilder;
 import org.apache.isis.viewer.scimpi.dispatcher.view.form.InputField;
-import org.apache.isis.viewer.scimpi.dispatcher.view.form.InputForm;
 
 
 public class EditObject extends AbstractElementProcessor {
@@ -59,21 +57,16 @@ public class EditObject extends Abstract
         String variable = request.getOptionalProperty(RESULT_NAME);
         String resultOverride = request.getOptionalProperty(RESULT_OVERRIDE);
         String scope = request.getOptionalProperty(SCOPE);
-        String className = request.getOptionalProperty(CLASS, "edit");
+        String className = request.getOptionalProperty(CLASS, "edit full");
         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);
         String version = context.mapVersion(object);
 
-        EditFieldBlock containedBlock = new EditFieldBlock() {
+        final FormState entryState = (FormState) context.getVariable(ENTRY_FIELDS);
+
+        FormFieldBlock containedBlock = new FormFieldBlock() {
             @Override
             public boolean isVisible(String name) {
                 ObjectAssociation fld = object.getSpecification().getAssociation(name);
@@ -81,19 +74,38 @@ public class EditObject extends Abstract
                 boolean isUseable = fld.isUsable(IsisContext.getAuthenticationSession(), object).isAllowed();
                 return isVisible && isUseable;
             }
+            
+            public ObjectAdapter getCurrent(String name) {
+                ObjectAdapter value = null;
+                if (entryState != null) {
+                    FieldEditState field2 = entryState.getField(name);
+                    value = field2.getValue();
+                }
+                if (value == null) {
+                    ObjectAssociation fld = object.getSpecification().getAssociation(name);
+                    value = fld.get(object);
+                }
+                return value;
+            }
+            
+            public boolean isNullable(String name) {
+                ObjectAssociation fld = object.getSpecification().getAssociation(name);
+                return !fld.isMandatory();
+            }
         };
+        
         request.setBlockContent(containedBlock);
         request.processUtilCloseTag();
+
         AuthenticationSession session = IsisContext.getAuthenticationSession();
-        List<ObjectAssociation> fields = object.getSpecification().getAssociations(
-                ObjectAssociationFilters.dynamicallyVisible(session, object));
+        List<ObjectAssociation> fields = object.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, object));
         fields = containedBlock.includedFields(fields);
-
         InputField[] formFields = createFields(fields);
-        FormState entryState = (FormState) context.getVariable(ENTRY_FIELDS);
+        
         initializeFields(context, object, formFields, entryState, !hideNonEditableFields);
         setDefaults(context, object, formFields, entryState);
-        copyFieldContent(context, object, formFields, locale, timeZone);
+        
+        copyFieldContent(context, object, formFields);
         overrideWithHtml(context, containedBlock, formFields);
         if (entryState != null && entryState.isForForm(actualObjectId)) {
             copyEntryState(context, object, formFields, entryState);
@@ -108,7 +120,7 @@ public class EditObject extends Abstract
                 resultOverride == null ? null : new HiddenInputField(RESULT_OVERRIDE, resultOverride),
                 scope == null ? null : new HiddenInputField(SCOPE, scope) };
 
-        InputForm.createForm(request, EditAction.ACTION + ".app", buttonTitle, formFields, hiddenFields, formTitle, null, null, className, id);
+        HtmlFormBuilder.createForm(request, EditAction.ACTION + ".app", hiddenFields, formFields, className, id, formTitle, null, null, buttonTitle);
         request.popBlockContent();
     }
 
@@ -149,64 +161,13 @@ public class EditObject extends Abstract
                     formField.setDescription(usable.getReason());
                 }
                 formField.setEditable(isEditable);
-
-            
-            /*
-                int type;
-
-                ObjectSpecification spec = field.getSpecification();
-                if (spec.getFacet(PasswordValueFacet.class) != null) {
-                    type = InputField.PASSWORD;
-
-                } else if (spec.getFacet(BooleanValueFacet.class) != null) {
-                    type = InputField.CHECKBOX;
-
-                } else if (spec.getFacet(ParseableFacet.class) != null) {
-                    type = InputField.TEXT;
-
-                    MaxLengthFacet maxLengthFacet = field.getFacet(MaxLengthFacet.class);
-                    final int maxLength = maxLengthFacet.value();
-                    formField.setMaxLength(maxLength);
-
-                    TypicalLengthFacet typicalLengthFacet = field.getFacet(TypicalLengthFacet.class);
-                    if (typicalLengthFacet.isDerived() && maxLength > 0) {
-                        formField.setWidth(maxLength);
-                    } else {
-                        formField.setWidth(typicalLengthFacet.value());
-                    }
-
-                    MultiLineFacet multiLineFacet = field.getFacet(MultiLineFacet.class);
-                    formField.setHeight(multiLineFacet.numberOfLines());
-                    formField.setWrapped(!multiLineFacet.preventWrapping());
-
-                } else {
-                    type = InputField.REFERENCE;
-                }
-
-                formField.setType(type);
-                formField.setHidden(false);
-                formField.setRequired(field.isMandatory());
-                formField.setDescription(field.getDescription());
-                formField.setLabel(field.getName());
-
-                Consent usable = field.isUsable(session, object);
-                boolean isEditable = true;
-                isEditable = isEditable && usable.isAllowed();
-                if (usable.isVetoed()) {
-                    formField.setDescription(usable.getReason());
-                }
-                formField.setEditable(isEditable);
-            */
-
-            
-            
             } else {
                 formFields[i].setHidden(true);
             }
         }
     }
 
-    private void copyFieldContent(RequestContext context, ObjectAdapter object, InputField[] formFields, Locale locale, TimeZone TimeZone) {
+    private void copyFieldContent(RequestContext context, ObjectAdapter object, InputField[] formFields) {
         for (int i = 0; i < formFields.length; i++) {
             String fieldName = formFields[i].getName();
             ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
@@ -215,12 +176,12 @@ public class EditObject extends Abstract
                 IsisContext.getPersistenceSession().resolveField(object, field);
                 ObjectAdapter fieldValue = field.get(object);
                 if (inputField.isEditable()) {
-                    String value = getValue(context, fieldValue, locale, TimeZone);
+                    String value = getValue(context, fieldValue);
                     if (!value.equals("") || inputField.getValue() == null) {
                         inputField.setValue(value);
                     }
                 } else {
-                    String entry = getValue(context, fieldValue, locale, TimeZone);
+                    String entry = getValue(context, fieldValue);
                     inputField.setHtml(entry);
                     inputField.setType(InputField.HTML);
 
@@ -239,27 +200,7 @@ public class EditObject extends Abstract
             }
         }
     }
-/*
-    private void setupOptions(RequestContext context, ObjectAdapter object, InputField[] formFields) {
-        for (int i = 0; i < formFields.length; i++) {
-            String fieldId = formFields[i].getName();
-            ObjectAssociation field = object.getSpecification().getAssociation(fieldId);
-            InputField formField = formFields[i];
-            if (field.isVisible(IsisContext.getAuthenticationSession(), object).isAllowed() && formField.isEditable()) {
-                ObjectAdapter[] options = field.getChoices(object);
-                if (options != null) {
-                    String[] optionValues = new String[options.length];
-                    String[] optionTitles = new String[options.length];
-                    for (int j = 0; j < options.length; j++) {
-                        optionValues[j] = getValue(context, options[j]);
-                        optionTitles[j] = options[j].titleString();
-                    }
-                    formField.setOptions(optionTitles, optionValues);
-                }
-            }
-        }
-    }
-*/
+
     private void setDefaults(RequestContext context, ObjectAdapter object, InputField[] formFields, FormState entryState) {
         for (int i = 0; i < formFields.length; i++) {
             String fieldId = formFields[i].getName();
@@ -285,7 +226,7 @@ public class EditObject extends Abstract
         }
     }
 
-    private void overrideWithHtml(RequestContext context, EditFieldBlock containedBlock, InputField[] formFields) {
+    private void overrideWithHtml(RequestContext context, FormFieldBlock containedBlock, InputField[] formFields) {
         for (int i = 0; i < formFields.length; i++) {
             String fieldId = formFields[i].getName();
             if (containedBlock.hasContent(fieldId)) {
@@ -314,7 +255,7 @@ public class EditObject extends Abstract
         }
     }
 
-    private String getValue(RequestContext context, ObjectAdapter field, Locale locale, TimeZone timeZone) {
+    private String getValue(RequestContext context, ObjectAdapter field) {
         if (field == null) {
             return "";
         }
@@ -322,17 +263,6 @@ public class EditObject extends Abstract
         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/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=1063836&r1=1063835&r2=1063836&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 Jan 26 19:13:03 2011
@@ -27,7 +27,7 @@ import org.apache.isis.viewer.scimpi.dis
 public class FormEntry extends AbstractElementProcessor {
 
     public void process(Request request) {
-        EditFieldBlock block = (EditFieldBlock) request.getBlockContent();
+        FormFieldBlock block = (FormFieldBlock) request.getBlockContent();
         String field = request.getRequiredProperty(FIELD);
         String value = request.getRequiredProperty(VALUE);
         boolean isHidden =  request.isRequested(HIDDEN, true);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormField.java?rev=1063836&r1=1063835&r2=1063836&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormField.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormField.java Wed Jan 26 19:13:03 2011
@@ -27,7 +27,7 @@ import org.apache.isis.viewer.scimpi.dis
 public class FormField extends AbstractElementProcessor {
 
     public void process(Request request) {
-        EditFieldBlock block = (EditFieldBlock) request.getBlockContent();
+        FormFieldBlock block = (FormFieldBlock) request.getBlockContent();
         String field = request.getRequiredProperty(FIELD);
         if (block.isVisible(field)) {
             request.pushNewBuffer();

Copied: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormFieldBlock.java (from r1061795, incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditFieldBlock.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormFieldBlock.java?p2=incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormFieldBlock.java&p1=incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditFieldBlock.java&r1=1061795&r2=1063836&rev=1063836&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditFieldBlock.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/FormFieldBlock.java Wed Jan 26 19:13:03 2011
@@ -23,10 +23,11 @@ package org.apache.isis.viewer.scimpi.di
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.viewer.scimpi.dispatcher.view.field.InclusionList;
 import org.apache.isis.viewer.scimpi.dispatcher.view.form.InputField;
 
-public class EditFieldBlock extends InclusionList {
+public class FormFieldBlock extends InclusionList {
     private Map<String, String> content = new HashMap<String, String>();
     private Map<String, String> values = new HashMap<String, String>();
 
@@ -45,6 +46,14 @@ public class EditFieldBlock extends Incl
     public boolean isVisible(String name) {
         return true;
     }
+    
+    public boolean isNullable(String name) {
+        return true;
+    }
+    
+    public ObjectAdapter getCurrent(String name) {
+        return null;
+    }
 
     public void value(String field, String value) {
         values.put(field, value);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/HiddenField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/HiddenField.java?rev=1063836&r1=1063835&r2=1063836&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/HiddenField.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/HiddenField.java Wed Jan 26 19:13:03 2011
@@ -30,13 +30,13 @@ public class HiddenField extends Abstrac
 
     public void process(Request request) {
         BlockContent blockContent = request.getBlockContent();
-        if (!(blockContent instanceof EditFieldBlock)) {
+        if (!(blockContent instanceof FormFieldBlock)) {
             throw new TagOrderException(request);
         }
 
         String field = request.getOptionalProperty("name");
         String value = request.getRequiredProperty("value");
-        EditFieldBlock block = (EditFieldBlock) blockContent;
+        FormFieldBlock block = (FormFieldBlock) blockContent;
         block.value(field, value);
         block.exclude(field);
     }

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=1063836&r1=1063835&r2=1063836&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 Jan 26 19:13:03 2011
@@ -33,7 +33,7 @@ import org.apache.isis.viewer.scimpi.dis
 public class RadioListField extends AbstractElementProcessor {
 
     public void process(Request request) {
-        EditFieldBlock block = (EditFieldBlock) request.getBlockContent();
+        FormFieldBlock block = (FormFieldBlock) request.getBlockContent();
         String field = request.getRequiredProperty(FIELD);
         if (block.isVisible(field)) {
             String id = request.getRequiredProperty(COLLECTION);

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=1063836&r1=1063835&r2=1063836&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 Jan 26 19:13:03 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.edit;
 
 import java.util.Iterator;
@@ -38,7 +37,7 @@ import org.apache.isis.viewer.scimpi.dis
 public class Selector extends AbstractElementProcessor {
 
     public void process(Request request) {
-        EditFieldBlock block = (EditFieldBlock) request.getBlockContent();
+        FormFieldBlock block = (FormFieldBlock) request.getBlockContent();
         String field = request.getRequiredProperty(FIELD);
         if (block.isVisible(field)) {
             processElement(request, block, field);
@@ -46,11 +45,11 @@ public class Selector extends AbstractEl
         request.skipUntilClose();
     }
 
-    private void processElement(Request request, EditFieldBlock block, String field) {
+    private void processElement(Request request, FormFieldBlock block, String field) {
         String type = request.getOptionalProperty(TYPE, "dropdown");
         if (!request.isPropertySpecified(METHOD) && request.isPropertySpecified(COLLECTION)) {
             String id = request.getRequiredProperty(COLLECTION, Request.NO_VARIABLE_CHECKING);
-            String selector = showSelectionList(request, id, type);
+            String selector = showSelectionList(request, id, block.getCurrent(field), block.isNullable(field), type);
             block.replaceContent(field, selector);
         } else {
             String objectId = request.getOptionalProperty(OBJECT);
@@ -59,13 +58,13 @@ public class Selector extends AbstractEl
             ObjectAction action = MethodsUtils.findAction(object, methodName);
             if (action.getParameterCount() == 0) {
                 ObjectAdapter collection = action.execute(object, new ObjectAdapter[0]);
-                String selector = showSelectionList(request, collection, type);
+                String selector = showSelectionList(request, collection, block.getCurrent(field), block.isNullable(field), type);
                 block.replaceContent(field, selector);
             } else {
                 String id = "selector_options";
                 String id2 = (String) request.getContext().getVariable(id);
-                String selector = showSelectionList(request, id2, type);
-    
+                String selector = showSelectionList(request, id2, block.getCurrent(field), block.isNullable(field), type);
+
                 CreateFormParameter parameters = new CreateFormParameter();
                 parameters.objectId = objectId;
                 parameters.methodName = methodName;
@@ -73,7 +72,7 @@ public class Selector extends AbstractEl
                 parameters.formTitle = request.getOptionalProperty(FORM_TITLE);
                 parameters.className = request.getOptionalProperty(CLASS, "selector");
                 parameters.id = request.getOptionalProperty(ID);
-    
+
                 parameters.resultName = id;
                 parameters.forwardResultTo = request.getContext().getResourceFile();
                 parameters.forwardVoidTo = "error";
@@ -82,39 +81,37 @@ public class Selector extends AbstractEl
                 request.pushNewBuffer();
                 ActionForm.createForm(request, parameters);
                 block.replaceContent(field, selector);
-    
+
                 request.appendHtml(request.popBuffer());
             }
         }
     }
 
-    private String showSelectionList(Request request, String collectionId, String type) {
+    private String showSelectionList(Request request, String collectionId, ObjectAdapter selectedItem, boolean allowNotSet, String type) {
         if (collectionId != null && !collectionId.equals("")) {
             ObjectAdapter collection = request.getContext().getMappedObjectOrResult(collectionId);
-            return showSelectionList(request, collection, type);
-       } else {
+            return showSelectionList(request, collection, selectedItem, allowNotSet, type);
+        } else {
             return null;
         }
     }
+
+    private String showSelectionList(Request request, ObjectAdapter collection, ObjectAdapter selectedItem, boolean allowNotSet, String type) {
+        String field = request.getRequiredProperty(FIELD);
+        CollectionFacet facet = (CollectionFacet) collection.getSpecification().getFacet(CollectionFacet.class);
         
-    private String showSelectionList(Request request, ObjectAdapter collection, String type) {
-            String field = request.getRequiredProperty(FIELD);
-            CollectionFacet facet = (CollectionFacet) collection.getSpecification().getFacet(CollectionFacet.class);
-            
-            boolean allowNotSet = true;
-            
-            if (facet.size(collection) == 1 && !allowNotSet) {
-                return onlyItem(request, field, collection, facet);
-            } else if (type.equals("radio")) {
-                return radioButtonList(request, field, allowNotSet, collection, facet);
-            } else if (type.equals("list")) {
-                String size = request.getOptionalProperty("size", "5");
-                return dropdownList(request, field, allowNotSet, collection, size, facet);
-            } else if (type.equals("dropdown")) {
-                return dropdownList(request, field, allowNotSet, collection, null, facet);
-            } else {
-                throw new UnknownTypeException(type);
-            }
+        if (facet.size(collection) == 1 && !allowNotSet) {
+            return onlyItem(request, field, collection, facet);
+        } else if (type.equals("radio")) {
+            return radioButtonList(request, field, allowNotSet, collection, selectedItem, facet);
+        } else if (type.equals("list")) {
+            String size = request.getOptionalProperty("size", "5");
+            return dropdownList(request, field, allowNotSet, collection, selectedItem, size, facet);
+        } else if (type.equals("dropdown")) {
+            return dropdownList(request, field, allowNotSet, collection, selectedItem, null, facet);
+        } else {
+            throw new UnknownTypeException(type);
+        }
     }
 
     private String onlyItem(Request request, String field, ObjectAdapter collection, CollectionFacet facet) {
@@ -123,25 +120,30 @@ public class Selector extends AbstractEl
         StringBuffer buffer = new StringBuffer();
         ObjectAdapter element = iterator.next();
         String elementId = context.mapObject(element, Scope.INTERACTION);
-        buffer.append("<img class=\"small-icon\" src=\"" + request.getContext().imagePath(element)
-                + "\" alt=\"" + element.getSpecification().getShortIdentifier() + "\"/>" + element.titleString() + "\n");
+        buffer.append("<img class=\"small-icon\" src=\"" + request.getContext().imagePath(element) + "\" alt=\""
+                + element.getSpecification().getShortIdentifier() + "\"/>" + element.titleString() + "\n");
         buffer.append("<input type=\"hidden\" name=\"" + field + "\" value=\"" + elementId + "\" />\n");
         return buffer.toString();
     }
 
-    private String radioButtonList(Request request, String field, boolean allowNotSet, ObjectAdapter collection, CollectionFacet facet) {
+    private String radioButtonList(
+            Request request,
+            String field,
+            boolean allowNotSet,
+            ObjectAdapter collection,
+            ObjectAdapter selectedItem,
+            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");
+            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);
             String title = element.titleString();
-            String checked = "";
+            String checked = element == selectedItem ? "checked=\"checked\"" : "";
             buffer.append("<input type=\"radio\" name=\"" + field + "\" value=\"" + elementId + "\"" + checked + ">" + title
                     + "</input><br/>\n");
         }
@@ -149,7 +151,14 @@ public class Selector extends AbstractEl
         return buffer.toString();
     }
 
-    private String dropdownList(Request request, String field, boolean allowNotSet, ObjectAdapter collection, String size, CollectionFacet facet) {
+    private String dropdownList(
+            Request request,
+            String field,
+            boolean allowNotSet,
+            ObjectAdapter collection,
+            ObjectAdapter selectedItem,
+            String size,
+            CollectionFacet facet) {
         RequestContext context = request.getContext();
         Iterator<ObjectAdapter> iterator = facet.iterator(collection);
         StringBuffer buffer = new StringBuffer();
@@ -162,7 +171,7 @@ public class Selector extends AbstractEl
             ObjectAdapter element = iterator.next();
             String elementId = context.mapObject(element, Scope.INTERACTION);
             String title = element.titleString();
-            String checked = "";
+            String checked = element == selectedItem ? "selected=\"selected\"" : "";
             buffer.append("  <option value=\"" + elementId + "\"" + checked + ">" + title + "</option>\n");
         }
         buffer.append("</select>\n");
@@ -174,4 +183,3 @@ public class Selector extends AbstractEl
     }
 
 }
-

Copied: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/HtmlFormBuilder.java (from r1063200, 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/HtmlFormBuilder.java?p2=incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/HtmlFormBuilder.java&p1=incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/form/InputForm.java&r1=1063200&r2=1063836&rev=1063836&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/HtmlFormBuilder.java Wed Jan 26 19:13:03 2011
@@ -26,19 +26,19 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.view.display.Errors;
 
 
-public class InputForm {
+public class HtmlFormBuilder {
 
     public static void createForm(
             Request request,
             String action,
-            String buttonTitle,
+            HiddenInputField[] hiddenFields,
             InputField[] fields,
-            HiddenInputField[] hiddenFields, 
+            String className, 
+            String id,
             String formTitle,
             String description,
             String helpReference,
-            String className,
-            String id) {
+            String buttonTitle) {
 
         String classSegment = " class=\"" + className + (id == null ? "\"" : "\" id=\"" + id + "\"");
         request.appendHtml("<form " + classSegment + " action=\"" + action + "\" method=\"post\" accept-charset=\"ISO-8859-1\">\n");

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/logon/Logon.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/logon/Logon.java?rev=1063836&r1=1063835&r2=1063836&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/logon/Logon.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/logon/Logon.java Wed Jan 26 19:13:03 2011
@@ -29,7 +29,7 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 import org.apache.isis.viewer.scimpi.dispatcher.view.form.HiddenInputField;
 import org.apache.isis.viewer.scimpi.dispatcher.view.form.InputField;
-import org.apache.isis.viewer.scimpi.dispatcher.view.form.InputForm;
+import org.apache.isis.viewer.scimpi.dispatcher.view.form.HtmlFormBuilder;
 
 
 public class Logon extends AbstractElementProcessor {
@@ -68,7 +68,7 @@ public class Logon extends AbstractEleme
         String loginButtonTitle = request.getOptionalProperty(BUTTON_TITLE, "Log in");
         String className = request.getOptionalProperty(CLASS, "login");
         String  id = request.getOptionalProperty(ID);
-        InputForm.createForm(request, "logon.app", loginButtonTitle, fields, hiddenFields.toArray(new HiddenInputField[hiddenFields.size()]), formTitle, null, null, className, id);
+        HtmlFormBuilder.createForm(request, "logon.app", hiddenFields.toArray(new HiddenInputField[hiddenFields.size()]), fields, className, id, formTitle, null, null, loginButtonTitle);
     }
 
     public String getName() {

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=1063836&r1=1063835&r2=1063836&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 Jan 26 19:13:03 2011
@@ -44,7 +44,7 @@ public class RemoveElement extends Abstr
     @Override
     public void process(Request request) {
         String title = request.getOptionalProperty(BUTTON_TITLE, "Delete");
-        String cls = request.getOptionalProperty(CLASS, "element-delete");
+        String cls = request.getOptionalProperty(CLASS, "action in-line delete");
         String object = request.getOptionalProperty(OBJECT);
         String resultOverride = request.getOptionalProperty(RESULT_OVERRIDE);
         RequestContext context = request.getContext();



Mime
View raw message