You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sandeep kale <sa...@atosorigin.com> on 2011/07/12 16:53:40 UTC

Zone update causes to loose js/css bound to div inside zone

Hi,

I am using zone to reset ordering of rows in my list grid. I reorder the
rows in the list after clicking on reset button which refreshes zone
containing list grid. Upto this it's fine. But I have added js to on load of
document to set the class of rows in the list to a css class through
javascript call. But this binding is lost when zone refreshes my list grid.

Please suggest me the solution either to rebind to listgrid after zone
update or not to lose binding after zone update.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-update-causes-to-loose-js-css-bound-to-div-inside-zone-tp4579141p4579141.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: Zone update causes to loose js/css bound to div inside zone

Posted by sandeep kale <sa...@atosorigin.com>.
Hi,

Thanks a lot Thiago and  Derkoe for quick reply and a perfect solution.
It worked fine.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-update-causes-to-loose-js-css-bound-to-div-inside-zone-tp4579141p4589663.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: Zone update causes to loose js/css bound to div inside zone

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 13 Jul 2011 16:22:53 -0300, derkoe  
<ta...@gmail.com> wrote:

> sandeep kale wrote:
>>
>> Hi,
>
> To do it like Thiago: Hi!

Hi! :P

>> I am using zone to reset ordering of rows in my list grid. I reorder the
>> rows in the list after clicking on reset button which refreshes zone
>> containing list grid. Upto this it's fine. But I have added js to on  
>> load> of document to set the class of rows in the list to a css class  
>> through
>> javascript call.

Couldn't you do this by CSS?

>> But this binding is lost when zone refreshes my list
>> grid.

In JavaScript, the Zone component triggers the Tapestry.ZONE_UPDATED_EVENT  
event when the zone is finished updating

$('yourZoneId').observe(Tapestry.ZONE_UPDATED_EVENT, function() {
	...
});

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Re: Zone update causes to loose js/css bound to div inside zone

Posted by derkoe <ta...@gmail.com>.
sandeep kale wrote:
> 
> Hi,
> 

To do it like Thiago: Hi!



> I am using zone to reset ordering of rows in my list grid. I reorder the
> rows in the list after clicking on reset button which refreshes zone
> containing list grid. Upto this it's fine. But I have added js to on load
> of document to set the class of rows in the list to a css class through
> javascript call. But this binding is lost when zone refreshes my list
> grid.
> 
> Please suggest me the solution either to rebind to listgrid after zone
> update or not to lose binding after zone update.
> 

Just add a JavaScript to the zone that calls the same javascript method that
is executed on load of document. This should update your row classes.

-- 
Chris


--
View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-update-causes-to-loose-js-css-bound-to-div-inside-zone-tp4579141p4584041.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