Select filled by model in a RootAction

45 views
Skip to first unread message

Felipe Wannmacher

unread,
Jul 15, 2015, 10:46:41 AM7/15/15
to jenkin...@googlegroups.com

I'm trying to use something like this:


public ListBoxModel doFillGoalTypeItems() {
   
ListBoxModel items = new ListBoxModel();

   
for (BuildGoal goal : getBuildGoals()) {
        items
.add(goal.getDisplayName(), goal.getId());
   
}

   
return items;
}
<f:entry field="goalType" title="Choose Goal Type">
   
<f:select />
</f:entry>

That sample works perfectly in a configuration section, but the select is not filled when used in a RootAction. All I get is the following error:


POST http://localhost:8080/jenkins/my-plugin/null 404 (Not Found) 
No matching rule was found on <com.my.plugin.MyRootAction@1aa70942> for "/null"

I've already tried the doFillXyzItems method either inside or outside the descriptor and nothing seems to help.

Any ideas?

Ivo Bellin Salarin

unread,
Jul 15, 2015, 12:27:29 PM7/15/15
to jenkin...@googlegroups.com

In your jelly, you must be sure that the descriptor and instance variables are present.

--
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/a5f821bd-6cf6-46a4-aae3-3479bb840cd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Felipe Wannmacher

unread,
Jul 15, 2015, 1:12:51 PM7/15/15
to jenkin...@googlegroups.com
How can I do that? The instance is present, but how can I assure the presence of the descriptor?

Ivo Bellin Salarin

unread,
Jul 15, 2015, 2:50:16 PM7/15/15
to jenkin...@googlegroups.com

Felipe Wannmacher

unread,
Jul 15, 2015, 2:55:31 PM7/15/15
to jenkin...@googlegroups.com
Thanks a lot man! That's worked like a charm!

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/tHjx8GRXnMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPc4eF-BFyENRK81agDMDNgGE-T7d1XQiibGcm1E7R%2BXANORdw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages