Re: Tapestry AJAX Throbber

2013-03-29 Thread Alberto Fernández
I'm using Mozilla Firefox. In Google Chrome it doesn't work as well

Alberto Fernández

Consultoría Informática EASIS, SL 
Email: afernan...@easis.es 


2013/3/28 Geoff Callender 

> Which browser? I've just discovered it has a problem in IE 9. It's OK in IE
> 9's compatibility mode but in normal mode it doesn't show the overlay.
>
> If IE 9 is your problem then try replacing this:
>
> new StylesheetOptions().withCondition("IE")
>
> with this (untested):
>
> new StylesheetOptions().withCondition("(IE 7)|(IE 8)")
>
> Geoff
>
> On 28 March 2013 03:52, Alberto Fernández  wrote:
>
> > Hi,
> >
> > I am trying to show a spinner when I update a zone or submit a form. I
> > tried copying fully this
> > example<
> >
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/loadingspinner
> > >
> > that
> > uses that javascript (zone-overlay.js)
> >
> > Tapestry.onDOMLoaded(function() {
> >
> > function addZoneOverlay(event, element) {
> > var mgr = Tapestry.findZoneManager(element);
> > var zone = mgr && mgr.element;
> >
> > if (!zone) {
> > return;
> > }
> >
> > zone.insert({top:""});
> > var zoneDims = zone.getDimensions()
> > var overlay = zone.down("div");
> >
> > overlay.setStyle({
> > width: zoneDims.width + "px",
> > height: zoneDims.height + "px"
> > });
> > }
> >
> > // Tell document body to call addAjaxOverlay whenever a Form is
> > submitted or a zone-related form or link is clicked.
> >
> > $(document.body).on(Tapestry.FORM_PROCESS_SUBMIT_EVENT,
> > addZoneOverlay);
> > $(document.body).on(Tapestry.TRIGGER_ZONE_UPDATE_EVENT,
> > addZoneOverlay);
> > });
> >
> >
> > The spinner is not shown and If i add a console message below the last
> two
> > lines of the document, it works, but it seems that the addZoneOverlay
> > fucntion
> > is never been called because adding a console.log(xx) message inside the
> > function does not work.
> >
> > Only difference between my example and mine is that i use
> > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
> >
> > I'm using tapestry 5.2.4. Could be in my version the problem?
> >
> > Thanks a lot
> >
>


Re: Tapestry AJAX Throbber

2013-03-27 Thread Geoff Callender
Which browser? I've just discovered it has a problem in IE 9. It's OK in IE
9's compatibility mode but in normal mode it doesn't show the overlay.

If IE 9 is your problem then try replacing this:

new StylesheetOptions().withCondition("IE")

with this (untested):

new StylesheetOptions().withCondition("(IE 7)|(IE 8)")

Geoff

On 28 March 2013 03:52, Alberto Fernández  wrote:

> Hi,
>
> I am trying to show a spinner when I update a zone or submit a form. I
> tried copying fully this
> example<
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/loadingspinner
> >
> that
> uses that javascript (zone-overlay.js)
>
> Tapestry.onDOMLoaded(function() {
>
> function addZoneOverlay(event, element) {
> var mgr = Tapestry.findZoneManager(element);
> var zone = mgr && mgr.element;
>
> if (!zone) {
> return;
> }
>
> zone.insert({top:""});
> var zoneDims = zone.getDimensions()
> var overlay = zone.down("div");
>
> overlay.setStyle({
> width: zoneDims.width + "px",
> height: zoneDims.height + "px"
> });
> }
>
> // Tell document body to call addAjaxOverlay whenever a Form is
> submitted or a zone-related form or link is clicked.
>
> $(document.body).on(Tapestry.FORM_PROCESS_SUBMIT_EVENT,
> addZoneOverlay);
> $(document.body).on(Tapestry.TRIGGER_ZONE_UPDATE_EVENT,
> addZoneOverlay);
> });
>
>
> The spinner is not shown and If i add a console message below the last two
> lines of the document, it works, but it seems that the addZoneOverlay
> fucntion
> is never been called because adding a console.log(xx) message inside the
> function does not work.
>
> Only difference between my example and mine is that i use
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>
> I'm using tapestry 5.2.4. Could be in my version the problem?
>
> Thanks a lot
>


Re: AJAX Throbber

2012-12-30 Thread Rural Hunter

Nice!

于 2012/12/30 22:12, Geoff Callender 写道:

In case it helps, here's a working example.


http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/loadingspinner

Cheers,

Geoff

