Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312732

Summary: [JSF 2.0] FacesConfig editor gives incorrect validation warning when using view scope for managed bean
Product: [WebTools] Java Server Faces Reporter: Raghunathan Srinivasan <raghunathan.srinivasan>
Component: CoreAssignee: Gerry Kessler <gerry.kessler>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: cameron.bateman
Version: 3.2   
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Raghunathan Srinivasan CLA 2010-05-12 19:49:49 EDT
1) Create a DWP with JSF 2.0 facet
2) Edit the faces-config.xml in the Faces config editor
3) Add a managed bean
	<managed-bean>
		<managed-bean-name>loginBean</managed-bean-name>
		<managed-bean-class>demo.LoginBean</managed-bean-class>
		<managed-bean-scope>view</managed-bean-scope>
	</managed-bean>
4) Save

Result: FC editor reports the warning:
Managed bean scope must be one of: request, session, application, none	faces-config.xml	/SimpleComp/WebContent/WEB-INF	line 0	JSF Problem


Note: If you type an incorrect value for the scope say, viewx, you get correct error reported by XML
cvc-pattern-valid: Value 'viewx' is not facet-valid with respect to pattern 'view|request|session|application|none|#\{.*\}' for type 'null'.	faces-config.xml	/SimpleComp/WebContent/WEB-INF	line 11	XML Problem
Comment 1 Gerry Kessler CLA 2010-05-13 12:51:45 EDT
Can you please review that you were adding this entry to a JSF2.0 schema'ed faces config file.   Even though the app is a JSF 2.0 faceted app, a pre-JSF2.0 config file will not accept JSF2.0 model objects.
Comment 2 Raghunathan Srinivasan CLA 2010-05-13 14:53:30 EDT
I am not able to repro. this with the released code.
Comment 3 Raghunathan Srinivasan CLA 2010-05-13 14:53:50 EDT
closing.