Code:<managed-bean> <managed-bean-name>test</managed-bean-name> <managed-bean-class>test.TestBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean In Scenario 1 the expression "#{test.selectedDevice}" gets its value from the backing bean setter/getter methods . But in Scenario 2 it results in error Cannot get value for expression '#{test.selectedDevice}' The only additions to Scenario 2 are 1) <managed-property> in faces-config.xml and 2) defining "deviceManager" string along with setter/getter methods in backing bean TestBean.java Addition Code in Scenario 2: ------------------ faces-config.xml ------------------ <managed-property> <property-name>deviceManager</property-name> <property-class> test.DeviceTypeManager </property-class> <value>#{deviceManager}</value> </managed-property> ----------------- TestBean.java ------------------ private DeviceTypeManager deviceManager; public DeviceTypeManager getDeviceManager() { return deviceManager; } public void setDeviceManager(DeviceTypeManager deviceManager) { this.deviceManager = deviceManager; }
Hmm... It seems you are not passing "event" as a parameter to the method from which you are trying to retrive the data (say devices).
Try to pass the event object a parameter to the method "selectedDevice"
Might be this help.


Reply With Quote