You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kevin Menard (JIRA)" <de...@tapestry.apache.org> on 2007/12/02 01:14:43 UTC

[jira] Commented: (TAPESTRY-1830) allow local value and index parameters (i.e. not page class variables) in loop, count ... components

    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547543 ] 

Kevin Menard commented on TAPESTRY-1830:
----------------------------------------

I think Christian's suggestion is on the right path, although it's a lot more verbose than I was hoping for.  I'd like to just see

${loop_id.index}

This would use the "prop" binding and search the page class first, then the component store for those defined in the template.  This is similar to OGNL's usage in T4.

For what it's worth, my inspiration for all of this is Django.  Django has a lot of interesting ideas I'd like to see in Tapestry 5.  At the same time, it has a whole set of drawbacks, which is why I went back to T5.

http://www.djangoproject.com/documentation/templates/#for

If you scroll down a bit, you can see the context variables made available right off of the "for" templatetag.

> allow local value and index parameters (i.e. not page class variables) in loop, count ... components
> ----------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1830
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1830
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0.5
>            Reporter: M. H. Shamsi
>             Fix For: 5.0.7
>
>
> index and value parameter in loop (and all components like it) often used just in page templates and there is no need to access or change them in page class.
> sharing this parameters to use directly in page templates, may help developers to write most cleaner page classes.

-- 
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