You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/06/10 17:49:55 UTC

svn commit: r1491507 - in /isis/site/trunk/content: ./ applib-guide/how-tos/ applib-guide/reference/ applib-guide/reference/recognized-annotations/ contributors/

Author: danhaywood
Date: Mon Jun 10 15:49:54 2013
New Revision: 1491507

URL: http://svn.apache.org/r1491507
Log:
ISIS-433, 434; also page on applying patches

Added:
    isis/site/trunk/content/applib-guide/how-tos/how-to-03-015-How-to-specify-an-autocomplete-for-a-property.md
    isis/site/trunk/content/applib-guide/how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.md
    isis/site/trunk/content/contributors/applying-patches.md
Modified:
    isis/site/trunk/content/applib-guide/how-tos/about.md
    isis/site/trunk/content/applib-guide/how-tos/how-to-03-000-How-to-provide-drop-downs-and-default-values.md
    isis/site/trunk/content/applib-guide/reference/Recognized-Methods-and-Prefixes.md
    isis/site/trunk/content/applib-guide/reference/recognized-annotations/AutoComplete.md
    isis/site/trunk/content/contributors/about.md
    isis/site/trunk/content/documentation.md

Modified: isis/site/trunk/content/applib-guide/how-tos/about.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/how-tos/about.md?rev=1491507&r1=1491506&r2=1491507&view=diff
==============================================================================
--- isis/site/trunk/content/applib-guide/how-tos/about.md (original)
+++ isis/site/trunk/content/applib-guide/how-tos/about.md Mon Jun 10 15:49:54 2013
@@ -93,8 +93,12 @@ this can also be specified.
 
 * [How to specify a set of choices for a property](./how-to-03-010-How-to-specify-a-set-of-choices-for-a-property.html)
 
+* [How to specify an auto-complete for a property](./how-to-03-015-How-to-specify-an-autocomplete-for-a-property.html)
+
 * [How to specify a set of choices for an action parameter](./how-to-03-020-How-to-specify-a-set-of-choices-for-an-action-parameter.html)
 
+* [How to specify an auto-complete for an action parameter](./how-to-03-025-How-to-specify-a-set-of-an-autocomplete-for-an-action-parameter.html)
+
 * [How to specify that a class of objects has a limited number of instances](./how-to-03-030-How-to-specify-that-a-class-of-objects-has-a-limited-number-of-instances.html)
 
 * [How to find an entity (for an action parameter or property) using auto-complete](./how-to-03-040-How-to-find-an-entity-(for-an-action-parameter-or-property)-using-auto-complete.html)

Modified: isis/site/trunk/content/applib-guide/how-tos/how-to-03-000-How-to-provide-drop-downs-and-default-values.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/how-tos/how-to-03-000-How-to-provide-drop-downs-and-default-values.md?rev=1491507&r1=1491506&r2=1491507&view=diff
==============================================================================
--- isis/site/trunk/content/applib-guide/how-tos/how-to-03-000-How-to-provide-drop-downs-and-default-values.md (original)
+++ isis/site/trunk/content/applib-guide/how-tos/how-to-03-000-How-to-provide-drop-downs-and-default-values.md Mon Jun 10 15:49:54 2013
@@ -1,4 +1,4 @@
-How to provide drop-downs and default values
+How to provide drop-downs, auto-complete and default values
 ============================================
 
 > How-to make actions easier to use from an end-user perspective, by
@@ -7,9 +7,7 @@ How to provide drop-downs and default va
 Invoking actions or setting properties requires that the user specify a
 valid value; of the correct type, and that passes any validation rules
 that may have been defined. To make things are easier for the user, you
-can provide lists of choices; viewers typically render these values in a
-drop-down list box.
+can provide either a lists of choices, or an autocomplete box (where the user enters a single string which is used to locate candidates).  In both cases viewers render the candidate values in a drop-down list box.
 
-In a similar vein, there may be a default value for an action parameter;
-this can also be specified.
+Of the candidate values, there may be a default value for an action parameter (for example the current value of some corresponding property on the object).  This can also be specified.
 

