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 249651

Summary: JSF Composite Component Attributes Invalid After Refactoring
Product: javaee Reporter: hink084
Component: JSF EditorAssignee: Martin Fousek <marfous>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description hink084 2015-01-05 21:23:23 UTC
An "attribute is not defined in the component" error is generated for a valid attribute on a JSF Composite Component after refactoring (renaming) the component .xhtml file from lowercase to uppercase or vice-versa.

System Information
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)

JSF 2.2
Java EE 6

Recreation Steps

1) Create a fresh Maven Web Application Project (Default Names - OK)
2) Open the Project Properties and add the JSF Framework
3) Create folder: src/main/webapp/resources/components
4) Add new TheBug.xhtml file to "src/main/webapp/resources/components"
5) Save the following code into TheBug.xhtml

<ui:component xmlns=""
        <cc:attribute name="myparam"/>


6) Refactor - Rename TheBug.xhtml to theBug.xhtml
7) Change the attribute name in theBug.xhtml from "myparam" to "mynewparam"

        <cc:attribute name="mynewparam"/>

8) Modify index.html to

<html xmlns=""
        <moth:theBug mynewparam="foo"/>

"mynewparam" is marked as invalid and the code completion still lists "myparam".
Comment 1 hink084 2015-01-05 21:43:14 UTC
I should also point out that a temporary solution that has worked for me to resolve this bug is to refactor - rename theBug.xhtml back to TheBug.xhtml, delete the file, and then create a new file named theBug.xhtml.