<select> in nested jelly page

170 views
Skip to first unread message

Vojtech Juranek

unread,
Apr 19, 2011, 7:02:25 PM4/19/11
to jenkin...@googlegroups.com
Hi,
have a jelly page (*) in my plugin which is shown on main Hudson config page. From this page another jelly page (**) is loaded,
which contains <f:select /> tag. Descriptor (***) of the class which correponds (/is configured via) this nested jelly page implements doFilllXYZItems() method.
However, the select box is always empty and this doFilllXYZItems() method is never called (and also no exception thrown).
Do you have any idea, how to make it working - i.e. how to load values into select box in nested jelly page?
Thanks for any hints.
Vojtech

(*) global config jelly:
<f:repeatable field="images">
<st:include page="config.jelly" class="hudson.plugins.delta_cloud.DCImage" />
</f:repeatable>

(**) nested jelly page
<f:entry title="${%Image}" field="image" >
<f:select />
</f:entry>

(***) descriptor of class configured via nested jelly page
@Extension
public static final class DescriptorImpl extends Descriptor<DCImage>

public ListBoxModel doFillImageItems() {
System.out.println("Fill images called");
ListBoxModel model = new ListBoxModel();
for(Image image:images){
model.add(image.getName(),image.getId());
}
return model;
}
}

Kohsuke Kawaguchi

unread,
Apr 20, 2011, 5:17:29 PM4/20/11
to jenkin...@googlegroups.com, Vojtech Juranek

At the page rendering time Jenkins did find your doFillImageItems(), or
else it would have reported an error at that point.

So I'd like you to use something like FireBug to see if the browser is
sending the AJAX request to the server. If it's not, it's probably
failing to apply behaviour rules for some reasons. If it is, then there
must be a URL generation problem, and the request must be getting sent
to the wrong place.

Is this plugin visible publicly? I'd be happy to take a look.


--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/

Vojtech Juranek

unread,
Apr 26, 2011, 4:25:35 AM4/26/11
to jenkin...@googlegroups.com
Thanks for willingness to take a look, but it's not visible as I just started
to implement this plugin. Also thanks for tips where to start - I try to debug
it myself and let you know it I don't succeed (I take it as a good
opportunity/motivation to learn how Hudson UI works - in fact I've avoided
Jelly and Hudson UI as much as possible so far and never fully understood how
it works:-)
Reply all
Reply to author
Forward
0 new messages