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 - Attributes for facelet custom component tag not recognized dynamically according to spec
Summary: Attributes for facelet custom component tag not recognized dynamically accord...
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
Depends on:
Reported: 2016-09-27 11:45 UTC by d_maidaniuk
Modified: 2016-09-27 11:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Dynamic attributes not recognized properly by JSF editor (98.60 KB, image/png)
2016-09-27 11:45 UTC, d_maidaniuk

Note You need to log in before you can comment on or make changes to this bug.
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.