I'm trying to do a similar thing but with a hudson.model.ManagementLink. 

Problem is that I can't extend ManagementLink AND AbstractDescribableImpl 
(as in the example of ProxyConfiguration). 

If I implement Describable<MyManagementLink> and create the inline 
Descriptor<MyManagementLink>, I can't do the normal getDescriptor() 
override, which should be... 

        @Override 
        public Descriptor<MyManagementLink> getDescriptor() { 
                return (MyManagementLinkDescriptor) super.getDescriptor(); 
        } 
        
...since ManagementLink doesnt have a getDescriptor() since it isn't itself 
describable. 

Note also, the contents of the index.jelly for MyManagementLink is a series 
of components within a <f:form> tag.


On Thursday, February 23, 2012 11:36:33 PM UTC, Kohsuke Kawaguchi wrote:
>
> The trick is to make your class implement Describable, then define a
> nested Descriptor.
>
> Various classes in the core do just that, such as ProxyConfiguration, I 
> believe.
>
> 2012/2/22 b8565524 <[email protected] <javascript:>>:
> > Hi,
> >
> > I would like to use f:validateButton control to validate my plugin 
> config.
> > The problem is that I haven't got any Descriptor - I use class which 
> extends
> > Plugin.
> >
> > This code:
> > <f:validateButton title="Test" progress="Wait..." with="param1,param2"
> > method="testConfig"/>
> >
> > returns 404.
> >
> > I was trying to 'hack' method url:
> > <f:validateButton title="Test" progress="Wait..." with="param1,param2"
> > method="${rootURL}/plugin/myplugin/testConfig"/>
> >
> > It does not work... It tries to invoke
> > 
> http://localhost:8081/descriptorByName/jenkins.model.GlobalPluginConfiguration//plugin/myplugin/testConfig
> > :(
> >
> > How can I use validateButton when I haven't got any descriptor?
> >
> > --
> > View this message in context: 
> http://jenkins.361315.n4.nabble.com/ValidateButton-without-descriptor-tp4409633p4409633.html
> > Sent from the Jenkins dev mailing list archive at Nabble.com.
>
> -- 
> Kohsuke Kawaguchi
>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to