Re: T5:how to support AJAX submit

2009-11-28 Thread Kalle Korhonen
Hey Inge, is there an issue already open to add these to T5 core?
Didn't see one.. if not, let's create one - I'll vote for these
anytime.

Kalle


On Mon, Nov 2, 2009 at 12:24 AM, Inge Solvoll  wrote:
> Forget about triggerLink, it does excactly what it says, it triggers a link.
> You call submitZoneForm from PeriodicalUpdater, and you're done. As I said,
> use zone updated event for callback if you need it.
>
> On Mon, Nov 2, 2009 at 2:35 AM, cleverpig  wrote:
>
>> hi! Thanks for your share!it's really help me!
>>
>> I got learn more tapestry native javascript!
>> in the js code:
>> submitZoneForm is a listen function. and triggerLink look like a
>> link's callback function.
>> hwo to use them together? please give me a exmaple!
>>
>> thank again!
>>
>> On Sun, Nov 1, 2009 at 12:58 AM, Inge Solvoll 
>> wrote:
>> > You can't use Ajax.PeriodicalUpdater, you need to submit the zone form
>> the
>> > tapestry way, doing the periodical stuff manually. See:
>> > http://api.prototypejs.org/language/periodicalexecuter.html
>> >
>> > I created a javascript function for manually submitting a zone form.
>> These 2
>> > things together should get you what you want. I actually implemented the
>> > same you are describing here just recently, so I've done it and it works.
>> >
>> > See my blog for the javascript you need.
>> >
>> > http://tinybits.blogspot.com/2009/10/missing-javascript.html
>> >
>> >
>> >
>> > On Fri, Oct 30, 2009 at 2:29 PM, cleverpig 
>> wrote:
>> >
>> >> thanks! it's really good solution!
>> >>
>> >> in another side:
>> >> if we do some background-process such as "autosave" when user input a
>> long
>> >> form.
>> >> we should use ajax.periodUpdater method to save data automaticly,but
>> >> this way only can use url as target without ability to submit form.
>> >> so where can we get the form submitted data?
>> >> in ajax way,it could be done with serialized form into json format,but
>> >> in the page event handle hwo to identify and process them?
>> >>
>> >> On Fri, Oct 30, 2009 at 4:43 PM, Ulrich Stärk  wrote:
>> >> > "Binding the zone parameter will cause the form submission to be
>> handled
>> >> as
>> >> > an Ajax request that updates the indicated zone. Often a Form will
>> update
>> >> > the same zone that contains it."
>> >> >
>> >> >
>> >>
>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html
>> >> >
>> >> > So just put a zone component around your form and point the form's
>> zone
>> >> > attribute to that zone.
>> >> >
>> >> > Uli
>> >> >
>> >> > Am 30.10.2009 05:55 schrieb cleverpig:
>> >> >>
>> >> >> Currently the Editor component does not support an asynchronous
>> submit
>> >> >> (AJAX).
>> >> >>
>> >> >> for example:
>> >> >> 1.build a form with submit button to save data to database.
>> >> >> 2.add a mixins which listening click event to this submit button with
>> >> >> ajax request & callback.
>> >> >> 3.when user click this submit button,the form will submit & return.
>> >> >> 4.so ajax request maybe be handled,but callback will lost,since the
>> form
>> >> >> submit.
>> >> >>
>> >> >> and how to use post way in ajax, so that tapestry event handler
>> counld
>> >> >> accept the ajax post?
>> >> >>
>> >> >> do you have idea on it?
>> >> >>
>> >> >>
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> cleverpig(Dan)
>> >> Location: Beijing
>> >> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> >> Zipcode: 100031
>> >> MSN: great_liu...@hotmail.com
>> >> QQ: 149291732
>> >> Skype: cleverpigatmatrix
>> >> Facebook ID:cleverpig
>> >> Blog: www.cleverpig.name
>> >> Tags: del.icio.us/cleverpig
>> >> Twitter: twitter.com/cleverpig
>> >> 新浪微博: t.sina.com.cn/cleverpig
>> >> Organization: www.beijing-open-party.org
>> >> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> >> For additional commands, e-mail: users-h...@tapestry.apache.org
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liu...@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>

