Hi,
I created a MyJobPropery class which extends JobProperty.
I know I can use config.jelly to make my fields of MyJobProperty shown
under /job/<job name>/configure page.
However, I want create a dedicate form for users to input fields of
MyJobProperty besides default /job/<job name>/configure,
i.e from an action that bind to url: /MyPlugin/configMyJobProperty/<job
name>.
say I have a method
public class MyPlugin implementsRootAction {
public final void doConfigMyJobProperty(StaplerRequest req,
StaplerResponse rsp) {
//... theory code
MyJobProperty myProp = AbstractProject.findNearest(jobName);
req.bindObject(myProp).getView(this, "../MyJobProperty/config.jelly"
).forward(req, rsp);
//...
}
}
I wonder what code I need that can make config.jelly bind to a
MyJobProperty instance?
I know I can manually populate all values from MyProperty to config.jelly
controls, and doing manual reverse population from form data to
MyJobProperty.
I wonder if Jenksin provide a way that I can take advantage of Jenkins
internal databind.
Thanks.
--
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/818dae5e-f9f5-4a02-9652-48893ae12ab3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.