On 27/12/2012, at 8:40 PM, mateen wrote:


Hi,

I looking to implement a AJAX Throbber for all ajax calls. This is my java
script function.

Tapestry.onDOMLoaded(function() {
function addAjaxOverlay(event, element) {
var mgr = Tapestry.findZoneManager(element);
var zone = mgr && mgr.element;
if (!zone) {
return;
}
var $zone = $(zone);
$zone.prepend("");
var overlay = $zone.children(":first");
overlay.width($zone.width()).height($zone.height());
}

$(document.body).bind(Tapestry.FORM_PROCESS_SUBMIT_EVENT,
addAjaxOverlay);
$(document.body).bind(Tapestry.TRIGGER_ZONE_UPDATE_EVENT,
addAjaxOverlay);
});


Show Pending


Now when i include the above js in my page, i get a "Page must be specified
before initializing for partial page render."


Here is my the code called for the click event

ajaxResponseRenderer.addRender( "searchTransactionZone",
searchTransactionZone.getBody( ) ).addRender(
"pendingTransactionsZone",
pendingTransactionsZone.getBody( )).addRender(
"processedTransactionsZone", processedTransactionsZone.getBody( ));

this is the only code that is called. the return type of the function is
null. Without including the JS my page works fine. Only after this JS does
my application crash when doing a AJAX call.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/AJAX-Throbber-tp5718999.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



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





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



Re: AJAX Throbber

2012-12-30 Thread Geoff Callender
In case it helps, here's a working example.


http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/loadingspinner

Cheers,

Geoff

On 27/12/2012, at 8:40 PM, mateen wrote:

> Hi,
> 
> I looking to implement a AJAX Throbber for all ajax calls. This is my java
> script function. 
> 
> Tapestry.onDOMLoaded(function() { 
>function addAjaxOverlay(event, element) {
>var mgr = Tapestry.findZoneManager(element); 
>var zone = mgr && mgr.element; 
>if (!zone) { 
>return; 
>} 
>var $zone = $(zone); 
>$zone.prepend(""); 
>var overlay = $zone.children(":first"); 
>overlay.width($zone.width()).height($zone.height()); 
>} 
> 
>$(document.body).bind(Tapestry.FORM_PROCESS_SUBMIT_EVENT,
> addAjaxOverlay); 
>$(document.body).bind(Tapestry.TRIGGER_ZONE_UPDATE_EVENT,
> addAjaxOverlay); 
> });
> 
> 
> Show Pending 
> 
> 
> Now when i include the above js in my page, i get a "Page must be specified
> before initializing for partial page render."
> 
> 
> Here is my the code called for the click event
> 
> ajaxResponseRenderer.addRender( "searchTransactionZone",
>searchTransactionZone.getBody( ) ).addRender(
>"pendingTransactionsZone",
>pendingTransactionsZone.getBody( )).addRender(
> "processedTransactionsZone", processedTransactionsZone.getBody( ));
> 
> this is the only code that is called. the return type of the function is
> null. Without including the JS my page works fine. Only after this JS does
> my application crash when doing a AJAX call. 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/AJAX-Throbber-tp5718999.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



AJAX Throbber

2012-12-27 Thread mateen
Hi,

I looking to implement a AJAX Throbber for all ajax calls. This is my java
script function. 

Tapestry.onDOMLoaded(function() { 
function addAjaxOverlay(event, element) {
var mgr = Tapestry.findZoneManager(element); 
var zone = mgr && mgr.element; 
if (!zone) { 
return; 
} 
var $zone = $(zone); 
$zone.prepend(""); 
var overlay = $zone.children(":first"); 
overlay.width($zone.width()).height($zone.height()); 
} 
  
$(document.body).bind(Tapestry.FORM_PROCESS_SUBMIT_EVENT,
addAjaxOverlay); 
$(document.body).bind(Tapestry.TRIGGER_ZONE_UPDATE_EVENT,
addAjaxOverlay); 
});


Show Pending 


Now when i include the above js in my page, i get a "Page must be specified
before initializing for partial page render."


Here is my the code called for the click event

ajaxResponseRenderer.addRender( "searchTransactionZone",
searchTransactionZone.getBody( ) ).addRender(
"pendingTransactionsZone",
pendingTransactionsZone.getBody( )).addRender(
"processedTransactionsZone", processedTransactionsZone.getBody( ));

this is the only code that is called. the return type of the function is
null. Without including the JS my page works fine. Only after this JS does
my application crash when doing a AJAX call. 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/AJAX-Throbber-tp5718999.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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