Trigger a ComboBox refresh while exiting another ComboBox

111 views
Skip to first unread message

SimonGlet

unread,
May 23, 2017, 9:55:27 AM5/23/17
to jenkin...@googlegroups.com
Hi,

The Jira Zephyr plugin does not allow environment variables so I replaced
the drop down lists by combo boxes.

The problem is to refresh the combo box value based on the selection of
another combo box.

Let's say I have two combo boxex, CB1 and CB2. CB1 holds project names and
CB2 versions to each project. When I select a project in CB1, I would like
to find a way to update CB2 accordingly.

Currently I can't find a way to get the FormValidation method to trigger the
refresh of CB2. I might be looking at this the wrong way ...

Any ideas ?

Thanks
Simon Glet



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Trigger-a-ComboBox-refresh-while-exiting-another-ComboBox-tp4898326.html
Sent from the Jenkins dev mailing list archive at Nabble.com.

Stephen Connolly

unread,
May 23, 2017, 10:01:15 AM5/23/17
to jenkin...@googlegroups.com
You need the second combo box's signature like: doFillCB2Items(@QueryParam String cb1) so that form binding knows that there is a dependency


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1495546840064-4898326.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.

SimonGlet

unread,
May 23, 2017, 10:13:12 AM5/23/17
to jenkin...@googlegroups.com
Hi Stephen,

Thanks for the quick response ! :-)

The thing is that the doFill method is only triggered when the
Project/Configure page is called. The only methods that are called without
refreshing the whole page are the FormValidation doCheck...

It seems that is only possible way to refresh locally is to click on
something like a checkBox, button.

We are beginning to think about optional fields: drop down list or free text
entry controlled by a check box. That way we would get back the drop down
lists that are updated on selection.

I will continue looking for a solution to the posted problem and any other
input is very welcome.

Thanks
Simon Glet





--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Trigger-a-ComboBox-refresh-while-exiting-another-ComboBox-tp4898326p4898329.html

Stephen Connolly

unread,
May 23, 2017, 10:29:49 AM5/23/17
to jenkin...@googlegroups.com
On 23 May 2017 at 06:59, SimonGlet <simon...@desjardins.com> wrote:
Hi Stephen,

Thanks for the quick response ! :-)

The thing is that the doFill method is only triggered when the
Project/Configure page is called. The only methods that are called without
refreshing the whole page are the FormValidation doCheck...

Really? Because I do this *all* the time with no issues...
 

It seems that is only possible way to refresh locally is to click on
something like a checkBox, button.

We are beginning to think about optional fields: drop down list or free text
entry controlled by a check box. That way we would get back the drop down
lists that are updated on selection.

I will continue looking for a solution to the posted problem and any other
input is very welcome.

Thanks
Simon Glet





--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Trigger-a-ComboBox-refresh-while-exiting-another-ComboBox-tp4898326p4898329.html
Sent from the Jenkins dev mailing list archive at Nabble.com.

--
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+unsubscribe@googlegroups.com.

Stephen Connolly

unread,
May 23, 2017, 10:30:59 AM5/23/17
to jenkin...@googlegroups.com

Stephen Connolly

unread,
May 23, 2017, 10:31:25 AM5/23/17
to jenkin...@googlegroups.com

Stephen Connolly

unread,
May 23, 2017, 10:35:04 AM5/23/17
to jenkin...@googlegroups.com
Inline images 1
Seems to work just fine to my eyes (ok so the Repository Name is using the new fancy select that gives AJAX refresh indication but the credentials drop down also changes its items

On 23 May 2017 at 15:31, Stephen Connolly <stephen.al...@gmail.com> wrote:

SimonGlet

unread,
May 23, 2017, 1:41:39 PM5/23/17
to jenkin...@googlegroups.com
Yes it works fine with a ListBoxModel but my issue is with a ComboBoxModel.
For some reason the doFill method is not triggered with that type of
element.

The two provide links work with a list box.

Could this be a bug ? May be, still trying to figure it out.

Thanks for your time !
Simon Glet



--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Trigger-a-ComboBox-refresh-while-exiting-another-ComboBox-tp4898326p4898341.html

Stephen Connolly

unread,
May 23, 2017, 1:52:18 PM5/23/17
to jenkin...@googlegroups.com
Should be a bug as iirc the combo box should *repeatedly* resubmit as you type to generate more completions

--
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/1495560464646-4898341.post%40n4.nabble.com.

For more options, visit https://groups.google.com/d/optout.
--
Sent from my phone

SimonGlet

unread,
May 24, 2017, 9:25:08 AM5/24/17
to jenkin...@googlegroups.com
Hi Stephen,

I found part of the problem: by changing from the SelectList to the ComboBox
elements the data structure of the elements are quite different. During the
refactoring, a field name in the Jelly file was not changed in every doFill
method signature.
That prevented the doFill with the wrong field name argument from being
invoked.

Thanks
Simon Glet





--
View this message in context: http://jenkins-ci.361315.n4.nabble.com/Trigger-a-ComboBox-refresh-while-exiting-another-ComboBox-tp4898326p4898369.html
Reply all
Reply to author
Forward
0 new messages