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 108185 - Moving managed bean across projects updates original project's faces-config file
Summary: Moving managed bean across projects updates original project's faces-config file
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: _ potingwu
URL:
Keywords:
Depends on:
Blocks: 107080
  Show dependency tree
 
Reported: 2007-06-26 16:23 UTC by _ sandipchitale
Modified: 2008-06-17 18:32 UTC (History)
0 users

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 _ sandipchitale 2007-06-26 16:23:27 UTC
1. Create two web projects P1 and P2 with JavaServer Faces Framework.
2. In P1 create a JSF Managed Bean in some package.
3. Drag and drop the Managed Bean .java node to some other package in project P2.
4. Do refactoring.

The faces-config.xml of P1 is updated instead of faces-config.xml of P2.

In this scenario the entry(ies) for the Managed Bean class should be removed from faces-config.xml of P1 and be added 
to the faces-config.xml of P2.

Similiar problem occurs when doing the folder level srag and drop.

Is it possible that this kind of cross project refactoring is not supported?

Also note that this affects the way VW refactoring will work as VW refactoring relies on Web/JSF refactoring for the 
managed bean class name refactoring in faces-config.xml.
Comment 1 Petr Pisl 2007-06-28 10:29:50 UTC
I will look at this. IMHO it looks like a user case, which happens very rarely. Do you thing that this is really p2?
Comment 2 _ sandipchitale 2007-06-29 17:23:29 UTC
If you think "it looks like a user case, which happens very rarely." then I will reduce the priority to P3. Also if 
this scenario was never intended to be (well) supported then the user should get an (warning) error if the user tries 
to move a been to a different project. I guess these applies to all refactorings that involve moveing across projects.
Comment 3 Erno Mononen 2007-10-17 13:00:34 UTC
Taking over.
Comment 4 Erno Mononen 2008-02-07 22:38:21 UTC
Reassigning to web/jsf.
Comment 5 _ potingwu 2008-02-07 23:08:40 UTC
As I just tried the trunk build, after moving the Managed Bean .java node from P1 to P2, the entry in the P1's
faces-config.xml is been removed as expected. P2's faces-config.xml does not add this new entry because it's been
treated as a regular Java file. The name and scope can actually been modified by users as they need. (they don't
necessary be the same as the original one.) I think these behavior is reasonable.

I will close this bug as fixed if you agree.
Comment 6 Jiri Prox 2008-04-11 01:18:04 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 7 _ potingwu 2008-06-17 18:32:50 UTC
Please see my description on 02/07.