Your approach will not work. The UI examples plug-in shows how to achieve that.
Have a look at the templates - f:dropdownList - f:dropdownListBlock Am 19.12.2013 um 00:50 schrieb Mathieu Wang <[email protected]>: > Hello everyone, > > So I have two f:select dropdowns. The first one is always there, and I only > want to display the second one for certain values in the first dropdown. > > I had two ideas: > 1. Use a <j:if> tag around the second dropdown as shown below. > However, I am not able to get the current value of the first dropdown. I've > tried putting "@QueryParameter final String serverName" in my > "isEnableMirrorSelectionInJobs" method, but it always returns null. It seems > like @QueryParameter only works for doFill... and doCheck... methods, and > other methods that bind to a form. Passing "serverName" directly to it (<j:if > test="${descriptor.isEnableMirrorSelectionInJobs(serverName)}">) gives the > same result. > > <f:entry title="${%Choose a server}" description="${it.description}" > field="serverName"> > <f:select/> > </f:entry> > <j:if test="${instance.isEnableMirrorSelectionInJobs()}"> > <f:entry title="${%Choose a mirror}" field="mirror"> > <f:select/> > </f:entry> > </j:if> > > 2. Change the first f:select to f:dropdownList and put everything inside a > f:dropdownListBlock. However, this changes the structure of the entire JSON > object by adding one more level to it, thus needing refactoring on the > DataBoundConstructor, which I don't want. > > Does anyone have an idea how to solve this problem? > Thanks in advance! > > Mathieu Wang > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out.
signature.asc
Description: Message signed with OpenPGP using GPGMail
