hi all,
i am using the onEvent mixing but since 5.0.17 my code does not seem to work
any more.
though the event response should be "cost1|cost2" tapestry seems to ignore my
textstreamresponse and
firebug reports that the response is the value of the selectbox itself
(post: value 750, response: {"value":"750"} instead of cost1|cost2).
any ideas? thank you
i got a select box on my page:
==============================
<t:select t:id="selectQuantity" value="orderItem.quantity" model="graduatedQuantities"
t:mixins="t5components/OnEvent" event="change" onCompleteCallback="onQuantityChange"/>
with the according javascript function:
=======================================
<script type="text/javascript">
function onQuantityChange(response)
{
tokens = response.split("|")
$('costWithoutVat').value = tokens[0];
$('costWithVat').value = tokens[1];
}
</script>
in my code there is an event handler:
=====================================
@OnEvent(component = "selectQuantity", value = "change")
public Object onChangeFromSelectQuantity(int value) {
return quantityChange(value);
}
public StreamResponse quantityChange(int value)
{
getOrderItem().setQuantity(value);
StringBuilder sb = new StringBuilder();
sb.append(getCostWithoutVat());
sb.append("|");
sb.append(getCostWithVat());
return new TextStreamResponse("text/html", sb.toString());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]