>From fast lookup because Plugin itself Descriptor that uses `configure` for
databinding and you are making it Describable.
Try rename jelly to config.jelly and remove Describables.
On Wednesday, November 18, 2015 at 5:56:56 PM UTC+3, nigelm wrote:
>
> I must be having a bad day, but I can't figure out why this isn't working.
>
> HPI plugin reduced to *only* 1 class and the jelly file (both below).
>
> Config is being correctly set. Config is being correctly saved to the
> plugin config.xml. Config is *not* being loaded/displayed in the UI,
> however. Why?
>
> ---
>
> public class HelloWorldPlugin extends Plugin implements
> Describable<HelloWorldPlugin>{
> private String fish;
>
> public String getFish() {
> return fish;
> }
>
> @DataBoundSetter public void setFish(String fish) {
> this.fish = fish;
> }
>
>
> /**
> * Returns this singleton instance.
> *
> * @return the singleton.
> */
> public static HelloWorldPlugin get() {
> return Jenkins.getInstance().getPlugin(HelloWorldPlugin.class);
> }
>
> @Override
> public void start() throws Exception {
> load();
> }
>
> @Override
> public void configure(StaplerRequest req, JSONObject formData) throws
> IOException,
>
> ServletException, Descriptor.FormException {
> req.bindJSON(this, formData);
> save();
> }
>
> @Override
> public Descriptor<HelloWorldPlugin> getDescriptor() {
> return Jenkins.getInstance().getDescriptorOrDie(HelloWorldPlugin.class);
> }
>
> @Extension
> public static class DescriptorImpl extends Descriptor<HelloWorldPlugin> {
>
> @Override
> public String getDisplayName() {
> return "HelloWorldPlugin Plugin";
> }
> }
> }
>
> <?jelly escape-by-default='true'?>
> <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
> xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
> <f:entry title="Fish" field="fish">
> <f:textbox/>
> </f:entry>
> </j:jelly>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/7f34b863-7441-44c0-af6b-329898b9f4af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.