Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by RyanSkow: http://wiki.apache.org/tapestry/Tapestry5PaletteEvents ------------------------------------------------------------------------------ Anything can happen in your 'doMyStuff' method including submitting an Ajax request to do some calculations based on the contents of the select list or displaying other details related to what has been selected. - Note that this is hack is likely to break if the Palette's 'updateHidden' function is changed. Hopefully someone better versed in Javascript can figure out a way to call the original method (super.updateHidden or something of that nature) to avoid the copy/paste of code... Perhaps this example will spur some additional ideas. - {{{ <script type="text/javascript"> - + + var _oldUpdateHidden = Tapestry.Palette.prototype.updateHidden; Tapestry.Palette.prototype.updateHidden=function() { + var doOldStuff = _oldUpdateHidden.bind(this); + var doOldStuff = doMyStuff.bind(this); - // Begin copy from original Palette source - // Every value in the selected list (whether enabled or not) is combined to form the value. - var values = $A(this.selected).map(function(o) - { + - return o.value; - }); - - this.hidden.value = values.toJSON(); - // End copy from original Palette source - - doMyStuff(); + doOldStuff(); + doNewStuff(); } function doMyStuff() --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
