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

Bug 212887

Summary: Palette not available when opening faces-config.xml
Product: [WebTools] Java Server Faces Reporter: Yury Kats <yurykats>
Component: UIAssignee: Debajit Adhikary <debajit.adhikary>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gerry.kessler, hjzhang, raghunathan.srinivasan, robert_gallagher
Version: 2.0.1Keywords: helpwanted
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Screenshot 01: Faces-Config Editor (with palette closed by default)
none
Screenshot 02: Faces-Config Editor with palette
none
Patch for FacesConfigEditor none

Description Yury Kats CLA 2007-12-13 10:20:19 EST
1. Create a dynamic web project with JSF configuration.
2. Double-click "faces-config.xml" in the WEB-INF dir.
3. Click "start" in the introduction page.
Result:
Palette is not available. That means it shows just the red text and no buttons like Page or others.

Workaround:
a. Click on any other element of the UI (project explorer, outline, ...) (something that makes the faces-config.xml panel lose its focus), click again on the faces-config.xml panel: the palette is available.
b. Open a JSP file and open
Comment 1 Raghunathan Srinivasan CLA 2008-02-06 19:59:26 EST
consider for 3.0
Comment 2 Raghunathan Srinivasan CLA 2008-04-25 17:03:42 EDT
Deferred due to lack of resources
Comment 3 Bob Gallagher CLA 2008-09-25 14:56:57 EDT
Is it possible to get a fix for this issue in the 3.0.3 release?
Comment 4 Raghunathan Srinivasan CLA 2008-09-25 19:32:31 EDT
I tried the steps on the Ganymede build and I can't recreate this issue. I see the palette with the icons for the Page, links etc.
Comment 5 Yury Kats CLA 2008-09-29 14:44:01 EDT
I can easily reproduce it with RAD 7.5 which is based on Ganymede.
Once I open faces-config and switch to "Navigation Rule" tab, the palette contains nothing until I click some place else outside the editor and then back in the editor (so it gains focus).
Comment 6 Debajit Adhikary CLA 2008-09-29 17:42:41 EDT
(In reply to comment #5)

I was unable to reproduce this bug using Ganymede (Version: 3.4.0, Build id: I20080617-2000, WTP 3.0.1).


> I can easily reproduce it with RAD 7.5 which is based on Ganymede.
> Once I open faces-config and switch to "Navigation Rule" tab, 
> the palette contains nothing until I click some place else 
> outside the editor and then back in the editor (so it gains focus)


When I open faces-config.xml, and switch to the "Navigation Rule" tab, I see a little arrow (Screenshot FacesConfigEditor1.jpg attached) clicking on which opens up the palette.

The palette is not displayed by default. The palette opens only when I click on the little arrow on the top right, (Screenshot FacesConfigEditor2.jpg attached)

Clicking outside the faces-config editor and re-focusing on it seems to have no effect at all on the palette.

Could you post screenshots that highlight the errant behavior?
Comment 7 Debajit Adhikary CLA 2008-09-29 17:45:20 EDT
Created attachment 113814 [details]
Screenshot 01: Faces-Config Editor (with palette closed by default)
Comment 8 Debajit Adhikary CLA 2008-09-29 17:46:23 EDT
Created attachment 113817 [details]
Screenshot 02: Faces-Config Editor with palette
Comment 9 Yury Kats CLA 2008-09-30 09:17:57 EDT
The palette would be hidden by default, like in your screenshots, if you did not already have the Palette view open (which is the case in RAD). So open Palette view first (Window->Show view->Palette) then open faces-config and switch to Navigation tab.
Comment 10 Helen Zhang CLA 2008-11-05 10:23:42 EST
Is this reproducible now with the latest instructions from Yury?  If so, any idea when this could be targetted to?  Thanks!
Comment 11 Raghunathan Srinivasan CLA 2008-11-05 14:36:47 EST
Please inform if this needs to be addressed in 3.0.4 also.
Comment 12 Raghunathan Srinivasan CLA 2008-12-11 14:20:09 EST
Re-targeting to M5.
Comment 13 Raghunathan Srinivasan CLA 2009-05-05 11:13:05 EDT
This looks at risk for this release. A patch would be welcome.
Comment 14 Yury Kats CLA 2009-07-21 10:40:44 EDT
Appears to be same issue as https://bugs.eclipse.org/bugs/show_bug.cgi?id=161491
There are some helpful hints in there.
The general issue appears to be that we have an editor nested in another editor, and the Palette view is associated with the top-level editor only and does not detect when a nested editor changes.
Comment 15 Yury Kats CLA 2009-07-21 11:05:15 EDT
Created attachment 142143 [details]
Patch for FacesConfigEditor
Comment 16 Yury Kats CLA 2009-07-21 11:08:30 EDT
Attached a patch, based on a suggestion from bug 161491.
FacesConfigEditor#currentPageChanged now "pokes" the PaletteView to force that view to update itself (if it's open).

The fix is small, isolated and poses no risk to the rest of the editor's functionality.

Please cosider for the upcoming maintance release.
Comment 17 Raghunathan Srinivasan CLA 2009-08-27 01:11:23 EDT
Patch applied
Comment 18 Raghunathan Srinivasan CLA 2009-10-27 17:20:00 EDT
*** Bug 273958 has been marked as a duplicate of this bug. ***