You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "M. H. Shamsi (JIRA)" <de...@tapestry.apache.org> on 2007/10/14 23:38:50 UTC

[jira] Created: (TAPESTRY-1830) sharing value and index parameter in loop, count ... compoentes

sharing   value and index parameter  in loop, count ... compoentes
------------------------------------------------------------------

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


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


Re: [jira] Closed: (TAPESTRY-1830) Add ability to store temporary data without having to define new properties

Posted by Kevin Menard <km...@servprise.com>.
Awesome!  I would have went with "temp:" as the prefix, but I don't have
much to complain about ;-)

I'll have to try this out tomorrow.

-- 
Kevin


On 1/5/08 9:06 PM, in article 29676535.1199585194734.JavaMail.jira@brutus,
"Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> wrote:

> 
>      [ 
> https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.pl
> ugin.system.issuetabpanels:all-tabpanel ]
> 
> Howard M. Lewis Ship closed TAPESTRY-1830.
> ------------------------------------------
> 
>        Resolution: Fixed
>     Fix Version/s: 5.0.8
> 
>> Add ability to store temporary data without having to define new properties
>> ---------------------------------------------------------------------------
>> 
>>                 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
>>            Assignee: Howard M. Lewis Ship
>>             Fix For: 5.0.8
>> 
>> 
>> 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.



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


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

Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534712 ] 

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

This seems very similar in nature to TAPESTRY-1694.  It may be a good idea to pick one and go with it.

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


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

Posted by "Christian E Gruber (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534723 ] 

Christian E Gruber commented on TAPESTRY-1830:
----------------------------------------------

Hmm.  True, but Howard's suggestion still requires that something be coded into the page class. (ie, the loop component itself).  I'd like to see no requirement for that for purely "internal" local variables.

when you say "can access the component", are you meaning something like ${component:<comp_id>:<variable>} ?

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


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

Posted by "Davor Hrg (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547610 ] 

Davor Hrg commented on TAPESTRY-1830:
-------------------------------------

I tried this out some time ago,
it is actualy very simple to do.

I added another prefix, used string until first dot
as component id, and delegated the rest of the expression
to prop binding and using just found component as root object.

the only problem was that this worked for my own components,
and not for Loop component. The reason for this is simple, Loop
component omitted getter on purpose.

my idea was to upgrade prop binding with a simple new syntax change
that is familiar to all playing with css.

