Dirk Dollar created RF-11882:
--------------------------------

             Summary: a4j jsFunction cannot transform java class to json in the 
getData method call
                 Key: RF-11882
                 URL: https://issues.jboss.org/browse/RF-11882
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 4.1.0.Final
            Reporter: Dirk Dollar


I get a 
Caused by: java.lang.IllegalAccessException: Class 
org.ajax4jsf.javascript.PropertyUtils can not access a member of class 
java.util.HashMap$Entry with modifiers "public final"

Which wasn't there in richfaces 3.3.3

The code snippet:

class MyBean{
public String actionMethod(){
....do something which creates a Map <String,String> data, now I want to sort 
it before I return it:

        private List<Entry<String, String>> sortDataIntoList(Map<String, 
String> data) {
                        List<Entry<String, String>> sortedList = new 
ArrayList<Entry<String, String>>(data.entrySet());
                        Collections.sort(sortedList, new 
Comparator<Entry<String, String>>() {
                                public int compare(Entry<String, String> f1, 
Entry<String, String> f2) {
                                        return 
f1.getValue().compareTo(f2.getValue());
                                }
                        });
                        if(sortedList.size()>max)
                                return sortedList.subList(0, max);
                        return sortedList;
        }

...and return it from...
public static MyInnerClass{
  List<Entry<String,String>> data
 public MyInnerClass(List<Entry<String,String>> data){
this.data=data
}
public   List<Entry<String,String>> getData(){
return data;}

}

}

results in the mentioned error

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to