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 131899 - Dropdown data binding problem with 6.0 project
Summary: Dropdown data binding problem with 6.0 project
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Winston Prakash
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2008-04-03 09:16 UTC by John Baker
Modified: 2008-04-16 09:35 UTC (History)
1 user (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 John Baker 2008-04-03 09:16:44 UTC
A roject's page has dropdown list bound to a dataprovider and binding looks fine in 6.0
However, in 6.1 this component doesn't appear to be bound

A user is developing a project in 6.0 and seems to either use Standard JSF comps or mix with Basic.

If I open the project in 6.0, the dropdown list binds correctly to the dataprovider (at least the binding looks ok in
the Designer)
However, if i open the same project in 6.1 then the dropdown doesn't appear to be bound.

Here is the link to the project, but don't expect it to run - there is some other error I'm looking into.
http://www.netbeans.org/nonav/issues/showattachment.cgi/59194/InsertUpdateDelete.zip
(attached to issue http://www.netbeans.org/issues/show_bug.cgi?id=131258)
Comment 1 Winston Prakash 2008-04-04 02:57:03 UTC
This is easy to reproduce.

- Create a 6.1 project
- Drag and drop a JSF standard drop down. Shows the databinding (abc dummy data is displayed)
- Look in the outline, you have
    - Dropdown1 & dropdown1selectitems
- Go to JSP page and add a space (for insync to re-parse the page)
- Go back to designer, the data binding is gone (no dummy data is displayed)
- Look in the outline, now you have only
     - Dropdown1 

dropdown1selectitems is not resurrected.

Assigning this to insync for further evaluation.

The problem is same with "binding property" and without "binding property"
Comment 2 Winston Prakash 2008-04-04 22:50:00 UTC
Forgot to reassign the bug.
Comment 3 _ sandipchitale 2008-04-05 22:04:16 UTC
Deva can you please have a look.
Comment 4 _ sandipchitale 2008-04-06 17:01:43 UTC
Winston, why does this happen for Standard component only. I don't think there is any special knowledge of Standard vs.
Woodstock drop down list Insync. Could this be a component bug?
Comment 5 _ sandipchitale 2008-04-06 17:08:33 UTC
Here how the binding looks like for standard drop down i.e. which is through a sub element:

                        <h:selectOneMenu id="dropdown1" style="position: absolute; left: 72px; top: 48px">
                            <f:selectItems id="dropdown1SelectItems" value="#{Page1.dropdown1DefaultItems}"/>
                        </h:selectOneMenu>

as opposed to for Woodstock:

                        <webuijsf:button id="button1" style="position: absolute; left: 96px; top: 120px" text="Button"/>

Is <f:selectItems> considered a JSF component? Could this be because we removed the binding= attribute in 6.1?
Comment 6 _ sandipchitale 2008-04-06 18:04:30 UTC
Looks like the element:

<f:selectItems id="dropdown1SelectItems" value="#{Page1.dropdown1DefaultItems}"/>

is being treated as an HtmlBean(?) due to:

    /**
     * Return the classname for a bean described by a source element iff it is our bean
     */
    public static final String getBeanClassname(Element e) {
        String ns = e.getNamespaceURI();
        :
            if (ns.equals(FacesPageUnit.URI_JSF_CORE))
                return PACKAGE + "F_" + cname;  // Faces core, use fake bean
        }
        :
    }
Comment 7 Jayashri Visvanathan 2008-04-06 18:05:03 UTC
Sandip,
  yes, f:selectItems is  standard tag. This tag allows you to bind to an array or list of SelectItem instances.
Comment 8 _ sandipchitale 2008-04-06 18:05:51 UTC
The beanInfo for org.netbeans.modules.visualweb.xhtml.F_SelectItems is not being found.
Comment 9 _ sandipchitale 2008-04-06 18:53:24 UTC
In the 6.0 time frame the

<f:selectItems id="dropdown1SelectItems" value="#{Page1.dropdown1DefaultItems}"/>

tag looked like:

<f:selectItems binding="#{Page1.dropdown1SelectItems}" id="dropdown1SelectItems" value="#{Page1.dropdown1DefaultItems}"/>

The type of dropdown1SelectItems property was UISelectItems which did have BeanInfo

org.netbeans.modules.visualweb.faces.dt_1_2.component.UISelectItemsBeanInfo

So may be we need to copy that BeanInfo to org.netbeans.modules.visualweb.xhtml.F_SelectItemsBeanInfo
Comment 10 Martin Schovanek 2008-04-07 15:59:58 UTC
Fixed in trunk by deva, see: 8412908d4538.
Comment 11 _ krystyna 2008-04-07 19:06:00 UTC
ok. verified this is fixed in trunk build 1511 (Build 20080407160956).
Tested standard dropdown in 1.4 and ee5 projects. After review and incorporating 
of any feedback, this fix can be integrated in 6.1 branch. Thanks.
Comment 12 _ krystyna 2008-04-08 07:32:46 UTC
Re-tested updated fix in hudson trunk build 1518 (20080408015310). Verified fixed. 
Comment 13 Martin Schovanek 2008-04-08 09:41:09 UTC
Fixed in trunk.
Comment 14 Martin Schovanek 2008-04-08 09:49:16 UTC
Please integrate it into release61 asap.
Comment 15 _ sandipchitale 2008-04-08 22:08:56 UTC
Changesets for release61 :

changeset:   77176:98c49c63206a
user:        deva@netbeans.org
date:        Sun Apr 06 18:16:16 2008 -0700
summary:     Fix for #131899: getComponentClass should ignore view and subview tags

changeset:   77177:5b99453b46b5
user:        deva@netbeans.org
date:        Sun Apr 06 18:21:29 2008 -0700
summary:     Fix for #131899: change to bindMarkupBeans first to look into tag lib uri

changeset:   77178:aee518ed5824
user:        deva@netbeans.org
date:        Mon Apr 07 16:45:17 2008 -0700
summary:     Additional fix for #131899
Comment 16 _ krystyna 2008-04-09 23:27:28 UTC
Verified fixed in RC1 NetBeans IDE Dev (Build 200804090901)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1