<managed-property> in adfc-config.xml

<managed-property> element in the adfc-config.xml file represents a property of a managed bean and it is nested in a the <managed -bean>.  The important thing is that the property should have the get/set methods in the bean

<managed-bean id="__2">
   <managed-bean-name>view_simple_page_view_bean</managed-bean-name>
   <managed-bean-class>view.SimplePageViewBean</managed-bean-class>
   <managed-bean-scope>view</managed-bean-scope>
   <managed-property id="__3">
     <property-name>simplePageModelBean</property-name>
     <property-class>model.SimplePageModelBean</property-class>
     <value>#{pageFlowScope.model_simple_page_model_bean}</value>
   </managed-property>
   <managed-property id="__5">
     <property-name>header</property-name>
     <property-class>java.lang.String</property-class>
     <value>Simple Page</value>
   </managed-property>
</managed-bean>

if managed property is set for a managed bean then the ADF framework would set the property when the managed bean in being initialized.

In the above sample,  view.SimplePageViewBean is a managed bean and the properties simplePageModelBean, header are managed by the framework. the managed bean view.SimplePageViewBean should have the set/get methods for the properties.

The code for the sample can be found here.

Technorati Tags: ,

Comments

Popular posts from this blog

Palindrome program in Java using BufferedReader

OOPS: Decomposition and Abstraction