Thanks Lance,

Here's another effort.  I'm sure theres a better way to get the value into the 
request parameter than I've done here?  This generates a request URL like this:

/editcube:colourprofileoverridechanged/283021?newColourProfile=MONO_RED&t:ac=1

Page Class:

    public Object onColourProfileOverrideChanged(Integer cubeCardId, 
@RequestParameter(value="newColourProfile") String newColourProfile) throws 
InterruptedException {
        //Do Stuff
        return gridZone.getBody();
    }
    
    public String getColourProfileOverrideChangedUrl() {
        Link link = resources.createEventLink("ColourProfileOverrideChanged", 
cubeCard.getId());
        link.addParameter("newColourProfile", "[VALUE]");
        return link.toAbsoluteURI();
    }

Component:

<t:select t:id="colourProfileOverride" t:clientId="colourProfileOverride" 
class="cubeAjaxUpdate" t:value="cubeCard.colourCombinationOverride" 
blankOption="never" data-url="${ColourProfileOverrideChangedUrl}" />

Javascript:

                 $(document).find(".cubeAjaxUpdate").change(function() {    
                    $("#gridZone").tapestryZone("update", {
                        url: $(this).data("url").replace('[VALUE]', 
$(this).val()),
                        params: parameters
                    });
                });

Cheers,
Ben.

> Date: Wed, 21 Aug 2013 18:26:37 +0100
> Subject: RE: Submitting id & value of a t:select component onChange
> From: lance.j...@googlemail.com
> To: users@tapestry.apache.org
> 
> You'll need to append a request parameter to a serverside generated event
> url and use @RequestParam serverside to get the value in the event
                                          

Reply via email to