Hi Oscar,

I don't see anything suspicious in your screenshots.
If you provide a failing example (a public repo in GH?) I can take a look.

On Tue, Feb 2, 2016 at 12:59 PM, Oscar Serna <se...@elasticbox.com> wrote:

>
> Thanks for your quickly answer, below you can see what I have in my in the
> Jelly config.jelly file:
>
>
>
> <https://lh3.googleusercontent.com/-GrhEcKkSAIE/VrCZ-LbWLiI/AAAAAAAAAMA/5Dq3B94EOjk/s1600/Screen%2BShot%2B2016-02-02%2Bat%2B12.47.37.png>
>
>
>
>
> and in the Descriptor part:
>
>
>
> <https://lh3.googleusercontent.com/-ciEXrSd8eio/VrCaEwaT4-I/AAAAAAAAAMI/Kf0HWX3lzp0/s1600/Screen%2BShot%2B2016-02-02%2Bat%2B12.48.50.png>
>
>
>
>
>
>
> In the next schema you can see the error:
>
>
>
> <https://lh3.googleusercontent.com/-nqVaOyYuwkw/VrCaI8W4L6I/AAAAAAAAAMQ/n3cXfkXxbhA/s1600/Screen%2BShot%2B2016-02-02%2Bat%2B12.52.53.png>
>
>
>
>
>
>
> It happens during the first two calls, the first one is a call
> to doFillStateItems() and just immediately after there is another call to
> doFillCityItems(@QueryParameter String state) but without parameters. In
> that case as you can see in the java code, I’m currently returning an empty
> ListBoxModel
>
>
>
> Regards and thanks in advance.
>
> On Tuesday, February 2, 2016 at 12:43:35 PM UTC+1, Antonio Muñiz wrote:
>>
>> Hi,
>>
>> First, what do you have in the jelly file?
>> And second, what's the real name of doFillXXX? It should be
>> "doFillXXXItems", where XXX is the name of the bean property.
>>
>> On Tue, Feb 2, 2016 at 10:08 AM, Oscar Serna <se...@elasticbox.com>
>> wrote:
>> > Hi devs,
>> >
>> > I'm working in a Jenkins plugin and I'm struggling with an issue. AFAIK
>> in
>> > order to populate select combo using web methods the common pattern to
>> > follow is to add this type of methods in the Descriptor class, as you
>> can
>> > see below:
>> >
>> > public ListBoxModel doFillXXX(){
>> >   ListBoxModel m = new ListBoxModel();
>> >   for(){
>> >     ...
>> >    m.add(displayName, name);
>> >   }
>> >   return  m;
>> > }
>> >
>> > However when the list is empty, so there is just the m object without
>> > Options I have an error in the Javascript select.js file. The error is
>> this:
>> >
>> > Uncaught TypeError: Cannot read property 'value' of undefined
>> > hasChanged @select.js:46
>> > updateListBox.onSuccess @select.js:76
>> > config.onSuccess @select.js:32
>> > Ajax.Request.Class.create.respondToReadyState
>> @prototype.js:1657
>> > Ajax.Request.Class.create.onStateChange @prototype.js:1600
>> > (anonymous function) @prototype.js:414
>> >
>> >
>> > and in that line of the select.js file you can see:
>> >
>> > Behaviour.specify("SELECT.select", 'select', 1000, function(e) {
>> >
>> >         function hasChanged(selectEl, originalValue) {
>> >             var firstValue = selectEl.options[0].value;
>> >             var selectedValue = selectEl.value;
>> >             if (originalValue == "" && selectedValue == firstValue) {
>> >                 // There was no value pre-selected but after the call
>> to
>> > updateListBox the first value is selected by
>> >                 // default. This must not be considered a change.
>> >                 return false;
>> >             } else {
>> >                 return originalValue != selectedValue;
>> >             }
>> >         };
>> >
>> > So, it seems like not adding options to the select causes this issue.
>> > Probably I'm making some type of mistake or maybe I'm missing
>> something. Any
>> > help will be welcome. My Jenkins version is 1.644.
>> >
>> > Thanks in advance.
>> >
>> >
>> > --
>> > 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/f3f34eb7-9cf5-4963-a367-16fe52377691%40googlegroups.com.
>>
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Antonio Muñiz
>> Software Engineer
>> CloudBees, Inc.
>>
> --
> 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-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/3a5d43e1-8b11-4f9d-bd24-70161cbb1bb4%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/3a5d43e1-8b11-4f9d-bd24-70161cbb1bb4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAJc7kzSB7mW_L_fzWeRG3_Dr-WeeXqG7Lfk-8T9G6cHMWesdBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to