[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-1757) @DataModel on a getter broken on Statefull beans.
Gavin King (JIRA)
jira-events at lists.jboss.org
Fri Aug 3 15:03:50 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1757?page=all ]
Gavin King updated JBSEAM-1757:
-------------------------------
Fix Version/s: 2.0.0.CR1
Assignee: Gavin King
Priority: Major (was: Minor)
Yes, the reason is that BijectedMethod is not a get/set pair. Fixing this will require a little bit of a redesign, I guess.
> @DataModel on a getter broken on Statefull beans.
> -------------------------------------------------
>
> Key: JBSEAM-1757
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1757
> Project: JBoss Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0.BETA1
> Reporter: Sanne Grinovero
> Assigned To: Gavin King
> Fix For: 2.0.0.CR1
>
>
> When using "@DataModel" to annotate a getter method of a statefull bean (instead as annotating a field) an exception is thrown.
> It used to work as expected in previous releases, as tested on 1.0.1 , 1.1.0, 1.1.6, 1.2.1.
> StackTrace quote:
> Caused by: java.lang.IllegalArgumentException: Could not invoke method by reflection: BrokenList.getTestData() with parameters: (java.util.ArrayList) on: org.jboss.seam.example.pdf.BrokenList
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:31)
> at org.jboss.seam.Component.setPropertyValue(Component.java:1656)
> ... 108 more
> Caused by: java.lang.IllegalArgumentException: wrong number of arguments
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
> patch to reproduce, to be applied on the booking example (2.0.0.BETA1):
> --- booking/src/org/jboss/seam/example/booking/HotelSearchingAction.java 2007-06-27 08:37:23.
> 000000000 +0200
> +++ booking-broken/src/org/jboss/seam/example/booking/HotelSearchingAction.java 2007-08-03 01:26:12.
> 000000000 +0200
> @@ -30,6 +30,7 @@
> private int page;
> @DataModel
> + public List<Hotel> getHotels(){ return hotels; }
> private List<Hotel> hotels;
> public void find()
> diff -ur booking/src/org/jboss/seam/example/booking/HotelSearching.java booking-broken/src/org/jboss
> /seam/example/booking/HotelSearching.java
> --- booking/src/org/jboss/seam/example/booking/HotelSearching.java 2007-06-27 08:37:19.00000000
> 0 +0200
> +++ booking-broken/src/org/jboss/seam/example/booking/HotelSearching.java 2007-08-03 01:28:01.
> 000000000 +0200
> @@ -1,7 +1,8 @@
> //$Id: HotelSearching.java,v 1.12 2007/06/27 00:06:49 gavin Exp $
> package org.jboss.seam.example.booking;
> -import javax.ejb.Local;
> +import javax.ejb.Local;
> +import java.util.List;
> @Local
> public interface HotelSearching
> @@ -19,5 +20,7 @@
> public boolean isNextPageAvailable();
> public void destroy();
> +
> + public List<Hotel> getHotels();
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list