incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1059082 - in /incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher: debug/ view/ view/action/ view/display/ view/form/ view/simple/
Date Fri, 14 Jan 2011 17:26:04 GMT
Author: rmatthews
Date: Fri Jan 14 17:26:03 2011
New Revision: 1059082

URL: http://svn.apache.org/viewvc?rev=1059082&view=rev
Log:
Adding help link to Scimpi elements

Modified:
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/HelpLink.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/display/AbstractFormView.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

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java?rev=1059082&r1=1059081&r2=1059082&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
Fri Jan 14 17:26:03 2011
@@ -188,7 +188,7 @@ public class DebugAction implements Acti
         
         for (int i = 0; i < fields.size(); i++) {
             ObjectAssociation field = fields.get(i);
-            view.divider("<span id=\"" + field.getId() + "\">Field: " + field.getName()
+ "</span>");
+            view.divider("<span id=\"" + field.getId() + "\"><em>Field:</em>
" + field.getId() + "</span>");
             view.appendRow("ID", field.getIdentifier());
             view.appendRow("Short ID", field.getId());
             view.appendRow("Name", field.getName());
@@ -203,7 +203,7 @@ public class DebugAction implements Acti
         
         for (int i = 0; i < userActions.size(); i++) {
             final ObjectAction action = userActions.get(i);
-            view.divider("<span id=\"" + action.getId() + "\">Action: " + action.getName()
+ "</span>");
+            view.divider("<span id=\"" + action.getId() + "\"><em>Action:</em>
" + action.getId() + "</span>");
             view.appendRow("ID", action.getIdentifier());
             view.appendRow("Short ID", action.getId());
             view.appendRow("Name", action.getName());
@@ -250,7 +250,7 @@ public class DebugAction implements Acti
             buffer.append("none");
         } else {
             for (int i = 0; i < members.size(); i++) {
-                buffer.append("<a href=\"#" + members.get(i).getId() + "\">" + members.get(i).getName()
+ "</a><br>");
+                buffer.append("<a href=\"#" + members.get(i).getId() + "\">" + members.get(i).getId()
+ "</a><br>");
             }
         }
         view.appendRow(label, buffer.toString());

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/HelpLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/HelpLink.java?rev=1059082&r1=1059081&r2=1059082&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/HelpLink.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/HelpLink.java
Fri Jan 14 17:26:03 2011
@@ -22,7 +22,7 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class HelpLink {
 
-    public static void append(Request request, String helpReference, String description)
{
+    public static void append(Request request, String description, String helpReference)
{
         request.appendHtml(createHelpSegment(description, helpReference));
     }
 

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=1059082&r1=1059081&r2=1059082&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
Fri Jan 14 17:26:03 2011
@@ -161,7 +161,7 @@ public class ActionButton extends Abstra
         request.appendHtml(request.getContext().interactionFields());
         request.appendHtml("  <input class=\"button\" type=\"submit\" value=\"" + buttonTitle
+ "\" name=\"execute\" title=\"" 
                 + action.getDescription() + "\" />");
-        HelpLink.append(request, action.getHelp(), action.getDescription());
+        HelpLink.append(request, action.getDescription(), action.getHelp());
         request.appendHtml("\n</form>\n");
     }
 

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=1059082&r1=1059081&r2=1059082&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
Fri Jan 14 17:26:03 2011
@@ -96,7 +96,7 @@ public class ActionLink extends Abstract
                 + forwardResultSegment + forwardVoidSegment + resultNameSegment + parameterSegment
+ scopeSegment + confirmSegment + interactionParamters + "\">");
         request.appendHtml(text);
         request.appendHtml("</a>");
-        HelpLink.append(request, action.getHelp(), action.getDescription());
+        HelpLink.append(request, action.getDescription(), action.getHelp());
     }
 
     public String getName() {

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=1059082&r1=1059081&r2=1059082&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
Fri Jan 14 17:26:03 2011
@@ -79,7 +79,8 @@ public abstract class AbstractFormView e
             LinkedObject[] linkFields, String classString, String title, String oddRowClass,
String evenRowClass) {
         request.appendHtml("<div" + classString + ">");
         if (title != null) {
-            request.appendHtml("<div class=\"title\">" + title+ "</div>");  
         
+            request.appendHtml("<div class=\"title\">" + title+ "</div>");
+            HelpLink.append(request, object.getSpecification().getDescription(), object.getSpecification().getHelp());
         }
         int row = 1;
         for (int i = 0; i < fields.size(); i++) {
@@ -101,7 +102,7 @@ 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);
-            HelpLink.append(request,field.getHelp(), field.getDescription());
+            HelpLink.append(request, field.getDescription(), field.getHelp());
             request.appendHtml("</div>");
         }
         request.appendHtml("</div>");

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=1059082&r1=1059081&r2=1059082&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
Fri Jan 14 17:26:03 2011
@@ -77,7 +77,7 @@ public class InputForm {
         Errors.append(request, null);
         
         request.appendHtml("  <input class=\"button\" type=\"submit\" value=\"" + buttonTitle
+ "\" name=\"execute\" />\n");
-        HelpLink.append(request, helpReference, description);
+        HelpLink.append(request, description, helpReference);
         // TODO reinstate fieldsets when we can specify them
         //request.appendHtml("</fieldset>\n");
         request.appendHtml("</form>\n");

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=1059082&r1=1059081&r2=1059082&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
Fri Jan 14 17:26:03 2011
@@ -55,10 +55,12 @@ public abstract class AbstractLink exten
             }
             IsisContext.getPersistenceSession().resolveField(adapter, field);
             adapter = field.get(adapter);
-            objectId = context.mapObject(adapter, Scope.INTERACTION);
+            if (adapter != null) {
+                objectId = context.mapObject(adapter, Scope.INTERACTION);
+            }
         }
         
-        if (valid(request, adapter)) {
+        if (adapter != null && valid(request, adapter)) {
             String variable = request.getOptionalProperty("param-name", RequestContext.RESULT);
             String variableSegment = variable + "=" + objectId;
 



Mime
View raw message