Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master a70aadfd1 -> 11d25be8c


Pass defaultValue parameter to z.select

### What is this PR for?
This PR is to fix the `z.select()` defaultValue

### What type of PR is it?
Bug Fix

### Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-581

### How should this be tested?
If you run:
```
val selected = z.select("formName", "option1", Seq(("option1", 
"option1DisplayName"), ("option2", "option2DisplayName")))
println(selected)
```
you should see: `res27: Object = option1`

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Damien CORNEAU <[email protected]>

Closes #623 from corneadoug/fix/selectDisplayFormDefaultValue and squashes the 
following commits:

15b4199 [Damien CORNEAU] Pass defaultValue parameter to z.select


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/11d25be8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/11d25be8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/11d25be8

Branch: refs/heads/master
Commit: 11d25be8c3d13f55763609a4ccb93394771a6971
Parents: a70aadf
Author: Damien CORNEAU <[email protected]>
Authored: Tue Jan 12 17:27:13 2016 +0900
Committer: Damien CORNEAU <[email protected]>
Committed: Wed Jan 13 19:30:55 2016 +0900

----------------------------------------------------------------------
 spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/11d25be8/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java
----------------------------------------------------------------------
diff --git a/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java 
b/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java
index af806bf..a55ed73 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java
@@ -220,7 +220,7 @@ public class ZeppelinContext extends HashMap<String, 
Object> {
       paramOptions[i++] = new ParamOption(valueAndDisplayValue._1(), 
valueAndDisplayValue._2());
     }
 
-    return gui.select(name, "", paramOptions);
+    return gui.select(name, defaultValue, paramOptions);
   }
 
   public void setGui(GUI o) {

Reply via email to