Re: T5:how to support AJAX submit

2009-11-02 Thread Inge Solvoll
Forget about triggerLink, it does excactly what it says, it triggers a link.
You call submitZoneForm from PeriodicalUpdater, and you're done. As I said,
use zone updated event for callback if you need it.

On Mon, Nov 2, 2009 at 2:35 AM, cleverpig  wrote:

> hi! Thanks for your share!it's really help me!
>
> I got learn more tapestry native javascript!
> in the js code:
> submitZoneForm is a listen function. and triggerLink look like a
> link's callback function.
> hwo to use them together? please give me a exmaple!
>
> thank again!
>
> On Sun, Nov 1, 2009 at 12:58 AM, Inge Solvoll 
> wrote:
> > You can't use Ajax.PeriodicalUpdater, you need to submit the zone form
> the
> > tapestry way, doing the periodical stuff manually. See:
> > http://api.prototypejs.org/language/periodicalexecuter.html
> >
> > I created a javascript function for manually submitting a zone form.
> These 2
> > things together should get you what you want. I actually implemented the
> > same you are describing here just recently, so I've done it and it works.
> >
> > See my blog for the javascript you need.
> >
> > http://tinybits.blogspot.com/2009/10/missing-javascript.html
> >
> >
> >
> > On Fri, Oct 30, 2009 at 2:29 PM, cleverpig 
> wrote:
> >
> >> thanks! it's really good solution!
> >>
> >> in another side:
> >> if we do some background-process such as "autosave" when user input a
> long
> >> form.
> >> we should use ajax.periodUpdater method to save data automaticly,but
> >> this way only can use url as target without ability to submit form.
> >> so where can we get the form submitted data?
> >> in ajax way,it could be done with serialized form into json format,but
> >> in the page event handle hwo to identify and process them?
> >>
> >> On Fri, Oct 30, 2009 at 4:43 PM, Ulrich Stärk  wrote:
> >> > "Binding the zone parameter will cause the form submission to be
> handled
> >> as
> >> > an Ajax request that updates the indicated zone. Often a Form will
> update
> >> > the same zone that contains it."
> >> >
> >> >
> >>
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html
> >> >
> >> > So just put a zone component around your form and point the form's
> zone
> >> > attribute to that zone.
> >> >
> >> > Uli
> >> >
> >> > Am 30.10.2009 05:55 schrieb cleverpig:
> >> >>
> >> >> Currently the Editor component does not support an asynchronous
> submit
> >> >> (AJAX).
> >> >>
> >> >> for example:
> >> >> 1.build a form with submit button to save data to database.
> >> >> 2.add a mixins which listening click event to this submit button with
> >> >> ajax request & callback.
> >> >> 3.when user click this submit button,the form will submit & return.
> >> >> 4.so ajax request maybe be handled,but callback will lost,since the
> form
> >> >> submit.
> >> >>
> >> >> and how to use post way in ajax, so that tapestry event handler
> counld
> >> >> accept the ajax post?
> >> >>
> >> >> do you have idea on it?
> >> >>
> >> >>
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> cleverpig(Dan)
> >> Location: Beijing
> >> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> >> Zipcode: 100031
> >> MSN: great_liu...@hotmail.com
> >> QQ: 149291732
> >> Skype: cleverpigatmatrix
> >> Facebook ID:cleverpig
> >> Blog: www.cleverpig.name
> >> Tags: del.icio.us/cleverpig
> >> Twitter: twitter.com/cleverpig
> >> 新浪微博: t.sina.com.cn/cleverpig
> >> Organization: www.beijing-open-party.org
> >> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liu...@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5:how to support AJAX submit

2009-11-01 Thread cleverpig
hi! Thanks for your share!it's really help me!

I got learn more tapestry native javascript!
in the js code:
submitZoneForm is a listen function. and triggerLink look like a
link's callback function.
hwo to use them together? please give me a exmaple!

