You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by robnangle <ro...@gmail.com> on 2011/04/11 15:11:00 UTC

Tapestry Using Ajax

Hi I'm using ajax and javascript to automatically update a select box when
any one of the other select boxes on the page update. Up until now it has
been working fine but I now have a problem that it wont let me debug mt
tapestry page that it is being used on? It just continuously loads and the
page never fully loads.

Has anybody encountered this or know's how to fix it?

Also a side note how do you get rid of the flashing when the page is being
updated using javascript?

Cheers.

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

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


Re: Tapestry Using Ajax

Posted by robnangle <ro...@gmail.com>.
Taha Hafeez wrote:
> 
> From what you have shared, you have a common zone for all the selects and
> for each 'onchange' event of the selects this zone is updated. This may
> cause change in other selects which might result in recursive zone updates
> and hence the flashing.
> 
> In order to prevent the yellow fade, set update in zone component to
> 'show'(you have not shared the zone so I don't know if you have set that
> or
> not) as illustrated in
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/zonewithoutyellowfade
> 
> 
> regards
> Taha
> 

I have the yellow fade sorted, cheers. Just cant quite figure out why it
wont debug?


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

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


Re: Tapestry Using Ajax

Posted by Taha Hafeez <ta...@gmail.com>.
>From what you have shared, you have a common zone for all the selects and
for each 'onchange' event of the selects this zone is updated. This may
cause change in other selects which might result in recursive zone updates
and hence the flashing.

In order to prevent the yellow fade, set update in zone component to
'show'(you have not shared the zone so I don't know if you have set that or
not) as illustrated in
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/zonewithoutyellowfade


regards
Taha


On Tue, Apr 12, 2011 at 4:00 PM, robnangle <ro...@gmail.com> wrote:

> Code below for java:
>
> public Object onChangeOfKeeper() {
>                keeper = _request.getParameter("param");
>
>                if (keeper == null) {
>                        captains = null;
>                }
>                else if (keeper != null) {
>                        captains.add(keeper);
>                }
>                return _searchZone.getBody();
>        }
>
> tml:
>
>
>
> Cheers
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-Using-Ajax-tp4295901p4297903.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry Using Ajax

Posted by robnangle <ro...@gmail.com>.
Code below for java:

public Object onChangeOfKeeper() {
		keeper = _request.getParameter("param");

		if (keeper == null) {
			captains = null;
		}
		else if (keeper != null) {
			captains.add(keeper);
		}		
		return _searchZone.getBody();
	}

tml:



Cheers


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

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


Re: Tapestry Using Ajax

Posted by Taha Hafeez <ta...@gmail.com>.
Hi

If you share some code, that would be helpful

regards
Taha

On Tue, Apr 12, 2011 at 3:07 PM, robnangle <ro...@gmail.com> wrote:

>
> Taha Hafeez wrote:
> >
> > If page is not loading fully, it might be a because of recursive ajax
> > calls
> >
>
> I am calling several different event methods? Would that be the cause?
>
>
>
> Taha Hafeez wrote:
> >
> >
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/zonewithoutyellowfade
> >
>
> I have been trying to get my code working without the yellow fade but with
> no success thus far. My previous code was:
>
> public Object onChangeOfKeeper() {
>                keeper = _request.getParameter("param");
>
>                if (keeper == null) {
>                        captains = null;
>                }
>                else if (keeper != null) {
>                        captains.add(keeper);
>                }
>                return _searchZone.getBody();
>        }
>
>
>
> I have now changed it to this but no updating is happening:
>
> public Object onActionFromGoalkeeper() {
>                //keeper = _request.getParameter("param");
>
>                if (keeper == null) {
>                        captains = null;
>                }
>                else if (keeper != null) {
>                        captains.add(keeper);
>                }
>                return _searchZone.getBody();
>        }
>
>
>
> Any ideas?
>
> Cheers
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-Using-Ajax-tp4295901p4297829.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry Using Ajax

Posted by robnangle <ro...@gmail.com>.
Taha Hafeez wrote:
> 
> If page is not loading fully, it might be a because of recursive ajax
> calls
> 

I am calling several different event methods? Would that be the cause?



Taha Hafeez wrote:
> 
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/zonewithoutyellowfade
> 

I have been trying to get my code working without the yellow fade but with
no success thus far. My previous code was:

public Object onChangeOfKeeper() {
		keeper = _request.getParameter("param");

		if (keeper == null) {
			captains = null;
		}
		else if (keeper != null) {
			captains.add(keeper);
		}		
		return _searchZone.getBody();
	}



I have now changed it to this but no updating is happening:

public Object onActionFromGoalkeeper() {
		//keeper = _request.getParameter("param");

		if (keeper == null) {
			captains = null;
		}
		else if (keeper != null) {
			captains.add(keeper);
		}		
		return _searchZone.getBody();
	}



Any ideas?

Cheers



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

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


Re: Tapestry Using Ajax

Posted by Taha Hafeez <ta...@gmail.com>.
Hi

On Mon, Apr 11, 2011 at 6:41 PM, robnangle <ro...@gmail.com> wrote:

> Hi I'm using ajax and javascript to automatically update a select box when
> any one of the other select boxes on the page update. Up until now it has
> been working fine but I now have a problem that it wont let me debug mt
> tapestry page that it is being used on? It just continuously loads and the
> page never fully loads.
>

If page is not loading fully, it might be a because of recursive ajax calls


>
> Has anybody encountered this or know's how to fix it?
>
> Also a side note how do you get rid of the flashing when the page is being
> updated using javascript?
>
>
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/zonewithoutyellowfade

<http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/zonewithoutyellowfade>


> Cheers.
>
>
regards
Taha


> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-Using-Ajax-tp4295901p4295901.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>