This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 180468 - [cc] JSF managed bean registered in faces-config.xml are not provided by cc
Summary: [cc] JSF managed bean registered in faces-config.xml are not provided by cc
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2010-02-09 03:02 UTC by Jindrich Sedek
Modified: 2010-02-23 02:51 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2010-02-09 03:02:47 UTC
Create new Web Application
Create new JSF config
Create new JSF Managed Bean and register it in faces-config (enable checkbox in wizard)
in index.xhtml invoke cc in EL: '#{|}'
the JSF bean is not provided
Comment 1 Jindrich Sedek 2010-02-09 03:13:17 UTC
The workaround is to use javax.faces.bean.ManagedBean annotation instead of faces-config.xml
Comment 2 Marek Fukala 2010-02-10 01:21:44 UTC
Looks like the merged model issue. David is the expert on it...
Comment 3 Petr Jiricka 2010-02-10 06:05:19 UTC
Reproducible, must be fixed for 6.9.
Comment 4 Marek Fukala 2010-02-17 10:55:09 UTC
The issue happens only if an instance of jsf metamodel is created (for example when the EL code completion in an xhtml file is called) and later a faces-config.xml is added. If you start netbeans or open a project with a faces-config.xml, everything works fine.

Caused by JsfModelFactory.getModel( WebModule module ) caching the model instances per webmodule. When a new model is created for the first time for a webmodule a new instance of ModelUnit is passed into it. However the ModelUnit searches the the faces-config.xml file only during its creation so once the model instance is created for the webmodule without faces config, the model never uses the data from faces-config.xml even if created later. Netbeans restart or maybe reopening the project helps.

This is IMO a low priority issue, I'll try to fix anyway.
Comment 5 Marek Fukala 2010-02-17 14:00:14 UTC
OK, there is some support for listening on faces configs changes but there were issues - the whole related code in JsfModelImpl and ModelUnit is messy so I spent great deal of time trying to understand what will/was supposed to happen if ... .

Someone please review the fix, there is no guarantee of the fix to be regressions less. I tried basic scenarios, but would be worth testing a bit.

web-main#8f42ea1df5c2
Comment 6 Quality Engineering 2010-02-17 21:57:19 UTC
Integrated into 'main-golden', will be available in build *201002180200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8f42ea1df5c2
User: Marek Fukala <mfukala@netbeans.org>
Log: #180468 -  [cc] JSF managed bean registered in faces-config.xml are not provided by cc
Comment 7 Jindrich Sedek 2010-02-23 02:51:10 UTC
verified.

NetBeans IDE Dev (Build 201002230200)