You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Adam (JIRA)" <ji...@apache.org> on 2010/04/21 14:37:54 UTC

[jira] Created: (TAP5-1112) Handle array types in property expressions

Handle array types in property expressions
------------------------------------------

                 Key: TAP5-1112
                 URL: https://issues.apache.org/jira/browse/TAP5-1112
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.1.0.5
            Reporter: Adam


Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.

public class Test
{
  public String[] getArray()
  {
    return new String[4];
  }
  public String useArray(String[] array)
  {
    return "test";
  }
}


<html 
      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
      xmlns:p="tapestry:parameter">

    <p>${useArray(array)}</p>

</html>



diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
914,915c914,920
<             // TODO: handle arrays types
<             return InternalUtils.lastTerm(type.getName());
---
>             if (type.isArray())
>             {
>               Class<?> baseType = type.getComponentType();
>               while (baseType.isArray()) baseType = baseType.getComponentType();
>               return InternalUtils.lastTerm(baseType.getName());
>             }
>             else return InternalUtils.lastTerm(type.getName());


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko updated TAP5-1112:
---------------------------------

    Fix Version/s: 5.2.0

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>             Fix For: 5.2.0
>
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko closed TAP5-1112.
--------------------------------

    Resolution: Fixed

Thanks for the patch. Unfortunately the patch doesn't contain any test. I extended the patch by tests.

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko updated TAP5-1112:
---------------------------------

    Fix Version/s: 5.2.0

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>             Fix For: 5.2.0
>
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko reassigned TAP5-1112:
------------------------------------

    Assignee: Igor Drobiazko

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko updated TAP5-1112:
---------------------------------

    Issue Type: Improvement  (was: Bug)

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko updated TAP5-1112:
---------------------------------

    Issue Type: Improvement  (was: Bug)

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko closed TAP5-1112.
--------------------------------

    Resolution: Fixed

Thanks for the patch. Unfortunately the patch doesn't contain any test. I extended the patch by tests.

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-1112) Handle array types in property expressions

Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko reassigned TAP5-1112:
------------------------------------

    Assignee: Igor Drobiazko

> Handle array types in property expressions
> ------------------------------------------
>
>                 Key: TAP5-1112
>                 URL: https://issues.apache.org/jira/browse/TAP5-1112
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Adam
>            Assignee: Igor Drobiazko
>
> Passing an array as an argument currently does not work. I saw a TODO in PropertyConduitSourceImpl.java regarding this and made a patch.
> public class Test
> {
>   public String[] getArray()
>   {
>     return new String[4];
>   }
>   public String useArray(String[] array)
>   {
>     return "test";
>   }
> }
> <html 
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>       xmlns:p="tapestry:parameter">
>     <p>${useArray(array)}</p>
> </html>
> diff -r tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java tapestry5-mod/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
> 914,915c914,920
> <             // TODO: handle arrays types
> <             return InternalUtils.lastTerm(type.getName());
> ---
> >             if (type.isArray())
> >             {
> >               Class<?> baseType = type.getComponentType();
> >               while (baseType.isArray()) baseType = baseType.getComponentType();
> >               return InternalUtils.lastTerm(baseType.getName());
> >             }
> >             else return InternalUtils.lastTerm(type.getName());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.