thank again!

On Sun, Nov 1, 2009 at 12:58 AM, Inge Solvoll  wrote:
> You can't use Ajax.PeriodicalUpdater, you need to submit the zone form the
> tapestry way, doing the periodical stuff manually. See:
> http://api.prototypejs.org/language/periodicalexecuter.html
>
> I created a javascript function for manually submitting a zone form. These 2
> things together should get you what you want. I actually implemented the
> same you are describing here just recently, so I've done it and it works.
>
> See my blog for the javascript you need.
>
> http://tinybits.blogspot.com/2009/10/missing-javascript.html
>
>
>
> On Fri, Oct 30, 2009 at 2:29 PM, cleverpig  wrote:
>
>> thanks! it's really good solution!
>>
>> in another side:
>> if we do some background-process such as "autosave" when user input a long
>> form.
>> we should use ajax.periodUpdater method to save data automaticly,but
>> this way only can use url as target without ability to submit form.
>> so where can we get the form submitted data?
>> in ajax way,it could be done with serialized form into json format,but
>> in the page event handle hwo to identify and process them?
>>
>> On Fri, Oct 30, 2009 at 4:43 PM, Ulrich Stärk  wrote:
>> > "Binding the zone parameter will cause the form submission to be handled
>> as
>> > an Ajax request that updates the indicated zone. Often a Form will update
>> > the same zone that contains it."
>> >
>> >
>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html
>> >
>> > So just put a zone component around your form and point the form's zone
>> > attribute to that zone.
>> >
>> > Uli
>> >
>> > Am 30.10.2009 05:55 schrieb cleverpig:
>> >>
>> >> Currently the Editor component does not support an asynchronous submit
>> >> (AJAX).
>> >>
>> >> for example:
>> >> 1.build a form with submit button to save data to database.
>> >> 2.add a mixins which listening click event to this submit button with
>> >> ajax request & callback.
>> >> 3.when user click this submit button,the form will submit & return.
>> >> 4.so ajax request maybe be handled,but callback will lost,since the form
>> >> submit.
>> >>
>> >> and how to use post way in ajax, so that tapestry event handler counld
>> >> accept the ajax post?
>> >>
>> >> do you have idea on it?
>> >>
>> >>
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> > For additional commands, e-mail: users-h...@tapestry.apache.org
>> >
>> >
>>
>>
>>
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liu...@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
or...@facebook: http://www.facebook.com/group.php?gid=8159558294

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5:how to support AJAX submit

2009-10-31 Thread Inge Solvoll
You can't use Ajax.PeriodicalUpdater, you need to submit the zone form the
tapestry way, doing the periodical stuff manually. See:
http://api.prototypejs.org/language/periodicalexecuter.html

I created a javascript function for manually submitting a zone form. These 2
things together should get you what you want. I actually implemented the
same you are describing here just recently, so I've done it and it works.

See my blog for the javascript you need.

http://tinybits.blogspot.com/2009/10/missing-javascript.html



On Fri, Oct 30, 2009 at 2:29 PM, cleverpig  wrote:

> thanks! it's really good solution!
>
> in another side:
> if we do some background-process such as "autosave" when user input a long
> form.
> we should use ajax.periodUpdater method to save data automaticly,but
> this way only can use url as target without ability to submit form.
> so where can we get the form submitted data?
> in ajax way,it could be done with serialized form into json format,but
> in the page event handle hwo to identify and process them?
>
> On Fri, Oct 30, 2009 at 4:43 PM, Ulrich Stärk  wrote:
> > "Binding the zone parameter will cause the form submission to be handled
> as
> > an Ajax request that updates the indicated zone. Often a Form will update
> > the same zone that contains it."
> >
> >
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html
> >
> > So just put a zone component around your form and point the form's zone
> > attribute to that zone.
> >
> > Uli
> >
> > Am 30.10.2009 05:55 schrieb cleverpig:
> >>
> >> Currently the Editor component does not support an asynchronous submit
> >> (AJAX).
> >>
> >> for example:
> >> 1.build a form with submit button to save data to database.
> >> 2.add a mixins which listening click event to this submit button with
> >> ajax request & callback.
> >> 3.when user click this submit button,the form will submit & return.
> >> 4.so ajax request maybe be handled,but callback will lost,since the form
> >> submit.
> >>
> >> and how to use post way in ajax, so that tapestry event handler counld
> >> accept the ajax post?
> >>
> >> do you have idea on it?
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liu...@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5:how to support AJAX submit

