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 - Components with nontrivial rendered attributes are not shown in design view
Summary: Components with nontrivial rendered attributes are not shown in design view
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Winston Prakash
Depends on:
Reported: 2008-01-14 22:05 UTC by cayhorstmann
Modified: 2008-02-01 20:49 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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 ... rendered="#{SessionBean1.lecture.currentTopic.imageId != null}">
  <webuijsf:image ... />
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.