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 202925 - default facelet component attributes "rendered" and "id" not properly handled by the editor
Summary: default facelet component attributes "rendered" and "id" not properly handled...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: -S1S-
Hardware: PC Linux
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 193806 201984 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-01 14:41 UTC by pablopina
Modified: 2011-11-12 16:28 UTC (History)
4 users (show)

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 pablopina 2011-10-01 14:41:11 UTC
JSF 2 Composite component's implicit rendered attribute does not get picked up by the editor.
Comment 1 Marek Fukala 2011-10-03 11:49:15 UTC
some more info http://java.net/jira/browse/JAVASERVERFACES-1849
Comment 2 Marek Fukala 2011-10-03 12:30:10 UTC
Code completion fixed in web-main#a89e719b5f13

As for the false errors in editor (as described in the Mojarra issue) - CC error checking has been disabled since 7.0
Comment 3 pablopina 2011-10-03 14:07:29 UTC
Marek,

Not sure what you mean by:

As for the false errors in editor (as described in the Mojarra issue) - CC
error checking has been disabled since 7.0

I am using 7.0.1 and when if i use rendered while calling the composite component the editor does show an error.
Comment 4 Marek Fukala 2011-10-03 14:13:22 UTC
Hmm, I was under impression the error checks for cc were disabled earlier. So it happened after 7.0.1, I'm sorry for the incorrect information. Definitively it doesn't check the cc in current dev builds.

Just for sure, it will be superb if you check it in the current dev builds or 7.1 beta.
Comment 5 pablopina 2011-10-03 14:16:02 UTC
Marek,

Does that mean that none of the attributes get checked while calling composite components? If so, that would be a shame, wouldn't it? Ideally i would like to see all the attributes being correctly checked and rendered being allowed too...
Comment 6 Marek Fukala 2011-10-03 14:26:59 UTC
I'm afraid none of the cc sub-properties aka cc.attrs.myattr are not checked for validity. AFAIR this was dropped during a big code redesign done to 7.0. That's why I'm really confused you say it works in 7.0.1. 

I'll look at the issue tomorrow again an possibly reimplement it "a bit" so the checks for cc properties works (again).
Comment 7 pablopina 2011-10-03 14:31:21 UTC
Marek,

Sorry for the confusion:

I was taking about the error check when calling the component:

eg:

<cc:email rendered="true" value="po@po.com"/>

I was saying it would be good to keep this with error check as the only problem now was thea NB would complain about "rendered" (which is implicit but not defined in the cc's interface)

About error checking (and autocomplete) cc.attrs.xxx (inside the cc implementation) that would be great wouldn't it?
Comment 8 pablopina 2011-10-03 14:33:30 UTC
Hey,

by the way,

It would also be great if we the project explorer could tell you which jsf pages have EL errors as often renmaing/deleting a method in a backing bean breaks the jsf expression and you can't see the warning unless you log open that file again.

If yo think is doable i can open a RFE.
Comment 9 Quality Engineering 2011-10-04 14:08:29 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a89e719b5f13
User: Marek Fukala <mfukala@netbeans.org>
Log: #202925 - JSF 2 Composite component's implicit rendered attribute does not get picked up by the editor.
Comment 10 Marek Fukala 2011-10-31 15:54:35 UTC
There are two more issues with very nice description complaining about the same problem:

Bug 201984 - JSF EL H:datatable - "unknown property"
Bug 193806 - "rendered" part of JSF <ui:fragment> tag seen as error
Comment 11 Marek Fukala 2011-10-31 15:54:42 UTC
*** Bug 201984 has been marked as a duplicate of this bug. ***
Comment 12 Marek Fukala 2011-10-31 15:54:49 UTC
*** Bug 193806 has been marked as a duplicate of this bug. ***
Comment 13 Marek Fukala 2011-11-10 14:34:52 UTC
JSF spec 3.1.12 Render-Independent Properties: RW: id, parent, rendered, rendererType, transient; RO:  rendersChildren

It seems that "class" property is also taken into account and copied into the resulting html encosing tag.
Comment 14 Marek Fukala 2011-11-10 14:55:15 UTC
fixed in web-main#bd35fcebffba
Comment 15 Marek Fukala 2011-11-11 12:02:20 UTC
added some additional fixes in web-main#7fab99b711c9
- composite components attributes error checking enabled
- code completion offers the generic attributes also in composite components
- added a simple help for the generic attributes
Comment 16 Quality Engineering 2011-11-11 15:35:48 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/bd35fcebffba
User: Marek Fukala <mfukala@netbeans.org>
Log: #202925 - default facelet component attributes "rendered" and "id" not properly handled by the editor
Comment 17 Quality Engineering 2011-11-12 16:28:41 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/7fab99b711c9
User: Marek Fukala <mfukala@netbeans.org>
Log: #202925 - some additional fixes