You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Eddie O'Neil (JIRA)" <de...@beehive.apache.org> on 2005/10/05 18:42:48 UTC
[jira] Created: (BEEHIVE-964) callPageFlow and callMethod tags don't handle arrays correctly
callPageFlow and callMethod tags don't handle arrays correctly
--------------------------------------------------------------
Key: BEEHIVE-964
URL: http://issues.apache.org/jira/browse/BEEHIVE-964
Project: Beehive
Type: Bug
Components: NetUI
Versions: V1
Reporter: Eddie O'Neil
Fix For: 1.1
This was sent to me privately -- the NetUI callPageFlow (and all call method tags) don't handle Java primitive / object arrays correctly. The problem is that the String type name that the user specifies looks like:
java.lang.String[][]
but this is compared against the Java Class type name:
[[Ljava.lang.String;
and clearly, these two aren't equal. Fix is to reformat the latter into the former and the do the String compare.
Repro:
index.jsp
<%
String[] includedProperties = {"TITLE", "DESCRIPTION", "LINK_URL"};
pageContext.setAttribute("includedProperties", includedProperties);
pageContext.setAttribute("includedPropertiesList", Arrays.asList(includedProperties));
%>
<netui-data:callPageFlow method="thisIsATest" resultId="test1">
<netui-data:methodParameter type="java.lang.String" value="HMMMM"/>
</netui-data:callPageFlow>
<c:out value="${test1}"/><br/>
<netui-data:callPageFlow method="thisIsAnotherTest" resultId="test2">
<netui-data:methodParameter type="java.lang.String[]" value="${includedProperties}"/>
</netui-data:callPageFlow>
<c:out value="${test2}"/><br/>
<netui-data:callPageFlow method="thisIsAListTest" resultId="test3">
<netui-data:methodParameter type="java.util.List" value="${includedPropertiesList}"/>
</netui-data:callPageFlow>
<c:out value="${test3}"/><br/>
Controller.jpf
public String thisIsATest(String test)
{
return test+"!!!!";
}
public String thisIsAnotherTest(String[] test)
{
return "Array Works!!!!";
}
public String thisIsAListTest(List test)
{
return "List Works!!!!";
}
Final Output
HMMMM!!!!
Tag Error:1, Found in tag CallPageFlow]
List Works!!!!
Page Errors
Error Number Tag Type Error
1 CallPageFlow Message Could not find operation "thisIsAnotherTest" with 1 parameter(s) of type(s) (java.lang.String[]) on the current page flow.
The same thing happens with the 'callMethod' tag,
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (BEEHIVE-964) callPageFlow and callMethod tags don't
handle arrays correctly
Posted by "Julie Zhuo (JIRA)" <de...@beehive.apache.org>.
[ http://issues.apache.org/jira/browse/BEEHIVE-964?page=all ]
Julie Zhuo closed BEEHIVE-964:
------------------------------
Verified with rev374070. It is working now as expected. Here is the output now,
-----
HMMMM!!!!
-----
Array Works!!!!
-----
List Works!!!!
> callPageFlow and callMethod tags don't handle arrays correctly
> --------------------------------------------------------------
>
> Key: BEEHIVE-964
> URL: http://issues.apache.org/jira/browse/BEEHIVE-964
> Project: Beehive
> Type: Bug
> Components: NetUI
> Versions: V1
> Reporter: Eddie O'Neil
> Assignee: Julie Zhuo
> Fix For: 1.0.1
>
> This was sent to me privately -- the NetUI callPageFlow (and all call method tags) don't handle Java primitive / object arrays correctly. The problem is that the String type name that the user specifies looks like:
> java.lang.String[][]
> but this is compared against the Java Class type name:
> [[Ljava.lang.String;
> and clearly, these two aren't equal. Fix is to reformat the latter into the former and the do the String compare.
> Repro:
> index.jsp
> <%
> String[] includedProperties = {"TITLE", "DESCRIPTION", "LINK_URL"};
> pageContext.setAttribute("includedProperties", includedProperties);
> pageContext.setAttribute("includedPropertiesList", Arrays.asList(includedProperties));
> %>
> <netui-data:callPageFlow method="thisIsATest" resultId="test1">
> <netui-data:methodParameter type="java.lang.String" value="HMMMM"/>
> </netui-data:callPageFlow>
> <c:out value="${test1}"/><br/>
> <netui-data:callPageFlow method="thisIsAnotherTest" resultId="test2">
> <netui-data:methodParameter type="java.lang.String[]" value="${includedProperties}"/>
> </netui-data:callPageFlow>
> <c:out value="${test2}"/><br/>
> <netui-data:callPageFlow method="thisIsAListTest" resultId="test3">
> <netui-data:methodParameter type="java.util.List" value="${includedPropertiesList}"/>
> </netui-data:callPageFlow>
> <c:out value="${test3}"/><br/>
> Controller.jpf
> public String thisIsATest(String test)
> {
> return test+"!!!!";
> }
> public String thisIsAnotherTest(String[] test)
> {
> return "Array Works!!!!";
> }
> public String thisIsAListTest(List test)
> {
> return "List Works!!!!";
> }
> Final Output
> HMMMM!!!!
> Tag Error:1, Found in tag CallPageFlow]
> List Works!!!!
> Page Errors
> Error Number Tag Type Error
> 1 CallPageFlow Message Could not find operation "thisIsAnotherTest" with 1 parameter(s) of type(s) (java.lang.String[]) on the current page flow.
> The same thing happens with the 'callMethod' tag,
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (BEEHIVE-964) callPageFlow and callMethod tags don't handle arrays correctly
Posted by "Eddie O'Neil (JIRA)" <de...@beehive.apache.org>.
[ http://issues.apache.org/jira/browse/BEEHIVE-964?page=all ]
Eddie O'Neil resolved BEEHIVE-964:
----------------------------------
Resolution: Fixed
Fixed in SVN 306526.
> callPageFlow and callMethod tags don't handle arrays correctly
> --------------------------------------------------------------
>
> Key: BEEHIVE-964
> URL: http://issues.apache.org/jira/browse/BEEHIVE-964
> Project: Beehive
> Type: Bug
> Components: NetUI
> Versions: V1
> Reporter: Eddie O'Neil
> Fix For: 1.1
>
> This was sent to me privately -- the NetUI callPageFlow (and all call method tags) don't handle Java primitive / object arrays correctly. The problem is that the String type name that the user specifies looks like:
> java.lang.String[][]
> but this is compared against the Java Class type name:
> [[Ljava.lang.String;
> and clearly, these two aren't equal. Fix is to reformat the latter into the former and the do the String compare.
> Repro:
> index.jsp
> <%
> String[] includedProperties = {"TITLE", "DESCRIPTION", "LINK_URL"};
> pageContext.setAttribute("includedProperties", includedProperties);
> pageContext.setAttribute("includedPropertiesList", Arrays.asList(includedProperties));
> %>
> <netui-data:callPageFlow method="thisIsATest" resultId="test1">
> <netui-data:methodParameter type="java.lang.String" value="HMMMM"/>
> </netui-data:callPageFlow>
> <c:out value="${test1}"/><br/>
> <netui-data:callPageFlow method="thisIsAnotherTest" resultId="test2">
> <netui-data:methodParameter type="java.lang.String[]" value="${includedProperties}"/>
> </netui-data:callPageFlow>
> <c:out value="${test2}"/><br/>
> <netui-data:callPageFlow method="thisIsAListTest" resultId="test3">
> <netui-data:methodParameter type="java.util.List" value="${includedPropertiesList}"/>
> </netui-data:callPageFlow>
> <c:out value="${test3}"/><br/>
> Controller.jpf
> public String thisIsATest(String test)
> {
> return test+"!!!!";
> }
> public String thisIsAnotherTest(String[] test)
> {
> return "Array Works!!!!";
> }
> public String thisIsAListTest(List test)
> {
> return "List Works!!!!";
> }
> Final Output
> HMMMM!!!!
> Tag Error:1, Found in tag CallPageFlow]
> List Works!!!!
> Page Errors
> Error Number Tag Type Error
> 1 CallPageFlow Message Could not find operation "thisIsAnotherTest" with 1 parameter(s) of type(s) (java.lang.String[]) on the current page flow.
> The same thing happens with the 'callMethod' tag,
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira