You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Norman Franke <no...@myasd.com> on 2008/10/24 18:10:30 UTC
T4.1 AJAX Indicators
I've searched the documentation, and I can't find how one implements a
"loading..." indicator when an AJAX request is sent off. My app will
be doing a series of database queries which can take 10 seconds or so,
and it really needs something to tell the user they need to wait a
bit. Showing/Hiding a div would be great.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Norman Franke <no...@myasd.com>.
Yep, that's the default (but I tried it anyway.) It appears to be
working, since causing a javascript error does abort properly. Odd
that it works properly for non-ajax requests, too.
Perhaps I'll try a simple case and see if that works.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Oct 29, 2008, at 2:45 PM, Marcus Schulte wrote:
> did you try dojo.event.connect("before", dojo.byId .... ?
>
> 2008/10/27 Norman Franke <no...@myasd.com>
>
>> I've now upgraded to T4.1.6 and the problem remains on Firefox, IE
>> and
>> Safari. Here is how I coded it:
>>
>> dojo.event.connect(dojo.byId('delete'), 'onclick',
>> function (evt) {
>> if (!confirm('Are you sure?')) {
>> dojo.event.browser.stopEvent(evt);
>> return false;
>> }
>> return true;
>> }
>> )
>>
>> No matter what I do, it continues and submits the AJAX action. My
>> "delete"
>> control is a Tapestry Submit with async=true and an action
>> specified. I
>> print out stuff from the action, and it is definitely being called.
>> The AJAX
>> operation happens after I click cancel or OK, so it doesn't appear to
>> trigger first. And calling a non-function that causes JavaScript to
>> get an
>> error, does stop. If I make the button async=false, then the
>> onclick works
>> just fine.
>>
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>>
>> On Oct 24, 2008, at 5:30 PM, Norman Franke wrote:
>>
>> I did that exact same thing and it did submit. Very strange! I'm
>> using
>>> Firefox 3.0 and T4.1.5. Where did you put the connect? I tried at
>>> the end of
>>> the body and outsize the body, before the </html>
>>>
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>>
>>> On Oct 24, 2008, at 5:00 PM, Andreas Andreou wrote:
>>>
>>> just tried something like
>>>> dojo.event.connect(dojo.byId('fepSubm'),'onclick',
>>>> function(e){dojo.event.browser.stopEvent(e);});
>>>> and it prevented the submit
>>>>
>>>> On Fri, Oct 24, 2008 at 11:29 PM, Norman Franke <no...@myasd.com>
>>>> wrote:
>>>>
>>>>> According to the documentation, before is the default. Either
>>>>> way, it
>>>>> still
>>>>> doesn't work. The ajax submit is still called. If I call a non-
>>>>> function,
>>>>> then it doesn't work, e.g. "foobar()". It generates an error in
>>>>> the
>>>>> console,
>>>>> but does stop.
>>>>>
>>>>> Norman Franke
>>>>> Answering Service for Directors, Inc.
>>>>> www.myasd.com
>>>>>
>>>>> On Oct 24, 2008, at 4:10 PM, Andreas Andreou wrote:
>>>>>
>>>>> sorry - dojo.event.connectBefore is what you need :)
>>>>>>
>>>>>> On Fri, Oct 24, 2008 at 11:00 PM, Norman Franke
>>>>>> <no...@myasd.com>
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>> I'm using T4.1.5 which has dojo 0.4.x and no dojo.
>>>>>>> event.stopEvent. I
>>>>>>> tried
>>>>>>> dojo.event.browser.stopEvent but that didn't work. Nor did
>>>>>>> e.stopPropigation
>>>>>>> or e.preventDefault. In fact, I tried all three together (and
>>>>>>> separate)
>>>>>>> and
>>>>>>> it still fires.
>>>>>>>
>>>>>>> Norman Franke
>>>>>>> Answering Service for Directors, Inc.
>>>>>>> www.myasd.com
>>>>>>>
>>>>>>> On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
>>>>>>>
>>>>>>> dojo.event.connect to it and in there do dojo.event.stopEvent
>>>>>>> (or
>>>>>>>> something like that) if you
>>>>>>>> dont want to go on with the submit
>>>>>>>>
>>>>>>>> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <norman@myasd.com
>>>>>>>> >
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks. I apparently forgot to look at contrib.
>>>>>>>>>
>>>>>>>>> As for the second question, I'd love to, but how can I
>>>>>>>>> update the
>>>>>>>>> formhidden
>>>>>>>>> section of the form such that my controls (that were created
>>>>>>>>> via
>>>>>>>>> AJAX)
>>>>>>>>> will
>>>>>>>>> be sent on the next AJAX action? If I don't update the
>>>>>>>>> entire form,
>>>>>>>>> I
>>>>>>>>> never
>>>>>>>>> get the values of the controls, it seems. Changing it from
>>>>>>>>> @Persist("client") to @Persist("session") seems to have
>>>>>>>>> solved it,
>>>>>>>>> however.
>>>>>>>>>
>>>>>>>>> Lastly, how can I get an ajax submit to abort? I want to
>>>>>>>>> have an
>>>>>>>>> onclick
>>>>>>>>> on
>>>>>>>>> a the submit that will put up "confirm('Are you sure?')" but
>>>>>>>>> no
>>>>>>>>> matter
>>>>>>>>> what,
>>>>>>>>> it submits anyway.
>>>>>>>>>
>>>>>>>>> Norman Franke
>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>> www.myasd.com
>>>>>>>>>
>>>>>>>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>>>>>>>
>>>>>>>>> To answer your initial question, just use contrib:ajaxStatus
>>>>>>>>> from
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>>>>>>>
>>>>>>>>>> For the second, why not update only the part in question?
>>>>>>>>>>
>>>>>>>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <norman@myasd.com
>>>>>>>>>> >
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I sort of have it working by doing an "onclick" and
>>>>>>>>>>> relying on the
>>>>>>>>>>> entire
>>>>>>>>>>> form to update, which resets my div.
>>>>>>>>>>>
>>>>>>>>>>> But that brings up another point. I want to AJAX fetch a
>>>>>>>>>>> list of
>>>>>>>>>>> elements
>>>>>>>>>>> with a checkbox. Is there a better way to do this than by
>>>>>>>>>>> setting
>>>>>>>>>>> the
>>>>>>>>>>> entire
>>>>>>>>>>> form as one of the updateComponents? It pretty much forces
>>>>>>>>>>> an
>>>>>>>>>>> update
>>>>>>>>>>> of
>>>>>>>>>>> the
>>>>>>>>>>> entire page. If I don't, I can't get the values of the
>>>>>>>>>>> checkbox
>>>>>>>>>>> since
>>>>>>>>>>> tapestry serializes the state of the @For and checkboxes in
>>>>>>>>>>> fields.
>>>>>>>>>>>
>>>>>>>>>>> What's the best way to handle this?
>>>>>>>>>>>
>>>>>>>>>>> Norman Franke
>>>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>>>> www.myasd.com
>>>>>>>>>>>
>>>>>>>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>>>>>>>
>>>>>>>>>>> I've searched the documentation, and I can't find how one
>>>>>>>>>>>> implements
>>>>>>>>>>>> a
>>>>>>>>>>>> "loading..." indicator when an AJAX request is sent off.
>>>>>>>>>>>> My app
>>>>>>>>>>>> will
>>>>>>>>>>>> be
>>>>>>>>>>>> doing a series of database queries which can take 10
>>>>>>>>>>>> seconds or
>>>>>>>>>>>> so,
>>>>>>>>>>>> and
>>>>>>>>>>>> it
>>>>>>>>>>>> really needs something to tell the user they need to wait
>>>>>>>>>>>> a bit.
>>>>>>>>>>>> Showing/Hiding a div would be great.
>>>>>>>>>>>>
>>>>>>>>>>>> Norman Franke
>>>>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>>>>> www.myasd.com
>>>>>>>>>>>>
>>>>>>>>>>>>
>
>
> --
> Marcus Schulte
> http://marcus-schulte.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Marcus Schulte <et...@googlemail.com>.
did you try dojo.event.connect("before", dojo.byId .... ?
2008/10/27 Norman Franke <no...@myasd.com>
> I've now upgraded to T4.1.6 and the problem remains on Firefox, IE and
> Safari. Here is how I coded it:
>
> dojo.event.connect(dojo.byId('delete'), 'onclick',
> function (evt) {
> if (!confirm('Are you sure?')) {
> dojo.event.browser.stopEvent(evt);
> return false;
> }
> return true;
> }
> )
>
> No matter what I do, it continues and submits the AJAX action. My "delete"
> control is a Tapestry Submit with async=true and an action specified. I
> print out stuff from the action, and it is definitely being called. The AJAX
> operation happens after I click cancel or OK, so it doesn't appear to
> trigger first. And calling a non-function that causes JavaScript to get an
> error, does stop. If I make the button async=false, then the onclick works
> just fine.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
> On Oct 24, 2008, at 5:30 PM, Norman Franke wrote:
>
> I did that exact same thing and it did submit. Very strange! I'm using
>> Firefox 3.0 and T4.1.5. Where did you put the connect? I tried at the end of
>> the body and outsize the body, before the </html>
>>
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>>
>> On Oct 24, 2008, at 5:00 PM, Andreas Andreou wrote:
>>
>> just tried something like
>>> dojo.event.connect(dojo.byId('fepSubm'),'onclick',
>>> function(e){dojo.event.browser.stopEvent(e);});
>>> and it prevented the submit
>>>
>>> On Fri, Oct 24, 2008 at 11:29 PM, Norman Franke <no...@myasd.com>
>>> wrote:
>>>
>>>> According to the documentation, before is the default. Either way, it
>>>> still
>>>> doesn't work. The ajax submit is still called. If I call a non-function,
>>>> then it doesn't work, e.g. "foobar()". It generates an error in the
>>>> console,
>>>> but does stop.
>>>>
>>>> Norman Franke
>>>> Answering Service for Directors, Inc.
>>>> www.myasd.com
>>>>
>>>> On Oct 24, 2008, at 4:10 PM, Andreas Andreou wrote:
>>>>
>>>> sorry - dojo.event.connectBefore is what you need :)
>>>>>
>>>>> On Fri, Oct 24, 2008 at 11:00 PM, Norman Franke <no...@myasd.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> I'm using T4.1.5 which has dojo 0.4.x and no dojo. event.stopEvent. I
>>>>>> tried
>>>>>> dojo.event.browser.stopEvent but that didn't work. Nor did
>>>>>> e.stopPropigation
>>>>>> or e.preventDefault. In fact, I tried all three together (and
>>>>>> separate)
>>>>>> and
>>>>>> it still fires.
>>>>>>
>>>>>> Norman Franke
>>>>>> Answering Service for Directors, Inc.
>>>>>> www.myasd.com
>>>>>>
>>>>>> On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
>>>>>>
>>>>>> dojo.event.connect to it and in there do dojo.event.stopEvent (or
>>>>>>> something like that) if you
>>>>>>> dont want to go on with the submit
>>>>>>>
>>>>>>> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Thanks. I apparently forgot to look at contrib.
>>>>>>>>
>>>>>>>> As for the second question, I'd love to, but how can I update the
>>>>>>>> formhidden
>>>>>>>> section of the form such that my controls (that were created via
>>>>>>>> AJAX)
>>>>>>>> will
>>>>>>>> be sent on the next AJAX action? If I don't update the entire form,
>>>>>>>> I
>>>>>>>> never
>>>>>>>> get the values of the controls, it seems. Changing it from
>>>>>>>> @Persist("client") to @Persist("session") seems to have solved it,
>>>>>>>> however.
>>>>>>>>
>>>>>>>> Lastly, how can I get an ajax submit to abort? I want to have an
>>>>>>>> onclick
>>>>>>>> on
>>>>>>>> a the submit that will put up "confirm('Are you sure?')" but no
>>>>>>>> matter
>>>>>>>> what,
>>>>>>>> it submits anyway.
>>>>>>>>
>>>>>>>> Norman Franke
>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>> www.myasd.com
>>>>>>>>
>>>>>>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>>>>>>
>>>>>>>> To answer your initial question, just use contrib:ajaxStatus from
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>>>>>>
>>>>>>>>> For the second, why not update only the part in question?
>>>>>>>>>
>>>>>>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I sort of have it working by doing an "onclick" and relying on the
>>>>>>>>>> entire
>>>>>>>>>> form to update, which resets my div.
>>>>>>>>>>
>>>>>>>>>> But that brings up another point. I want to AJAX fetch a list of
>>>>>>>>>> elements
>>>>>>>>>> with a checkbox. Is there a better way to do this than by setting
>>>>>>>>>> the
>>>>>>>>>> entire
>>>>>>>>>> form as one of the updateComponents? It pretty much forces an
>>>>>>>>>> update
>>>>>>>>>> of
>>>>>>>>>> the
>>>>>>>>>> entire page. If I don't, I can't get the values of the checkbox
>>>>>>>>>> since
>>>>>>>>>> tapestry serializes the state of the @For and checkboxes in
>>>>>>>>>> fields.
>>>>>>>>>>
>>>>>>>>>> What's the best way to handle this?
>>>>>>>>>>
>>>>>>>>>> Norman Franke
>>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>>> www.myasd.com
>>>>>>>>>>
>>>>>>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>>>>>>
>>>>>>>>>> I've searched the documentation, and I can't find how one
>>>>>>>>>>> implements
>>>>>>>>>>> a
>>>>>>>>>>> "loading..." indicator when an AJAX request is sent off. My app
>>>>>>>>>>> will
>>>>>>>>>>> be
>>>>>>>>>>> doing a series of database queries which can take 10 seconds or
>>>>>>>>>>> so,
>>>>>>>>>>> and
>>>>>>>>>>> it
>>>>>>>>>>> really needs something to tell the user they need to wait a bit.
>>>>>>>>>>> Showing/Hiding a div would be great.
>>>>>>>>>>>
>>>>>>>>>>> Norman Franke
>>>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>>>> www.myasd.com
>>>>>>>>>>>
>>>>>>>>>>>
--
Marcus Schulte
http://marcus-schulte.blogspot.com
Re: T4.1 AJAX Indicators
Posted by Norman Franke <no...@myasd.com>.
I've now upgraded to T4.1.6 and the problem remains on Firefox, IE and
Safari. Here is how I coded it:
dojo.event.connect(dojo.byId('delete'), 'onclick',
function (evt) {
if (!confirm('Are you sure?')) {
dojo.event.browser.stopEvent(evt);
return false;
}
return true;
}
)
No matter what I do, it continues and submits the AJAX action. My
"delete" control is a Tapestry Submit with async=true and an action
specified. I print out stuff from the action, and it is definitely
being called. The AJAX operation happens after I click cancel or OK,
so it doesn't appear to trigger first. And calling a non-function that
causes JavaScript to get an error, does stop. If I make the button
async=false, then the onclick works just fine.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Oct 24, 2008, at 5:30 PM, Norman Franke wrote:
> I did that exact same thing and it did submit. Very strange! I'm
> using Firefox 3.0 and T4.1.5. Where did you put the connect? I tried
> at the end of the body and outsize the body, before the </html>
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
> On Oct 24, 2008, at 5:00 PM, Andreas Andreou wrote:
>
>> just tried something like
>> dojo.event.connect(dojo.byId('fepSubm'),'onclick',
>> function(e){dojo.event.browser.stopEvent(e);});
>> and it prevented the submit
>>
>> On Fri, Oct 24, 2008 at 11:29 PM, Norman Franke <no...@myasd.com>
>> wrote:
>>> According to the documentation, before is the default. Either way,
>>> it still
>>> doesn't work. The ajax submit is still called. If I call a non-
>>> function,
>>> then it doesn't work, e.g. "foobar()". It generates an error in
>>> the console,
>>> but does stop.
>>>
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>>
>>> On Oct 24, 2008, at 4:10 PM, Andreas Andreou wrote:
>>>
>>>> sorry - dojo.event.connectBefore is what you need :)
>>>>
>>>> On Fri, Oct 24, 2008 at 11:00 PM, Norman Franke
>>>> <no...@myasd.com> wrote:
>>>>>
>>>>> I'm using T4.1.5 which has dojo 0.4.x and no dojo.
>>>>> event.stopEvent. I
>>>>> tried
>>>>> dojo.event.browser.stopEvent but that didn't work. Nor did
>>>>> e.stopPropigation
>>>>> or e.preventDefault. In fact, I tried all three together (and
>>>>> separate)
>>>>> and
>>>>> it still fires.
>>>>>
>>>>> Norman Franke
>>>>> Answering Service for Directors, Inc.
>>>>> www.myasd.com
>>>>>
>>>>> On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
>>>>>
>>>>>> dojo.event.connect to it and in there do dojo.event.stopEvent (or
>>>>>> something like that) if you
>>>>>> dont want to go on with the submit
>>>>>>
>>>>>> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke
>>>>>> <no...@myasd.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Thanks. I apparently forgot to look at contrib.
>>>>>>>
>>>>>>> As for the second question, I'd love to, but how can I update
>>>>>>> the
>>>>>>> formhidden
>>>>>>> section of the form such that my controls (that were created
>>>>>>> via AJAX)
>>>>>>> will
>>>>>>> be sent on the next AJAX action? If I don't update the entire
>>>>>>> form, I
>>>>>>> never
>>>>>>> get the values of the controls, it seems. Changing it from
>>>>>>> @Persist("client") to @Persist("session") seems to have solved
>>>>>>> it,
>>>>>>> however.
>>>>>>>
>>>>>>> Lastly, how can I get an ajax submit to abort? I want to have an
>>>>>>> onclick
>>>>>>> on
>>>>>>> a the submit that will put up "confirm('Are you sure?')" but
>>>>>>> no matter
>>>>>>> what,
>>>>>>> it submits anyway.
>>>>>>>
>>>>>>> Norman Franke
>>>>>>> Answering Service for Directors, Inc.
>>>>>>> www.myasd.com
>>>>>>>
>>>>>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>>>>>
>>>>>>>> To answer your initial question, just use contrib:ajaxStatus
>>>>>>>> from
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>>>>>
>>>>>>>> For the second, why not update only the part in question?
>>>>>>>>
>>>>>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <norman@myasd.com
>>>>>>>> >
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> I sort of have it working by doing an "onclick" and relying
>>>>>>>>> on the
>>>>>>>>> entire
>>>>>>>>> form to update, which resets my div.
>>>>>>>>>
>>>>>>>>> But that brings up another point. I want to AJAX fetch a
>>>>>>>>> list of
>>>>>>>>> elements
>>>>>>>>> with a checkbox. Is there a better way to do this than by
>>>>>>>>> setting the
>>>>>>>>> entire
>>>>>>>>> form as one of the updateComponents? It pretty much forces
>>>>>>>>> an update
>>>>>>>>> of
>>>>>>>>> the
>>>>>>>>> entire page. If I don't, I can't get the values of the
>>>>>>>>> checkbox since
>>>>>>>>> tapestry serializes the state of the @For and checkboxes in
>>>>>>>>> fields.
>>>>>>>>>
>>>>>>>>> What's the best way to handle this?
>>>>>>>>>
>>>>>>>>> Norman Franke
>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>> www.myasd.com
>>>>>>>>>
>>>>>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>>>>>
>>>>>>>>>> I've searched the documentation, and I can't find how one
>>>>>>>>>> implements
>>>>>>>>>> a
>>>>>>>>>> "loading..." indicator when an AJAX request is sent off. My
>>>>>>>>>> app will
>>>>>>>>>> be
>>>>>>>>>> doing a series of database queries which can take 10
>>>>>>>>>> seconds or so,
>>>>>>>>>> and
>>>>>>>>>> it
>>>>>>>>>> really needs something to tell the user they need to wait a
>>>>>>>>>> bit.
>>>>>>>>>> Showing/Hiding a div would be great.
>>>>>>>>>>
>>>>>>>>>> Norman Franke
>>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>>> www.myasd.com
>>>>>>>>>>
Re: T4.1 AJAX Indicators
Posted by Norman Franke <no...@myasd.com>.
I did that exact same thing and it did submit. Very strange! I'm using
Firefox 3.0 and T4.1.5. Where did you put the connect? I tried at the
end of the body and outsize the body, before the </html>
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Oct 24, 2008, at 5:00 PM, Andreas Andreou wrote:
> just tried something like
> dojo.event.connect(dojo.byId('fepSubm'),'onclick',
> function(e){dojo.event.browser.stopEvent(e);});
> and it prevented the submit
>
> On Fri, Oct 24, 2008 at 11:29 PM, Norman Franke <no...@myasd.com>
> wrote:
>> According to the documentation, before is the default. Either way,
>> it still
>> doesn't work. The ajax submit is still called. If I call a non-
>> function,
>> then it doesn't work, e.g. "foobar()". It generates an error in the
>> console,
>> but does stop.
>>
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>>
>> On Oct 24, 2008, at 4:10 PM, Andreas Andreou wrote:
>>
>>> sorry - dojo.event.connectBefore is what you need :)
>>>
>>> On Fri, Oct 24, 2008 at 11:00 PM, Norman Franke <no...@myasd.com>
>>> wrote:
>>>>
>>>> I'm using T4.1.5 which has dojo 0.4.x and no dojo.
>>>> event.stopEvent. I
>>>> tried
>>>> dojo.event.browser.stopEvent but that didn't work. Nor did
>>>> e.stopPropigation
>>>> or e.preventDefault. In fact, I tried all three together (and
>>>> separate)
>>>> and
>>>> it still fires.
>>>>
>>>> Norman Franke
>>>> Answering Service for Directors, Inc.
>>>> www.myasd.com
>>>>
>>>> On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
>>>>
>>>>> dojo.event.connect to it and in there do dojo.event.stopEvent (or
>>>>> something like that) if you
>>>>> dont want to go on with the submit
>>>>>
>>>>> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com>
>>>>> wrote:
>>>>>>
>>>>>> Thanks. I apparently forgot to look at contrib.
>>>>>>
>>>>>> As for the second question, I'd love to, but how can I update the
>>>>>> formhidden
>>>>>> section of the form such that my controls (that were created
>>>>>> via AJAX)
>>>>>> will
>>>>>> be sent on the next AJAX action? If I don't update the entire
>>>>>> form, I
>>>>>> never
>>>>>> get the values of the controls, it seems. Changing it from
>>>>>> @Persist("client") to @Persist("session") seems to have solved
>>>>>> it,
>>>>>> however.
>>>>>>
>>>>>> Lastly, how can I get an ajax submit to abort? I want to have an
>>>>>> onclick
>>>>>> on
>>>>>> a the submit that will put up "confirm('Are you sure?')" but no
>>>>>> matter
>>>>>> what,
>>>>>> it submits anyway.
>>>>>>
>>>>>> Norman Franke
>>>>>> Answering Service for Directors, Inc.
>>>>>> www.myasd.com
>>>>>>
>>>>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>>>>
>>>>>>> To answer your initial question, just use contrib:ajaxStatus
>>>>>>> from
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>>>>
>>>>>>> For the second, why not update only the part in question?
>>>>>>>
>>>>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke
>>>>>>> <no...@myasd.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I sort of have it working by doing an "onclick" and relying
>>>>>>>> on the
>>>>>>>> entire
>>>>>>>> form to update, which resets my div.
>>>>>>>>
>>>>>>>> But that brings up another point. I want to AJAX fetch a list
>>>>>>>> of
>>>>>>>> elements
>>>>>>>> with a checkbox. Is there a better way to do this than by
>>>>>>>> setting the
>>>>>>>> entire
>>>>>>>> form as one of the updateComponents? It pretty much forces an
>>>>>>>> update
>>>>>>>> of
>>>>>>>> the
>>>>>>>> entire page. If I don't, I can't get the values of the
>>>>>>>> checkbox since
>>>>>>>> tapestry serializes the state of the @For and checkboxes in
>>>>>>>> fields.
>>>>>>>>
>>>>>>>> What's the best way to handle this?
>>>>>>>>
>>>>>>>> Norman Franke
>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>> www.myasd.com
>>>>>>>>
>>>>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>>>>
>>>>>>>>> I've searched the documentation, and I can't find how one
>>>>>>>>> implements
>>>>>>>>> a
>>>>>>>>> "loading..." indicator when an AJAX request is sent off. My
>>>>>>>>> app will
>>>>>>>>> be
>>>>>>>>> doing a series of database queries which can take 10 seconds
>>>>>>>>> or so,
>>>>>>>>> and
>>>>>>>>> it
>>>>>>>>> really needs something to tell the user they need to wait a
>>>>>>>>> bit.
>>>>>>>>> Showing/Hiding a div would be great.
>>>>>>>>>
>>>>>>>>> Norman Franke
>>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>>> www.myasd.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>> For additional commands, e-mail: users-
>>>>>>>>> help@tapestry.apache.org
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>>>>> Tapestry / Tacos developer
>>>>>>> Open Source / JEE Consulting
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>>> Tapestry / Tacos developer
>>>>> Open Source / JEE Consulting
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>> Tapestry / Tacos developer
>>> Open Source / JEE Consulting
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Andreas Andreou <an...@gmail.com>.
just tried something like
dojo.event.connect(dojo.byId('fepSubm'),'onclick',
function(e){dojo.event.browser.stopEvent(e);});
and it prevented the submit
On Fri, Oct 24, 2008 at 11:29 PM, Norman Franke <no...@myasd.com> wrote:
> According to the documentation, before is the default. Either way, it still
> doesn't work. The ajax submit is still called. If I call a non-function,
> then it doesn't work, e.g. "foobar()". It generates an error in the console,
> but does stop.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
> On Oct 24, 2008, at 4:10 PM, Andreas Andreou wrote:
>
>> sorry - dojo.event.connectBefore is what you need :)
>>
>> On Fri, Oct 24, 2008 at 11:00 PM, Norman Franke <no...@myasd.com> wrote:
>>>
>>> I'm using T4.1.5 which has dojo 0.4.x and no dojo. event.stopEvent. I
>>> tried
>>> dojo.event.browser.stopEvent but that didn't work. Nor did
>>> e.stopPropigation
>>> or e.preventDefault. In fact, I tried all three together (and separate)
>>> and
>>> it still fires.
>>>
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>>
>>> On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
>>>
>>>> dojo.event.connect to it and in there do dojo.event.stopEvent (or
>>>> something like that) if you
>>>> dont want to go on with the submit
>>>>
>>>> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com>
>>>> wrote:
>>>>>
>>>>> Thanks. I apparently forgot to look at contrib.
>>>>>
>>>>> As for the second question, I'd love to, but how can I update the
>>>>> formhidden
>>>>> section of the form such that my controls (that were created via AJAX)
>>>>> will
>>>>> be sent on the next AJAX action? If I don't update the entire form, I
>>>>> never
>>>>> get the values of the controls, it seems. Changing it from
>>>>> @Persist("client") to @Persist("session") seems to have solved it,
>>>>> however.
>>>>>
>>>>> Lastly, how can I get an ajax submit to abort? I want to have an
>>>>> onclick
>>>>> on
>>>>> a the submit that will put up "confirm('Are you sure?')" but no matter
>>>>> what,
>>>>> it submits anyway.
>>>>>
>>>>> Norman Franke
>>>>> Answering Service for Directors, Inc.
>>>>> www.myasd.com
>>>>>
>>>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>>>
>>>>>> To answer your initial question, just use contrib:ajaxStatus from
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>>>
>>>>>> For the second, why not update only the part in question?
>>>>>>
>>>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I sort of have it working by doing an "onclick" and relying on the
>>>>>>> entire
>>>>>>> form to update, which resets my div.
>>>>>>>
>>>>>>> But that brings up another point. I want to AJAX fetch a list of
>>>>>>> elements
>>>>>>> with a checkbox. Is there a better way to do this than by setting the
>>>>>>> entire
>>>>>>> form as one of the updateComponents? It pretty much forces an update
>>>>>>> of
>>>>>>> the
>>>>>>> entire page. If I don't, I can't get the values of the checkbox since
>>>>>>> tapestry serializes the state of the @For and checkboxes in fields.
>>>>>>>
>>>>>>> What's the best way to handle this?
>>>>>>>
>>>>>>> Norman Franke
>>>>>>> Answering Service for Directors, Inc.
>>>>>>> www.myasd.com
>>>>>>>
>>>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>>>
>>>>>>>> I've searched the documentation, and I can't find how one implements
>>>>>>>> a
>>>>>>>> "loading..." indicator when an AJAX request is sent off. My app will
>>>>>>>> be
>>>>>>>> doing a series of database queries which can take 10 seconds or so,
>>>>>>>> and
>>>>>>>> it
>>>>>>>> really needs something to tell the user they need to wait a bit.
>>>>>>>> Showing/Hiding a div would be great.
>>>>>>>>
>>>>>>>> Norman Franke
>>>>>>>> Answering Service for Directors, Inc.
>>>>>>>> www.myasd.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>>>> Tapestry / Tacos developer
>>>>>> Open Source / JEE Consulting
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>> Tapestry / Tacos developer
>>>> Open Source / JEE Consulting
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Tapestry / Tacos developer
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Norman Franke <no...@myasd.com>.
According to the documentation, before is the default. Either way, it
still doesn't work. The ajax submit is still called. If I call a non-
function, then it doesn't work, e.g. "foobar()". It generates an error
in the console, but does stop.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Oct 24, 2008, at 4:10 PM, Andreas Andreou wrote:
> sorry - dojo.event.connectBefore is what you need :)
>
> On Fri, Oct 24, 2008 at 11:00 PM, Norman Franke <no...@myasd.com>
> wrote:
>> I'm using T4.1.5 which has dojo 0.4.x and no dojo. event.stopEvent.
>> I tried
>> dojo.event.browser.stopEvent but that didn't work. Nor did
>> e.stopPropigation
>> or e.preventDefault. In fact, I tried all three together (and
>> separate) and
>> it still fires.
>>
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>>
>> On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
>>
>>> dojo.event.connect to it and in there do dojo.event.stopEvent (or
>>> something like that) if you
>>> dont want to go on with the submit
>>>
>>> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com>
>>> wrote:
>>>>
>>>> Thanks. I apparently forgot to look at contrib.
>>>>
>>>> As for the second question, I'd love to, but how can I update the
>>>> formhidden
>>>> section of the form such that my controls (that were created via
>>>> AJAX)
>>>> will
>>>> be sent on the next AJAX action? If I don't update the entire
>>>> form, I
>>>> never
>>>> get the values of the controls, it seems. Changing it from
>>>> @Persist("client") to @Persist("session") seems to have solved it,
>>>> however.
>>>>
>>>> Lastly, how can I get an ajax submit to abort? I want to have an
>>>> onclick
>>>> on
>>>> a the submit that will put up "confirm('Are you sure?')" but no
>>>> matter
>>>> what,
>>>> it submits anyway.
>>>>
>>>> Norman Franke
>>>> Answering Service for Directors, Inc.
>>>> www.myasd.com
>>>>
>>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>>
>>>>> To answer your initial question, just use contrib:ajaxStatus from
>>>>>
>>>>>
>>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>>
>>>>> For the second, why not update only the part in question?
>>>>>
>>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke
>>>>> <no...@myasd.com> wrote:
>>>>>>
>>>>>> I sort of have it working by doing an "onclick" and relying on
>>>>>> the
>>>>>> entire
>>>>>> form to update, which resets my div.
>>>>>>
>>>>>> But that brings up another point. I want to AJAX fetch a list of
>>>>>> elements
>>>>>> with a checkbox. Is there a better way to do this than by
>>>>>> setting the
>>>>>> entire
>>>>>> form as one of the updateComponents? It pretty much forces an
>>>>>> update of
>>>>>> the
>>>>>> entire page. If I don't, I can't get the values of the checkbox
>>>>>> since
>>>>>> tapestry serializes the state of the @For and checkboxes in
>>>>>> fields.
>>>>>>
>>>>>> What's the best way to handle this?
>>>>>>
>>>>>> Norman Franke
>>>>>> Answering Service for Directors, Inc.
>>>>>> www.myasd.com
>>>>>>
>>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>>
>>>>>>> I've searched the documentation, and I can't find how one
>>>>>>> implements a
>>>>>>> "loading..." indicator when an AJAX request is sent off. My
>>>>>>> app will
>>>>>>> be
>>>>>>> doing a series of database queries which can take 10 seconds
>>>>>>> or so,
>>>>>>> and
>>>>>>> it
>>>>>>> really needs something to tell the user they need to wait a bit.
>>>>>>> Showing/Hiding a div would be great.
>>>>>>>
>>>>>>> Norman Franke
>>>>>>> Answering Service for Directors, Inc.
>>>>>>> www.myasd.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>>> Tapestry / Tacos developer
>>>>> Open Source / JEE Consulting
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>> Tapestry / Tacos developer
>>> Open Source / JEE Consulting
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Andreas Andreou <an...@gmail.com>.
sorry - dojo.event.connectBefore is what you need :)
On Fri, Oct 24, 2008 at 11:00 PM, Norman Franke <no...@myasd.com> wrote:
> I'm using T4.1.5 which has dojo 0.4.x and no dojo. event.stopEvent. I tried
> dojo.event.browser.stopEvent but that didn't work. Nor did e.stopPropigation
> or e.preventDefault. In fact, I tried all three together (and separate) and
> it still fires.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
> On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
>
>> dojo.event.connect to it and in there do dojo.event.stopEvent (or
>> something like that) if you
>> dont want to go on with the submit
>>
>> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com> wrote:
>>>
>>> Thanks. I apparently forgot to look at contrib.
>>>
>>> As for the second question, I'd love to, but how can I update the
>>> formhidden
>>> section of the form such that my controls (that were created via AJAX)
>>> will
>>> be sent on the next AJAX action? If I don't update the entire form, I
>>> never
>>> get the values of the controls, it seems. Changing it from
>>> @Persist("client") to @Persist("session") seems to have solved it,
>>> however.
>>>
>>> Lastly, how can I get an ajax submit to abort? I want to have an onclick
>>> on
>>> a the submit that will put up "confirm('Are you sure?')" but no matter
>>> what,
>>> it submits anyway.
>>>
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>>
>>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>>
>>>> To answer your initial question, just use contrib:ajaxStatus from
>>>>
>>>>
>>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>>
>>>> For the second, why not update only the part in question?
>>>>
>>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com> wrote:
>>>>>
>>>>> I sort of have it working by doing an "onclick" and relying on the
>>>>> entire
>>>>> form to update, which resets my div.
>>>>>
>>>>> But that brings up another point. I want to AJAX fetch a list of
>>>>> elements
>>>>> with a checkbox. Is there a better way to do this than by setting the
>>>>> entire
>>>>> form as one of the updateComponents? It pretty much forces an update of
>>>>> the
>>>>> entire page. If I don't, I can't get the values of the checkbox since
>>>>> tapestry serializes the state of the @For and checkboxes in fields.
>>>>>
>>>>> What's the best way to handle this?
>>>>>
>>>>> Norman Franke
>>>>> Answering Service for Directors, Inc.
>>>>> www.myasd.com
>>>>>
>>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>>
>>>>>> I've searched the documentation, and I can't find how one implements a
>>>>>> "loading..." indicator when an AJAX request is sent off. My app will
>>>>>> be
>>>>>> doing a series of database queries which can take 10 seconds or so,
>>>>>> and
>>>>>> it
>>>>>> really needs something to tell the user they need to wait a bit.
>>>>>> Showing/Hiding a div would be great.
>>>>>>
>>>>>> Norman Franke
>>>>>> Answering Service for Directors, Inc.
>>>>>> www.myasd.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>>> Tapestry / Tacos developer
>>>> Open Source / JEE Consulting
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Tapestry / Tacos developer
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Norman Franke <no...@myasd.com>.
I'm using T4.1.5 which has dojo 0.4.x and no dojo. event.stopEvent. I
tried dojo.event.browser.stopEvent but that didn't work. Nor did
e.stopPropigation or e.preventDefault. In fact, I tried all three
together (and separate) and it still fires.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Oct 24, 2008, at 3:31 PM, Andreas Andreou wrote:
> dojo.event.connect to it and in there do dojo.event.stopEvent (or
> something like that) if you
> dont want to go on with the submit
>
> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com>
> wrote:
>> Thanks. I apparently forgot to look at contrib.
>>
>> As for the second question, I'd love to, but how can I update the
>> formhidden
>> section of the form such that my controls (that were created via
>> AJAX) will
>> be sent on the next AJAX action? If I don't update the entire form,
>> I never
>> get the values of the controls, it seems. Changing it from
>> @Persist("client") to @Persist("session") seems to have solved it,
>> however.
>>
>> Lastly, how can I get an ajax submit to abort? I want to have an
>> onclick on
>> a the submit that will put up "confirm('Are you sure?')" but no
>> matter what,
>> it submits anyway.
>>
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>>
>> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>>
>>> To answer your initial question, just use contrib:ajaxStatus from
>>>
>>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>>
>>> For the second, why not update only the part in question?
>>>
>>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com>
>>> wrote:
>>>>
>>>> I sort of have it working by doing an "onclick" and relying on
>>>> the entire
>>>> form to update, which resets my div.
>>>>
>>>> But that brings up another point. I want to AJAX fetch a list of
>>>> elements
>>>> with a checkbox. Is there a better way to do this than by setting
>>>> the
>>>> entire
>>>> form as one of the updateComponents? It pretty much forces an
>>>> update of
>>>> the
>>>> entire page. If I don't, I can't get the values of the checkbox
>>>> since
>>>> tapestry serializes the state of the @For and checkboxes in fields.
>>>>
>>>> What's the best way to handle this?
>>>>
>>>> Norman Franke
>>>> Answering Service for Directors, Inc.
>>>> www.myasd.com
>>>>
>>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>>
>>>>> I've searched the documentation, and I can't find how one
>>>>> implements a
>>>>> "loading..." indicator when an AJAX request is sent off. My app
>>>>> will be
>>>>> doing a series of database queries which can take 10 seconds or
>>>>> so, and
>>>>> it
>>>>> really needs something to tell the user they need to wait a bit.
>>>>> Showing/Hiding a div would be great.
>>>>>
>>>>> Norman Franke
>>>>> Answering Service for Directors, Inc.
>>>>> www.myasd.com
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>>> Tapestry / Tacos developer
>>> Open Source / JEE Consulting
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Kalle Korhonen <ka...@gmail.com>.
You can also just use @EventListener. Call a Javascript operation to display
the status and hook up your EventListener to an arbitrary Javascript call.
Kalle
On Fri, Oct 24, 2008 at 12:31 PM, Andreas Andreou <an...@gmail.com>wrote:
> dojo.event.connect to it and in there do dojo.event.stopEvent (or
> something like that) if you
> dont want to go on with the submit
>
> On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com> wrote:
> > Thanks. I apparently forgot to look at contrib.
> >
> > As for the second question, I'd love to, but how can I update the
> formhidden
> > section of the form such that my controls (that were created via AJAX)
> will
> > be sent on the next AJAX action? If I don't update the entire form, I
> never
> > get the values of the controls, it seems. Changing it from
> > @Persist("client") to @Persist("session") seems to have solved it,
> however.
> >
> > Lastly, how can I get an ajax submit to abort? I want to have an onclick
> on
> > a the submit that will put up "confirm('Are you sure?')" but no matter
> what,
> > it submits anyway.
> >
> > Norman Franke
> > Answering Service for Directors, Inc.
> > www.myasd.com
> >
> > On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
> >
> >> To answer your initial question, just use contrib:ajaxStatus from
> >>
> >>
> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
> >>
> >> For the second, why not update only the part in question?
> >>
> >> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com>
> wrote:
> >>>
> >>> I sort of have it working by doing an "onclick" and relying on the
> entire
> >>> form to update, which resets my div.
> >>>
> >>> But that brings up another point. I want to AJAX fetch a list of
> elements
> >>> with a checkbox. Is there a better way to do this than by setting the
> >>> entire
> >>> form as one of the updateComponents? It pretty much forces an update of
> >>> the
> >>> entire page. If I don't, I can't get the values of the checkbox since
> >>> tapestry serializes the state of the @For and checkboxes in fields.
> >>>
> >>> What's the best way to handle this?
> >>>
> >>> Norman Franke
> >>> Answering Service for Directors, Inc.
> >>> www.myasd.com
> >>>
> >>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
> >>>
> >>>> I've searched the documentation, and I can't find how one implements a
> >>>> "loading..." indicator when an AJAX request is sent off. My app will
> be
> >>>> doing a series of database queries which can take 10 seconds or so,
> and
> >>>> it
> >>>> really needs something to tell the user they need to wait a bit.
> >>>> Showing/Hiding a div would be great.
> >>>>
> >>>> Norman Franke
> >>>> Answering Service for Directors, Inc.
> >>>> www.myasd.com
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> >> Tapestry / Tacos developer
> >> Open Source / JEE Consulting
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: T4.1 AJAX Indicators
Posted by Andreas Andreou <an...@gmail.com>.
dojo.event.connect to it and in there do dojo.event.stopEvent (or
something like that) if you
dont want to go on with the submit
On Fri, Oct 24, 2008 at 10:22 PM, Norman Franke <no...@myasd.com> wrote:
> Thanks. I apparently forgot to look at contrib.
>
> As for the second question, I'd love to, but how can I update the formhidden
> section of the form such that my controls (that were created via AJAX) will
> be sent on the next AJAX action? If I don't update the entire form, I never
> get the values of the controls, it seems. Changing it from
> @Persist("client") to @Persist("session") seems to have solved it, however.
>
> Lastly, how can I get an ajax submit to abort? I want to have an onclick on
> a the submit that will put up "confirm('Are you sure?')" but no matter what,
> it submits anyway.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
> On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
>
>> To answer your initial question, just use contrib:ajaxStatus from
>>
>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>>
>> For the second, why not update only the part in question?
>>
>> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com> wrote:
>>>
>>> I sort of have it working by doing an "onclick" and relying on the entire
>>> form to update, which resets my div.
>>>
>>> But that brings up another point. I want to AJAX fetch a list of elements
>>> with a checkbox. Is there a better way to do this than by setting the
>>> entire
>>> form as one of the updateComponents? It pretty much forces an update of
>>> the
>>> entire page. If I don't, I can't get the values of the checkbox since
>>> tapestry serializes the state of the @For and checkboxes in fields.
>>>
>>> What's the best way to handle this?
>>>
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>>
>>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>>
>>>> I've searched the documentation, and I can't find how one implements a
>>>> "loading..." indicator when an AJAX request is sent off. My app will be
>>>> doing a series of database queries which can take 10 seconds or so, and
>>>> it
>>>> really needs something to tell the user they need to wait a bit.
>>>> Showing/Hiding a div would be great.
>>>>
>>>> Norman Franke
>>>> Answering Service for Directors, Inc.
>>>> www.myasd.com
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Tapestry / Tacos developer
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Norman Franke <no...@myasd.com>.
Thanks. I apparently forgot to look at contrib.
As for the second question, I'd love to, but how can I update the
formhidden section of the form such that my controls (that were
created via AJAX) will be sent on the next AJAX action? If I don't
update the entire form, I never get the values of the controls, it
seems. Changing it from @Persist("client") to @Persist("session")
seems to have solved it, however.
Lastly, how can I get an ajax submit to abort? I want to have an
onclick on a the submit that will put up "confirm('Are you sure?')"
but no matter what, it submits anyway.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Oct 24, 2008, at 2:36 PM, Andreas Andreou wrote:
> To answer your initial question, just use contrib:ajaxStatus from
> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
>
> For the second, why not update only the part in question?
>
> On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com>
> wrote:
>> I sort of have it working by doing an "onclick" and relying on the
>> entire
>> form to update, which resets my div.
>>
>> But that brings up another point. I want to AJAX fetch a list of
>> elements
>> with a checkbox. Is there a better way to do this than by setting
>> the entire
>> form as one of the updateComponents? It pretty much forces an
>> update of the
>> entire page. If I don't, I can't get the values of the checkbox since
>> tapestry serializes the state of the @For and checkboxes in fields.
>>
>> What's the best way to handle this?
>>
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>>
>> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>>
>>> I've searched the documentation, and I can't find how one
>>> implements a
>>> "loading..." indicator when an AJAX request is sent off. My app
>>> will be
>>> doing a series of database queries which can take 10 seconds or
>>> so, and it
>>> really needs something to tell the user they need to wait a bit.
>>> Showing/Hiding a div would be great.
>>>
>>> Norman Franke
>>> Answering Service for Directors, Inc.
>>> www.myasd.com
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Andreas Andreou <an...@gmail.com>.
To answer your initial question, just use contrib:ajaxStatus from
http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html
For the second, why not update only the part in question?
On Fri, Oct 24, 2008 at 9:22 PM, Norman Franke <no...@myasd.com> wrote:
> I sort of have it working by doing an "onclick" and relying on the entire
> form to update, which resets my div.
>
> But that brings up another point. I want to AJAX fetch a list of elements
> with a checkbox. Is there a better way to do this than by setting the entire
> form as one of the updateComponents? It pretty much forces an update of the
> entire page. If I don't, I can't get the values of the checkbox since
> tapestry serializes the state of the @For and checkboxes in fields.
>
> What's the best way to handle this?
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
> On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
>
>> I've searched the documentation, and I can't find how one implements a
>> "loading..." indicator when an AJAX request is sent off. My app will be
>> doing a series of database queries which can take 10 seconds or so, and it
>> really needs something to tell the user they need to wait a bit.
>> Showing/Hiding a div would be great.
>>
>> Norman Franke
>> Answering Service for Directors, Inc.
>> www.myasd.com
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T4.1 AJAX Indicators
Posted by Norman Franke <no...@myasd.com>.
I sort of have it working by doing an "onclick" and relying on the
entire form to update, which resets my div.
But that brings up another point. I want to AJAX fetch a list of
elements with a checkbox. Is there a better way to do this than by
setting the entire form as one of the updateComponents? It pretty much
forces an update of the entire page. If I don't, I can't get the
values of the checkbox since tapestry serializes the state of the @For
and checkboxes in fields.
What's the best way to handle this?
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Oct 24, 2008, at 12:10 PM, Norman Franke wrote:
> I've searched the documentation, and I can't find how one implements
> a "loading..." indicator when an AJAX request is sent off. My app
> will be doing a series of database queries which can take 10 seconds
> or so, and it really needs something to tell the user they need to
> wait a bit. Showing/Hiding a div would be great.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org