Re: t5 form submit not fired

2007-10-19 Thread Britske
ink() >> >>>>>>>>{ >> >>>>>>>>System.out.println("catched!!"); >> >>>>>>>>return "catched!"; >> >>>>>>>>} >> >>>>>>>> >> >>>>>>>> Do you 've got any idea what causes this behavior? >> >>>>>>>> >> >>>>>>>> Thanks, >> >>>>>>>> Geert-Jan >>

Re: t5 form submit not fired

2007-10-19 Thread Josh Canfield
;>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>>> I would suggest that you use AJAX instead of doing the form > >>>>>>>>> submit. > >>>>>>>>>

Re: t5 form submit not fired

2007-10-18 Thread Britske
;> did >>>>>>>>> this >>>>>>>>> successfully for some simple events also. >>>>>>>>

Re: t5 form submit not fired

2007-10-18 Thread Britske
;>>>> Shortly, here's how i did it: >>>>>>>>>> >>>>>>>>>> In my page i have these two javascript functions: >>>>>>>>>> >>>&

Re: t5 form submit not fired

2007-10-18 Thread Nick Westgate
Hugo defined myAction as returning a StreamResponse -> no redirect. Geert-Jan says myAction returns void -> a redirect occurs. Cheers, Nick. Hugo Palma wrote: If your getting a page redirect then your doing something wrong in your code. If you post it i can try and find the problem. Britske

Re: t5 form submit not fired

2007-10-18 Thread Hugo Palma
If your getting a page redirect then your doing something wrong in your code. If you post it i can try and find the problem. Britske wrote: after the onchange occurs, this is what happens in my app: 1. onMyAction is executed() (this is an actionlink which returns nothing (void) which results

Re: t5 form submit not fired

2007-10-18 Thread Britske
ant with the server response >>>>>>> } >>>>>>> // --> >>>>>>> >>>>>>> function sendRequest() { >>>>>>> new Ajax.Request('${theLink}', {asynchronous:true, >>>>>>> onSuccess:handleResponse}); >>>>>>> } >>>>>>> >>>>>>> On the page class i have: >>>>>>> >>&g

Re: t5 form submit not fired

2007-10-18 Thread Hugo Palma
Why do you say a redirect happens ? Does your page refresh when you change the selectbox value ? It won't refresh because all your doing is call a javascript function. There's no redirect. Britske wrote: since your example effectively calls a ActionLink through AJAX, a redirect DOES happen. It

Re: t5 form submit not fired

2007-10-18 Thread Britske
sponse onMyAction() { >>>>> Collection castas = >>>>> _regiaoDao.getRegiao(regiao).getCastas(); >>>>> >>>>> JSONObject jsonObject = new JSONObject(); >>>>> // Add whatever info you want to send to the client >

Re: t5 form submit not fired

2007-10-18 Thread Britske
you want with the server response >>>>>>> } >>>>>>> // --> >>>>>>> >>>>>>> function sendRequest() { >>>>>>> new Ajax.Request('${theLink}', {asynchronous:true, >>>>>>> onSuccess:handleResponse}); >>>>>>> } >>>>>>> >>>>>>> On the page class i have: >>>>>>> >>>>>

Re: t5 form submit not fired

2007-10-18 Thread Hugo Palma
The example i provided fires the call to the server whenever the javascript function is called. So, if you call the function from an onchange event on a select the method will be called every time you change the selectbox. Britske wrote: Yeah i see/know, but for the discussion say that

Re: t5 form submit not fired

2007-10-18 Thread Britske
Collection castas = >>>>> _regiaoDao.getRegiao(regiao).getCastas(); >>>>> >>>>> JSONObject jsonObject = new JSONObject(); >>>>> // Add whatever info you want to send to the client >>>>> >>>>> return new TextStreamResponse("text/xml", >>>>> jsonObject.toString());

Re: t5 form submit not fired

2007-10-18 Thread Hugo Palma
The method i suggested is implemented so that you don't have to submit the form. That's what AJAX is all about, you make a request to the server and then update a portion of your page based on the response from the server using javascript. There's no page reload of for submission. Britske wrot

Re: t5 form submit not fired

2007-10-18 Thread Britske
>>> sendRequest function from whatever javascript event you want to catch. >>> Hope this helps. >>> >>> Britske wrote: >>> >>>> I have a use-case in which i need to catch a onchange of of >>>> select-component >>>> on the

Re: t5 form submit not fired

2007-10-18 Thread Hugo Palma
That's the way it's supposed to be. You only see the getTheLink method executed once because that what it need to replace ${theLink} in your template with the correct link that is returned from your method. This is done once when the page renders. If you look at the rendered page source you won

Re: t5 form submit not fired

2007-10-18 Thread Britske
ing snippet doesn't give a server side >> onsubmit()-event: >> >> >> >> > onchange="this.form.submit();"/> >> >> >> >> >> However, the following does: >> >> >> >> > onchange=&q

Re: t5 form submit not fired

2007-10-18 Thread Hugo Palma
I would suggest that you use AJAX instead of doing the form submit. Although the AJAX integration in T5 is still not implemented it's very easy to do using the provided prototype and json javascripts. I did this successfully for some simple events also. Shortly, here's how i did it: In my page

t5 form submit not fired

2007-10-18 Thread Britske
s isn't expected behavior since both examples do work with plain html form elements. anyone? Geert-Jan -- View this message in context: http://www.nabble.com/t5-form-submit-not-fired-tf4645307.html#a13269213 Sent from the Tapestry - User mail