2009-10-30 Thread cleverpig
thanks! it's really good solution!

in another side:
if we do some background-process such as "autosave" when user input a long form.
we should use ajax.periodUpdater method to save data automaticly,but
this way only can use url as target without ability to submit form.
so where can we get the form submitted data?
in ajax way,it could be done with serialized form into json format,but
in the page event handle hwo to identify and process them?

On Fri, Oct 30, 2009 at 4:43 PM, Ulrich Stärk  wrote:
> "Binding the zone parameter will cause the form submission to be handled as
> an Ajax request that updates the indicated zone. Often a Form will update
> the same zone that contains it."
>
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html
>
> So just put a zone component around your form and point the form's zone
> attribute to that zone.
>
> Uli
>
> Am 30.10.2009 05:55 schrieb cleverpig:
>>
>> Currently the Editor component does not support an asynchronous submit
>> (AJAX).
>>
>> for example:
>> 1.build a form with submit button to save data to database.
>> 2.add a mixins which listening click event to this submit button with
>> ajax request & callback.
>> 3.when user click this submit button,the form will submit & return.
>> 4.so ajax request maybe be handled,but callback will lost,since the form
>> submit.
>>
>> and how to use post way in ajax, so that tapestry event handler counld
>> accept the ajax post?
>>
>> do you have idea on it?
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liu...@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
or...@facebook: http://www.facebook.com/group.php?gid=8159558294

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5:how to support AJAX submit

2009-10-30 Thread Inge Solvoll
Also, you can observe the Tapestry.ZONE_UPDATED_EVENT on the zone element
for your callback hook.

Like this: $('myZoneId').observe(Tapestry.ZONE_UPDATED_EVENT, myFunction);

See
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Zone.html

On Fri, Oct 30, 2009 at 9:43 AM, Ulrich Stärk  wrote:

> "Binding the zone parameter will cause the form submission to be handled as
> an Ajax request that updates the indicated zone. Often a Form will update
> the same zone that contains it."
>
>
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html
>
> So just put a zone component around your form and point the form's zone
> attribute to that zone.
>
> Uli
>
> Am 30.10.2009 05:55 schrieb cleverpig:
>
>  Currently the Editor component does not support an asynchronous submit
>> (AJAX).
>>
>> for example:
>> 1.build a form with submit button to save data to database.
>> 2.add a mixins which listening click event to this submit button with
>> ajax request & callback.
>> 3.when user click this submit button,the form will submit & return.
>> 4.so ajax request maybe be handled,but callback will lost,since the form
>> submit.
>>
>> and how to use post way in ajax, so that tapestry event handler counld
>> accept the ajax post?
>>
>> do you have idea on it?
>>
>>
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5:how to support AJAX submit

2009-10-30 Thread Ulrich Stärk
"Binding the zone parameter will cause the form submission to be handled as an Ajax request that 
updates the indicated zone. Often a Form will update the same zone that contains it."


http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html

So just put a zone component around your form and point the form's zone 
attribute to that zone.

Uli

Am 30.10.2009 05:55 schrieb cleverpig:

Currently the Editor component does not support an asynchronous submit (AJAX).

for example:
1.build a form with submit button to save data to database.
2.add a mixins which listening click event to this submit button with
ajax request & callback.
3.when user click this submit button,the form will submit & return.
4.so ajax request maybe be handled,but callback will lost,since the form submit.

and how to use post way in ajax, so that tapestry event handler counld
accept the ajax post?

do you have idea on it?




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org