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.
Created attachment 140537 [details] see the warning left messages/icons Hi! In JSF composite components, if receive an Object (with more fields) as a cc:attribute and I try to access its fields in cc:implementation, NetBeans says "unknown property". I am aware that JSF doesn't actually know what kind of object I am going to set into my component's cc:attribut, but NetBeans shouldn't say "unknown property" because that's not true neither. The property exists, but NB doesn't know the class, therefore it would be better if NB doesn't say anything. It would be even better if NB detected what object is passed into that component's parameter, then it could offer autocompletion. See the attached image for more insights. NetBeans 7.4 RC 1 Thank you.
Can you use type attribute in your case? If so, the warning goes away and you get also code completion for the object, e.g.: <cc:attribute name="item" required="true" type="org.test.ItemBean"/>
I'm receiving an entity (POJO) of com.pingushare.entity.p1.Trade in that component. Setting it as type="com.pingushare.entity.p1.Trade" doesn't seem to make any difference. Moreover, there are some places where I receive different types of entities in the same component paramenter, so, even though this type worked, I couldn't specify a specific entity because I'm receiving more. Interfaces might be useful in this case, but it doesn't make sense to start creating interfaces for all slightly common fields of some entities, when they're not actually so related nor necessary in Java code, just for the sake of JSF.
I see, thank you for trying.
You are right, it can be annoying to see these false warnings. Ok, I fixed it in that way that if you will specify type of the attribute, properties will be checked whether they are valid or not. If you have no class attribute in the interface clause no warnings should appear. Thanks a lot for reporting. Fixed in web-main #5d9f87134868. Do you guys think that it should be candidate for the nb7.4 patch? I have unit tests around that functionality so the change should be safe.
Great! Thank you also. Please put it in 7.4, otherwise we'll wait too long until a new release. It doesn't make sense to wait if you already have everything necessary. Thanks again.
(In reply to Martin Fousek from comment #4) > Do you guys think that it should be candidate for the nb7.4 patch? I have > unit tests around that functionality so the change should be safe. No objections from me :) Adding proper SW for 7.4patch. @zmirc: Unfortunately it is too late for 7.4 but it is now a patch candidate so you won't have to wait for new release, only for patch (there is no ETA yet though)
Reopening after offline discussion, hint need to follow type not class attribute for resolving attribute type. But with class it behaves as it described ;)
(In reply to Vladimir Riha from comment #7) > Reopening after offline discussion, hint need to follow type not class > attribute for resolving attribute type. But with class it behaves as it > described ;) Thanks for catching that, Vlado! Should be fixed in web-main #0357ce1d1da4.
Thank you, verified Product Version: NetBeans IDE Dev (Build 201311080001) 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: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
(In reply to Vladimir Riha from comment #9) > Thank you, verified That was fast, thanks!
Transplanted into release74 as: changeset: 275307:3f304b7cf8e5 branch: release74 summary: #236449 - Unknown property in JSF composite component implementation changeset: 275308:142f694beb2b branch: release74 summary: Long description update changeset: 275309:432627e45495 branch: release74 summary: #236450 - Unknown property in JSF composite component implementation changeset: 275310:0e99c69fa507 branch: release74 summary: Increased spec. version, long description update
verified in patch Product Version: NetBeans IDE 7.4 (Build 201310111528) Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1 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: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)