Added: isis/site/trunk/content/applib-guide/how-tos/how-to-03-015-How-to-specify-an-autocomplete-for-a-property.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/how-tos/how-to-03-015-How-to-specify-an-autocomplete-for-a-property.md?rev=1491507&view=auto
==============================================================================
--- isis/site/trunk/content/applib-guide/how-tos/how-to-03-015-How-to-specify-an-autocomplete-for-a-property.md (added)
+++ isis/site/trunk/content/applib-guide/how-tos/how-to-03-015-How-to-specify-an-autocomplete-for-a-property.md Mon Jun 10 15:49:54 2013
@@ -0,0 +1,22 @@
+How to specify an auto-complete for a property
+-------------------------------------------------------
+
+Using the auto-complete method you can allow the user to search for objects based on a single string.  These will be made available to the user through a device such as a drop-down list.
+
+The syntax for properties is:
+
+    public List<ParameterType> autoCompletePropertyName()
+
+For example:
+
+    public class Customer {
+        public Product getFavouriteProduct() { ... }
+        public List<Product> autoCompleteFavouriteProduct(String search) {
+            return productsRepo.findMatching(search);
+        }
+        ....
+    }
+
+> Note
+The [@AutoComplete](../reference/recognized-annotations/AutoComplete.html) allows autocomplete functionality to be associated with the domain type (eg `Product` in the example above).  If both are present, then the per-property autocomplete takes preference.
+

Added: isis/site/trunk/content/applib-guide/how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.md?rev=1491507&view=auto
==============================================================================
--- isis/site/trunk/content/applib-guide/how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.md (added)
+++ isis/site/trunk/content/applib-guide/how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.md Mon Jun 10 15:49:54 2013
@@ -0,0 +1,28 @@
+How to specify an auto-complete for an action parameter
+-------------------------------------------------------
+
+Using the auto-complete method you can allow the user to search for objects based on a single string.  These will be made available to the user through a device such as a drop-down list.
+
+The syntax is:
+
+    public List<ParameterType> autoCompleteNActionName()
+
+where N indicates the 0-based parameter number.
+
+For example:
+
+    public class Order {
+        public Order placeOrder(
+                Product product,
+                @Named("Quantity") 
+                int quantity) {
+            ...
+        }
+        public List<Product> autoComplete0PlaceOrder(String search) {
+            return productsRepo.findMatching(search);
+        }
+        ....
+    }
+
+> Note
+The [@AutoComplete](../reference/recognized-annotations/AutoComplete.html) allows autocomplete functionality to be associated with the domain type (eg `Product` in the example above).  If both are present, then the per-parameter autocomplete takes preference.

Modified: isis/site/trunk/content/applib-guide/reference/Recognized-Methods-and-Prefixes.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/reference/Recognized-Methods-and-Prefixes.md?rev=1491507&r1=1491506&r2=1491507&view=diff
==============================================================================
--- isis/site/trunk/content/applib-guide/reference/Recognized-Methods-and-Prefixes.md (original)
+++ isis/site/trunk/content/applib-guide/reference/Recognized-Methods-and-Prefixes.md Mon Jun 10 15:49:54 2013
@@ -42,6 +42,15 @@ recognized by *Apache Isis*' default pro
     <td></td>
 </tr>
 <tr>
+    <td>autoComplete</td>
+    <td></td>
+    <td>Y</td>
+    <td></td>
+    <td></td>
+    <td>Y</td>
+    <td><a href="../recognized-annotations/AutoComplete.html">@AutoComplete </a> annotation</td>
+</tr>
+<tr>
     <td>clear</td>
     <td></td>
     <td>Y</td>
@@ -219,7 +228,7 @@ recognized by *Apache Isis*' default pro
     <td></td>
     <td></td>
     <td></td>
-    <td></td>
+    <td><a href="../recognized-annotations/Title.html">@Title </a> annotation</td>
 </tr>
 <tr>
     <td>updating</td>

