Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.1.0.5
-
None
Description
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()
public String useArray(String[] array)
{ return "test"; }}
<html
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
xmlns="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())
>
> else return InternalUtils.lastTerm(type.getName());