${#loop_id.index}

.....


for those interested in the code :

package test.tapestry.services;

import org.apache.tapestry.Binding;
import org.apache.tapestry.ComponentResources;
import org.apache.tapestry.TapestryConstants;
import org.apache.tapestry.ioc.Location;
import org.apache.tapestry.runtime.Component;
import org.apache.tapestry.services.BindingFactory;
import org.apache.tapestry.services.BindingSource;

/** The "cprop:" binding prefix, which allows access to a child component's prop via 
 * normal prop: expression prefixed with component id.*/
public class ComponentPropBindingFactory implements BindingFactory
{
    private final BindingSource _propBindingFactory;

    public ComponentPropBindingFactory(BindingSource bindingSource){
        _propBindingFactory = bindingSource;
    }
    
    public Binding newBinding(String description, ComponentResources container, ComponentResources component,
            String expression, Location location)
    {
        int idx=expression.indexOf(".");
        ComponentResources propSource = null;
        if(idx == -1)
            throw new RuntimeException("Invalid expression: '"+expression+"'. You must provide component id ");
        else{
            String componentId = expression.substring(0,idx);
            expression = expression.substring(idx+1);
            Component embeddedComponent = container.getEmbeddedComponent(componentId);
            if(embeddedComponent == null) throw new RuntimeException("Component "+componentId+" not found");
            propSource = embeddedComponent.getComponentResources();
        }
        return _propBindingFactory.newBinding(description, propSource, component, TapestryConstants.PROP_BINDING_PREFIX, expression, location);
    }
}

> 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


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

Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
    [ 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


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

Posted by "Nick Westgate (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534740 ] 

Nick Westgate commented on TAPESTRY-1830:
-----------------------------------------

I was thinking along the lines of an OGNL expression passing in the component name, but this would still require exposing the component resources as a property and fishing around in there (which is what the component binding is shorthand for).
Not only would this make the OGNL expression verbose, I think Howard might label it a Bad Thing. ;-)

Your component binding suggestion is interesting if we view it as "chaining" different bindings, with default chain of prop.

And I don't want to start an edit war ;-) but I removed the duplicate and T5 affects from TAPESTRY-1694.
Devs need one JIRA per issue (per framework) to close. Duplicate is used for closing redundant issues.
If you change your comment to mention this issue it will be linkage enough between the two.

Cheers,
Nick.

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


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

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-1830:
-------------------------------------------

    Fix Version/s:     (was: 5.0.7)
                   5.0.8

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


[jira] Commented: (TAPESTRY-1830) sharing value and index parameter in loop, count ... compoentes

Posted by "Christian E Gruber (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534693 ] 

Christian E Gruber commented on TAPESTRY-1830:
----------------------------------------------

Oh, and using this should include the namespace in the variable declaration, I should think, so you can ensure that one CAN use the page class if necessary.

Either

<t:loop source="anIterable" value="local:myValue>
    <p>${local:myValue}</p>
</t:loop>

or, allow the current syntax to be assumed in the local scope, and make someone do this to access the page class variable.

<t:loop source="anIterable" value="page:myValue>
    <p>${page:myValue}</p>
</t:loop>


I like the former rather than the latter, because most access to variables without explicit namespace implies the page class, and that should be kept consistent, I think.



> sharing   value and index parameter  in loop, count ... compoentes
> ------------------------------------------------------------------
>
>                 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.6
>
>
> 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


[jira] Commented: (TAPESTRY-1830) sharing value and index parameter in loop, count ... compoentes

Posted by "Christian E Gruber (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534691 ] 

Christian E Gruber commented on TAPESTRY-1830:
----------------------------------------------

There needs to be a namespace in the ${} notation for this sort of thing, unless we're going to go with some sort of cascading resolution, which I expect would have a negative performance impact if used, say, in loops a lot.  ${temp:foo} was suggested on the list.  ${local:foo} might be another.  

I was originally thinking of ${component:foo} but the problem is there's arbitrary nesting of components below the loop or other containing component, so there's no guarantee that you're hitting the right one.  Having a page-level scratch namespace would requrie that people name variables to avoid collision (which they have to do now anyway) but keep it simple, and (probably) way easier to implement and make fast.

> sharing   value and index parameter  in loop, count ... compoentes
> ------------------------------------------------------------------
>
>                 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.6
>
>
> 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


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

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-1830:
-------------------------------------------

    Fix Version/s:     (was: 5.0.6)
                   5.0.7

> 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


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

Posted by "Davor Hrg (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547610 ] 

hrgdavor edited comment on TAPESTRY-1830 at 12/2/07 2:52 AM:
--------------------------------------------------------------

I tried this out some time ago,
it is actualy very simple to do.

I added another prefix, used string until first dot
as component id, and delegated the rest of the expression
to prop binding and using just found component as root object.

the only problem was that this worked for my own components,
and not for Loop component. The reason for this is simple, Loop
component omitted getter on purpose.

my idea was to upgrade prop binding with a simple new syntax change
that is familiar to all playing with css.

${#loop_id.index}

.....


for those interested in the code :

package test.tapestry.services;

import org.apache.tapestry.Binding;
import org.apache.tapestry.ComponentResources;
import org.apache.tapestry.TapestryConstants;
import org.apache.tapestry.ioc.Location;
import org.apache.tapestry.runtime.Component;
import org.apache.tapestry.services.BindingFactory;
import org.apache.tapestry.services.BindingSource;

/** The "cprop:" binding prefix, which allows access to a child component's prop via 
 * normal prop: expression prefixed with component id.*/
public class ComponentPropBindingFactory implements BindingFactory
{
    private final BindingSource _propBindingFactory;

    public ComponentPropBindingFactory(BindingSource bindingSource){
        _propBindingFactory = bindingSource;
    }
    
    public Binding newBinding(String description, ComponentResources container, ComponentResources component,
            String expression, Location location)
    {
        int idx=expression.indexOf(".");
        ComponentResources propSource = null;
        if(idx == -1)
            throw new RuntimeException("Invalid expression: '"+expression+"'. You must provide component id ");
        else{
            String componentId = expression.substring(0,idx);
            expression = expression.substring(idx+1);
            Component embeddedComponent = container.getEmbeddedComponent(componentId);
            if(embeddedComponent == null) throw new RuntimeException("Component "+componentId+" not found");
            propSource = embeddedComponent.getComponentResources();
        }
        return _propBindingFactory.newBinding(description, propSource, component, TapestryConstants.PROP_BINDING_PREFIX, expression, location);
    }
}

of course,
for it to work .. add this to your app module...

    public static void contributeBindingSource(
            MappedConfiguration<String, BindingFactory> configuration,
            BindingSource bindingSource
            )
    {
        configuration.add("cprop",new ComponentPropBindingFactory(bindingSource));
    }    


      was (Author: hrgdavor):
    I tried this out some time ago,
it is actualy very simple to do.

I added another prefix, used string until first dot
as component id, and delegated the rest of the expression
to prop binding and using just found component as root object.

the only problem was that this worked for my own components,
and not for Loop component. The reason for this is simple, Loop
component omitted getter on purpose.

my idea was to upgrade prop binding with a simple new syntax change
that is familiar to all playing with css.

${#loop_id.index}

.....


for those interested in the code :

package test.tapestry.services;

import org.apache.tapestry.Binding;
import org.apache.tapestry.ComponentResources;
import org.apache.tapestry.TapestryConstants;
import org.apache.tapestry.ioc.Location;
import org.apache.tapestry.runtime.Component;
import org.apache.tapestry.services.BindingFactory;
import org.apache.tapestry.services.BindingSource;

/** The "cprop:" binding prefix, which allows access to a child component's prop via 
 * normal prop: expression prefixed with component id.*/
public class ComponentPropBindingFactory implements BindingFactory
{
    private final BindingSource _propBindingFactory;

    public ComponentPropBindingFactory(BindingSource bindingSource){
        _propBindingFactory = bindingSource;
    }
    
    public Binding newBinding(String description, ComponentResources container, ComponentResources component,
            String expression, Location location)
    {
        int idx=expression.indexOf(".");
        ComponentResources propSource = null;
        if(idx == -1)
            throw new RuntimeException("Invalid expression: '"+expression+"'. You must provide component id ");
        else{
            String componentId = expression.substring(0,idx);
            expression = expression.substring(idx+1);
            Component embeddedComponent = container.getEmbeddedComponent(componentId);
            if(embeddedComponent == null) throw new RuntimeException("Component "+componentId+" not found");
            propSource = embeddedComponent.getComponentResources();
        }
        return _propBindingFactory.newBinding(description, propSource, component, TapestryConstants.PROP_BINDING_PREFIX, expression, location);
    }
}
  
> 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


[jira] Assigned: (TAPESTRY-1830) Add ability to store temporary data without having to define new properties

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAPESTRY-1830:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> Add ability to store temporary data without having to define new properties
> ---------------------------------------------------------------------------
>
>                 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
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.8
>
>
> 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


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

Posted by "Nick Westgate (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534719 ] 

Nick Westgate commented on TAPESTRY-1830:
-----------------------------------------

Howard has suggested we use the component's own parameters which will be made public.
When the expression language (i.e. not the current version of "prop") can access the component it will suffice for this use case.

Cheers,
Nick.

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


[jira] Updated: (TAPESTRY-1830) Add ability to store temporary data without having to define new properties

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-1830:
-------------------------------------------

    Summary: Add ability to store temporary data without having to define new properties  (was: allow local value and index parameters (i.e. not page class variables) in loop, count ... components)

> Add ability to store temporary data without having to define new properties
> ---------------------------------------------------------------------------
>
>                 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
>
> 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


[jira] Closed: (TAPESTRY-1830) Add ability to store temporary data without having to define new properties

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1830.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.8

> Add ability to store temporary data without having to define new properties
> ---------------------------------------------------------------------------
>
>                 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
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.8
>
>
> 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


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

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555664#action_12555664 ] 

Howard M. Lewis Ship commented on TAPESTRY-1830:
------------------------------------------------

I think this could be done.  We could have a Map associated with each component, used to store these kinds of values.  A "var:" binding prefix (I prefer that the "local:") would read and update the Map.  The Map would be cleared after the component finished rendering.

Because there is no type information in a Map value, we really couldn't do much with a property expression (which is based on type safe signatures).  But still, a lot of simple cases (such as the looping output above) could be accomplished.

Again, if you are doing anything complicated, you would want to define a component property to hold the value, which nails the type, making it possible to use property expressions.  But if you just need to hold the value and pass it as a parameter elsewhere, this would work well.

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


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

Posted by "Christian E Gruber (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian E Gruber updated TAPESTRY-1830:
-----------------------------------------

    Summary: allow local value and index parameters (i.e. not page class variables) in loop, count ... components  (was: sharing   value and index parameter  in loop, count ... compoentes)

Just clarifying the subject a bit.

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