Dynamic elements on configuration page

19 views
Skip to first unread message

Nikhil Bhoski

unread,
Sep 20, 2018, 2:27:52 AM9/20/18
to Jenkins Developers

Hi All,

I am trying to populate and element on My configuration page based on values of other element on same page without having to do refresh . For eg: I have two types of  elements on config page one is drop-down box and other is set of check boxes. I want to show selected text boxes on my Jenkins configuration page based on the value user selects from dropdown. Please suggest if any way possible doing this without having to refresh the page . 


I tried something to achieve this using below method in my Descriptor class however i am not sure now how to read the value of this element in my builder class.

 public FormValidation doCheckLocal(@QueryParameter String local){
  
  if(local.isEmpty()){
  
  return FormValidation.respond(Kind.OK, "<input type=checkbox name=cob> Creport<br>");
  
  }
  
  return FormValidation.ok();
  }

Ullrich Hafner

unread,
Sep 20, 2018, 2:07:31 PM9/20/18
to Jenkins Developers
The UI examples plugin has an example that shows you how to use different views if an element in a list box has been selected.

--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/d4143f7d-ff8d-4cf9-bdae-c8543299d213%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc
Reply all
Reply to author
Forward
0 new messages