WICKET-663 enhance ichoicerenderer with id->choice object lookup

Improve the javadoc


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/463e6039
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/463e6039
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/463e6039

Branch: refs/heads/sandbox/WICKET-4686
Commit: 463e6039a360f7e1088ba4f64cef9aab04f84766
Parents: 950671f
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Fri Dec 20 12:09:58 2013 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Fri Dec 20 12:09:58 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/wicket/markup/html/form/AbstractChoice.java   | 3 +++
 .../java/org/apache/wicket/markup/html/form/IChoiceRenderer.java  | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/463e6039/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
index 7246e07..8716eb5 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractChoice.java
@@ -210,6 +210,9 @@ public abstract class AbstractChoice<T, E> extends 
FormComponent<T>
                return choices;
        }
 
+       /**
+        * @return The model with the choices for this component
+        */
        public IModel<? extends List<? extends  E>> getChoicesModel()
        {
                return this.choices;

http://git-wip-us.apache.org/repos/asf/wicket/blob/463e6039/wicket-core/src/main/java/org/apache/wicket/markup/html/form/IChoiceRenderer.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/IChoiceRenderer.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/IChoiceRenderer.java
index 1969982..ad3f97b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/IChoiceRenderer.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/IChoiceRenderer.java
@@ -60,6 +60,9 @@ public interface IChoiceRenderer<T> extends IClusterable
        /**
         * This method is called to get an object back from its id 
representation.
         *
+        * The {@code id} may be used to find/load the object in a more 
efficient way
+        * than loading all {@code choices} and find the one with the same id 
in the list
+        *
         * @param id
         *          The id representation of the object
         * @param choices

Reply via email to