You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2008/01/04 19:23:35 UTC
[jira] Commented: (TAPESTRY-2014) binding prefix should be aware of
page's lifecycle
[ https://issues.apache.org/jira/browse/TAPESTRY-2014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556010#action_12556010 ]
Howard M. Lewis Ship commented on TAPESTRY-2014:
------------------------------------------------
I think your issue could be addressed by making it possible to add a PageLifecycleListener via the ComponentResources interface. Your binding instance could implement the interface, and be notified when the page was loaded, attached or detached.
Clever use of bindings, btw.
> binding prefix should be aware of page's lifecycle
> --------------------------------------------------
>
> Key: TAPESTRY-2014
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2014
> Project: Tapestry
> Issue Type: Improvement
> Affects Versions: 5.0.7
> Reporter: Davor Hrg
>
> binding should be aware of at least pageAtached and pageDetached events
> to initialize, or clear contents.
> I've made a binding prefix for zebra effect
> <t:grid source="vessels" rowsPerPage="15" t:id="results" rowClass="cycle:line1,line2">
> </t:grid>
> the problem was that for every reload the first line would alternate. This is because binding is
> attached to a page instance and is not aware of page's lifecycle.
> I've made a workarround by having a static WeakHashmap tracking pages with this binding,
> and by adding:
> ${cycle:reset}
> at the begining of each page that uses this binding.
> some other bindings may also need to clean resources...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org