Uniqueness in configuration variable names

7 views
Skip to first unread message

Greg Allen

unread,
May 20, 2015, 7:10:38 AM5/20/15
to jenkin...@googlegroups.com
Hello all,

I have a build step that contains a number of configuration parameters.

The problem I am running into is how to distinguish which parameters
belong to which build step when multiple instances of this build step
are added to the same job. Is there some way to create per-instance
unique names on the controls in the config.jelly? And how do you
determine these names in the descriptor class?

Thanks,

-- Greg

Oliver Gondža

unread,
May 20, 2015, 7:34:53 AM5/20/15
to jenkin...@googlegroups.com
Hi,

In jelly, `h.generateId()` should give you an identifier that is unique per given page rendered, though you should not rely on that in descriptor.

Input name conflict between different instances of your descriptor should not be a problem as long as you are using databinding (@DataBoundConstructor and friends). How are you accessing the parameters?
Reply all
Reply to author
Forward
0 new messages