Question about using forms

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Question about using forms

Francis
I'm using the Jelly Forms to provide a combo box to add the availability zone support to the EC2 plugin.

In the SlaveTemplate.DescriptorImpl class, I have the following code:

        public ListBoxModel doFillZoneItems(@QueryParameter String accessId,
        @QueryParameter String secretKey, @QueryParameter String region) throws IOException,
    ServletException {
        return EC2Slave.fillZoneItems(accessId, secretKey, region);
    }

In the corresponding config.entry, I have: 

  <f:entry title="${%Availability Zone}" field="zone">
    <f:select/>
  </f:entry>

However, the associated bean, the SlaveTemplate does not have the accessId, secretKey, or region parameters, these are part of the enclosing form that defines the cloud.

When I run the code, these come in as null values.

And yet, in the same config.entry there is this:

  <f:validateButton title="${%Check AMI}" progress="${%Checking...}" method="validateAmi" with="secretKey,accessId,region,ami" />

Which does see these values (presumably from the enclosing form) as the validation works.

It seems that finding the values from the enclosing form does not work in the f:select case (Using the QueryParameter). Is there another way to do this? If not I suppose I will need to try find the code that supports this stuff and make that work (any hints there)? I have not found much in the way of documentation for this. Does any exist?

Thanks kindly,
Francis
Loading...