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 268231

Summary: Attributes for facelet custom component tag not recognized dynamically according to spec
Product: javaee Reporter: d_maidaniuk
Component: JSF EditorAssignee: Martin Fousek <marfous>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Dynamic attributes not recognized properly by JSF editor

Description d_maidaniuk 2016-09-27 11:45:27 UTC
Created attachment 162238 [details]
Dynamic attributes not recognized properly by JSF editor


According to spec for JSF 2.1 (located at facelets tag attributes should be recognized basing on reflection for component class. See TABLE 10-1 "Comparison of Facelets and JSP" in chapter 10.1.1 "Differences between JSP and Facelets":

"Handling of tag attributes
Tag attributes are completely dynamic and automatically map to properties,
attributes and ValueExpressions on UIComponent instances."

However JSF editor rely on rules defined for JSP:

"All tag attributes must be declared in a TLD file. Conformance instances of
components in a page with the expected attributes can be enforced with a taglibrary validator."

I added screenshot with our custom component <ct:jodaCalendar /> which extends PrimeFaces org.primefaces.component.calendar.Calendar and defined in taglib in next way:

        CRX extension of PF Calendar component to work with Joda date and time.
        Extended attributes are listed here. See PF Calendar for all available attributes.
          Expects a 'date' value (default), a 'time' value, or 'both'.
          The corresponding converter strategy will target jodatime object DateMidnight, LocalTime or DateTime.]]>

Attributes "value" and "required" should be recognized basing on properties of lu.crx.faces.component.JodaCalendar class. But errors says that those attributes not defined for component jodaCalendar.