aspose file tools*
The moose likes JSF and the fly likes How do I preload bean for editing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How do I preload bean for editing?" Watch "How do I preload bean for editing?" New topic
Author

How do I preload bean for editing?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

In my JSF page, I'm trying to create one page for both the adding and editing of an object. So for example, on my JSF page I have

<hutputLabel for="featureDesc">
<hutputText id="featureDescLabel" value="Feature Desc:"/>
</hutputLabel>

and in my faces-config.xml file, I have

<managed-bean>
<managed-bean-name>FeatureDef</managed-bean-name>
<managed-bean-class>com.myco.nps.config.common.beans.FeatureDef</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>action</property-name>
<value>A</value>
</managed-property>
<managed-property>
<property-name>feature_name</property-name>
</managed-property>
<managed-property>
<property-name>feature_desc</property-name>
</managed-property>
</managed-bean>

My question is, let's say I'm on another JSF page and I click an "Edit" link. How do I preload the bean that I want to be edited?

- Dave
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How do I preload bean for editing?