jsf - Managed property - Unable to set property -


i'm trying use managedproperty:

from here

@managedbean(name = "selectionbean") @sessionscoped public class tableselectionbean implements serializable {     private string selectionmode = "single";     private collection<object> selection;     private list<monitoringdata> monitoringdata;     private list<monitoringdata> selectionmonitoringdata; 

to here:

@managedbean(name="actionbean") @sessionscoped public class monitoringactionbean implements serializable {     private threadpoolexecutor executor;     @managedproperty(value="{selectionbean.selectionmonitoringdata}")     private list<monitoringdata> selectedmonitoring; 

and got following error message:

com.sun.faces.mgbean.managedbeancreationexception: unable set property selectedmonitoring managed bean actionbean ... caused by: java.lang.illegalargumentexception: cannot convert {selectionbean.selectionmonitoringdata} of type class java.lang.string interface java.util.list

any idea why not working?

it seems you're forgetting hashtag:

@managedproperty(value="{selectionbean.selectionmonitoringdata}") 

should be:

@managedproperty(value="#{selectionbean.selectionmonitoringdata}") 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -