GitHub user zjffdu opened a pull request: https://github.com/apache/zeppelin/pull/2245
ZEPPELIN-2395. Refactor Input.java to make dynamic forms extensible ### What is this PR for? Currently, zeppelin only support 3 kinds of dynamic form controls: TextBox, Select, CheckBox. All the things are in `Input.java`, this is hard to add new controls, this PR is for refactoring Input to make dynamic forms extensible. Main Changes: * Make Input as the base class of dynamic forms also used it as the factory class * All the concret dynamic forms extend `Input` * Change `z.input` to `z.textbox` as I think z.input is a little misleading. But I just make `z.input` as deprecated. * Add method `toJson` and `fromJson` for `GUI` for `GUI`'s serialization/deserialization. I plan to do it for other classes as well, so that we can make code clean and easy to test serialization/deserialization ### What type of PR is it? [ Improvement | Refactoring] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-2395 ### How should this be tested? Test is added ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? Yes * Is there breaking changes for older versions? No * Does this needs documentation? No You can merge this pull request into a Git repository by running: $ git pull https://github.com/zjffdu/zeppelin ZEPPELIN-2395 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/2245.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2245 ---- commit d59d45a95d6e79a6d9a377d1333a30f8a715854e Author: Jeff Zhang <zjf...@apache.org> Date: 2017-04-12T02:50:16Z ZEPPELIN-2395. Refactor Input.java to make dynamic forms extensible ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---