Modified: isis/site/trunk/content/applib-guide/reference/recognized-annotations/AutoComplete.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/applib-guide/reference/recognized-annotations/AutoComplete.md?rev=1491507&r1=1491506&r2=1491507&view=diff
==============================================================================
--- isis/site/trunk/content/applib-guide/reference/recognized-annotations/AutoComplete.md (original)
+++ isis/site/trunk/content/applib-guide/reference/recognized-annotations/AutoComplete.md Mon Jun 10 15:49:54 2013
@@ -30,3 +30,6 @@ where:
         ...
     }
 
+{note
+As an alternative to this annotation, you may also use the `autoComplete` method prefix; see [this HOWTO](../../how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.html) and [this HOWTO](../../how-tos/how-to-03-015-How-to-specify-an-autocomplete-for-a-property.html)
+}
\ No newline at end of file

Modified: isis/site/trunk/content/contributors/about.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/contributors/about.md?rev=1491507&r1=1491506&r2=1491507&view=diff
==============================================================================
--- isis/site/trunk/content/contributors/about.md (original)
+++ isis/site/trunk/content/contributors/about.md Mon Jun 10 15:49:54 2013
@@ -12,6 +12,7 @@ Title: Contributors
 ###  Committers
 
 - [Updating the CMS site](updating-the-cms-site.html)
+- [Applying Patches](applying-patches.html)
 - [Recreating an archetype](recreating-an-archetype.html)
 - [Snapshot process](snapshot-process.html)
 - [Release process](release-process.html)

Added: isis/site/trunk/content/contributors/applying-patches.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/contributors/applying-patches.md?rev=1491507&view=auto
==============================================================================
--- isis/site/trunk/content/contributors/applying-patches.md (added)
+++ isis/site/trunk/content/contributors/applying-patches.md Mon Jun 10 15:49:54 2013
@@ -0,0 +1,41 @@
+Title: Applying Patches
+
+If a patch is received on a JIRA ticket, then it should be reviewed and applied.  The commands are slightly different for diff files vs patch files.
+
+## Diff files
+
+If a diff file has been provided, then it can easily be applied using eGit's wizards  (Eclipse's Git integration)...
+
+
+>this stuff needs fleshing out...
+
+## Patch files
+
+If a patch file has been povided, then it can be applied using command line tools.
+
+First, take a look at what changes are in the patch. You can do this easily with `git apply`
+
+    git apply --stat ISIS-xxx.patch
+
+Note that this command does not apply the patch, but only shows you the stats about what it’ll do. After peeking into the patch file with your favorite editor, you can see what the actual changes are.
+
+Next, you’re interested in how troublesome the patch is going to be. Git allows you to test the patch before you actually apply it.
+
+    git apply --check ISIS-xxx.patch
+
+If you don’t get any errors, the patch can be applied cleanly. Otherwise you may see what trouble you’ll run into.
+
+To apply the patch, use:
+
+    git apply ISIS-xxx.patch
+
+Review changes.  Then commit the changes, using the `--signoff` flag to indicate that you reviewed and were happy with the contributed changes:
+
+    git commit -m "..." --signoff
+
+Alternatively, if you want to do the apply and commit/signoff in a single step, use `git am`:
+
+    git am --signoff < ISIS-xxx.patch
+
+Information adapted from [this blog post](https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/)
+

Modified: isis/site/trunk/content/documentation.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/documentation.md?rev=1491507&r1=1491506&r2=1491507&view=diff
==============================================================================
--- isis/site/trunk/content/documentation.md (original)
+++ isis/site/trunk/content/documentation.md Mon Jun 10 15:49:54 2013
@@ -316,6 +316,7 @@ Note: this viewer is third-party open so
 ###  Committers
 
 - [Updating the CMS site](contributors/updating-the-cms-site.html)
+- [Applying Patches](contributors/applying-patches.html)
 - [Recreating an archetype](contributors/recreating-an-archetype.html)
 - [Snapshot process](contributors/snapshot-process.html)
 - [Release process](contributors/release-process.html)