jenkinsci/jenkins — pull request #816 by jglick (2013-06-17 20:31:00+00:00)
Title: Hetero list sample

_Not yet ready to merge._ Still get an error when trying to submit the form:

```
javax.servlet.ServletException: java.lang.IllegalArgumentException: Failed to instantiate class jenkins.plugins.ui_samples.HeteroList$Config from {"entries":[{"text":"hooha","stapler-class":"jenkins.plugins.ui_samples.HeteroList$SimpleEntry","kind":"jenkins.plugins.ui_samples.HeteroList$SimpleEntry"},{"choice":{"value":"bad"},"stapler-class":"jenkins.plugins.ui_samples.HeteroList$ChoiceEntry","kind":"jenkins.plugins.ui_samples.HeteroList$ChoiceEntry"}]}
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:719)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583)
at org.kohsuke.stapler.Stapler.service(Stapler.java:214)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: java.lang.IllegalArgumentException: Failed to instantiate class jenkins.plugins.ui_samples.HeteroList$Config from {"entries":[{"text":"hooha","stapler-class":"jenkins.plugins.ui_samples.HeteroList$SimpleEntry","kind":"jenkins.plugins.ui_samples.HeteroList$SimpleEntry"},{"choice":{"value":"bad"},"stapler-class":"jenkins.plugins.ui_samples.HeteroList$ChoiceEntry","kind":"jenkins.plugins.ui_samples.HeteroList$ChoiceEntry"}]}
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:596)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:401)
at jenkins.plugins.ui_samples.HeteroList.doConfigSubmit(HeteroList.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
... 41 more
Caused by: java.lang.IllegalArgumentException: Failed to convert the entries parameter of the constructor public jenkins.plugins.ui_samples.HeteroList$Config(java.util.List)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:590)
... 53 more
Caused by: java.lang.IllegalArgumentException: Failed to instantiate class jenkins.plugins.ui_samples.HeteroList$Entry from {"choice":{"value":"bad"},"stapler-class":"jenkins.plugins.ui_samples.HeteroList$ChoiceEntry","kind":"jenkins.plugins.ui_samples.HeteroList$ChoiceEntry"}
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:596)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:641)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:391)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:588)
... 53 more
Caused by: java.lang.IllegalArgumentException: Failed to convert the choice parameter of the constructor public jenkins.plugins.ui_samples.HeteroList$ChoiceEntry(java.lang.String)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:590)
... 56 more
Caused by: java.lang.IllegalArgumentException: Failed to instantiate class java.lang.String from {"value":"bad"}
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:596)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:391)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:588)
... 56 more
Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class java.lang.String
at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:176)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:575)
... 58 more
```