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 125245

Summary: Components with nontrivial rendered attributes are not shown in design view
Product: obsolete Reporter: cayhorstmann <cayhorstmann>
Component: visualwebAssignee: Winston Prakash <wjprakash>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description cayhorstmann 2008-01-14 22:05:59 UTC
I often have two component sets with complementary rendered attributes, for example

<webuijsf:panelGroup ... rendered="#{SessionBean1.lecture.currentTopic.imageId == null}">
  <webuijsf:button ... text="Add Image"/>
</webuijsf:panelGroup>
<webuijsf:panelGroup ... rendered="#{SessionBean1.lecture.currentTopic.imageId != null}">
  <webuijsf:image ... />
</webuijsf:panelGroup>
                            
Maybe this is not great design, but I don't think it is something that is commonly done, and it seems better than an
inflation of pages and fragments.

Apparently, you go through the admirable effort of evaluating the EL expression. But that is actually not helpful.
The page becomes hard to customize with the visual design tools because a part of it is not displayed. 

Suggestion: Show all components, and maybe gray out those that are conditionally rendered.  

In general, the design view should be "what you see is what you need". A "what you see is what you get" design view may
be nice for corporate types and demos, but it isn't so great for professional users.
Comment 1 Peter Zavadsky 2008-01-15 22:25:27 UTC
This seems to be a RFE.

Also this is additional information which would be needed to be provided by the component. Probably by the designtime
API, or some other way.
Passing to components first to evaluate. If OK'ed, the  designer needs to get an info which component should be grayed out.
Comment 2 jrcampins 2008-01-30 20:22:00 UTC
The problem doesn't happen when the rendered attribute is linked to a property of an object in the page bean, for
instance: rendered="#{Page1.someObj.someProperty}". This is a work-around we've been using since more than a year ago
with Java Studio Creator, and it still works with NetBeans. However, we look forward to have this problem solved, the
sonner the better. If graying the components causes too much trouble, please consider leaving that for a next release.
Comment 3 Jayashri Visvanathan 2008-01-31 18:56:05 UTC
This is a enhancement and I agree will be nice to have.
Comment 4 Winston Prakash 2008-02-01 20:49:17 UTC
I think this is an excellent enhancement to have. But current designtime does not support it.
We will take this in to consideration for post NB 6.1 release.