Guest User

Untitled

a guest
Oct 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. <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">
  2. <h2>FooBar</h2>
  3. <f:entry field="selection" title="Choose">
  4. <f:select />
  5. </f:entry>
  6. </j:jelly>
  7.  
  8. public class JavaClass implements Action {
  9.  
  10. private AbstractProject ap;
  11.  
  12. public JavaClass(AbstractProject ap) {
  13. this.ap = ap;
  14. }
  15.  
  16. public String getIconFileName() {
  17. return null;
  18. }
  19.  
  20. public String getDisplayName() {
  21. return "";
  22. }
  23.  
  24. public String getUrlName() {
  25. return "something";
  26. }
  27.  
  28. @Extension
  29. public static final class DescriptorImpl extends TransientProjectActionFactory {
  30.  
  31. String selection;
  32.  
  33. public DescriptorImpl() throws IOException {
  34. }
  35.  
  36. @DataBoundConstructor
  37. public DescriptorImpl(String selection) {
  38. this.selection = selection;
  39. }
  40.  
  41. public ListBoxModel doFillSelectionItems() throws IOException {
  42. ListBoxModel model = new ListBoxModel();
  43. model.add("test");
  44. return model;
  45. }
  46.  
  47. @Override
  48. public Collection<? extends Action> createFor(AbstractProject target) {
  49. return Arrays.asList(new JavaClass(target));
  50. }
  51. }
  52. }
  53.  
  54. model.add(new Option("Test"));
Add Comment
Please, Sign In to add comment