You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Inge Solvoll <in...@gmail.com> on 2008/08/29 09:28:35 UTC

T5: Remove "value" parameter on Select component

Hi!

I'm creating a mixin that hooks on to the onchange event of a Select and
AJAX-submits the value. Other types of Select-boxes that has an onchange
event without having an interesting value to submit is a common pattern in
my application. For example a select that opens a popup window.

I've seen a couple of relevant Mixin-examples on the Wiki, in the
Autocomplete mixin, and other places and they all use the same approach
where a GET-parameter is added to the Ajax.Request and read as
request.getParameter() in the Mixin class. Obviously there is no need for
the value-binding of the Select here because this value is never set and
never read.

Right now I'm using a "Hijax" approach, where there's a chance the user
won't be getting the AJAX-functionality, but rather the original onchange
event that refreshes the page. In that case I will need to bind a page
property to the value parameter. But if there's no alternative to AJAX that
makes sense, I still have to put a dummy property in my form to bind to the
value parameter of the Select.

Is there any way to avoid that without writing my own copy of the select
component?

Regards

Inge