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 102823 - BP Ajax Select Value Text field event handler MatchValue fails
Summary: BP Ajax Select Value Text field event handler MatchValue fails
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ deva
URL:
Keywords: REGRESSION
: 107499 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-27 20:03 UTC by Lark Fitzgerald
Modified: 2007-08-15 18:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IllegalArgumentException (4.21 KB, text/plain)
2007-04-27 20:05 UTC, Lark Fitzgerald
Details
Runtime Exception (29.95 KB, text/plain)
2007-04-27 20:14 UTC, Lark Fitzgerald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lark Fitzgerald 2007-04-27 20:03:59 UTC
Attempts to create a Match Handler event on the select value text field throws 
a:

java.lang.IllegalArgumentException: Type javax.faces.model.SelectItem[] cannot 
be found

Steps:
http://www.netbeans.org/kb/55/vwp-ajaxmapviewer.html

Condensed steps:
1. add ajax complib
2. add select value text field to designer
3. right click component and choose > Edit Event Handler > MatchValue from 
menu.

Exception occurs and method is not created.
Comment 1 Lark Fitzgerald 2007-04-27 20:05:59 UTC
Created attachment 41878 [details]
IllegalArgumentException
Comment 2 Lark Fitzgerald 2007-04-27 20:13:10 UTC
attached exception.  Note: this is Highly visible but user can workaround this 
designtime exception by copy/pasting the entire method from the tutorial into 
the java.  Unfortunately, when they deploy it will fail with a runtime 
exception on the selectValueTag.setProperties (attached).
Comment 3 Lark Fitzgerald 2007-04-27 20:14:13 UTC
Created attachment 41879 [details]
Runtime Exception
Comment 4 Winston Prakash 2007-04-27 20:24:55 UTC
Assigning this to Matt (our Ajax guy) for initial evaluation.
Comment 5 Lark Fitzgerald 2007-04-27 21:37:42 UTC
Removing J1_STOPPER keyword since this functionality is not required until FCS.
 Please note that this error occurs with EE4 and EE5 projects.
Comment 6 Lark Fitzgerald 2007-04-27 22:01:09 UTC
Downgrading to P2 (sample component). Marking as regression.
Comment 7 Matthew Bohm 2007-04-28 02:33:28 UTC
Accepting.
Comment 8 Joseph Silber 2007-05-03 12:34:06 UTC
release note added
Comment 9 Matthew Bohm 2007-06-25 22:05:27 UTC
I will have to try to reproduce the runtime error. I will likely have to pass the designtime error to the insync team.
Comment 10 Matthew Bohm 2007-06-25 22:59:52 UTC
*** Issue 107499 has been marked as a duplicate of this issue. ***
Comment 11 Matthew Bohm 2007-06-29 22:55:44 UTC
It appears that the runtime error occurs only if you do the workaround incorrectly. For instance:
- Drop a Select Value component.
- Add this to the backing bean:

    public SelectItem[] selectValue1_matchValue(FacesContext context, String value) {
        return new SelectItem[]{
            new SelectItem("cat", "cat"),
            new SelectItem("monkey", "monkey"),
            new SelectItem("llama", "llama")
        };
    }

- Deploy.

The runtime exception occurs.

- Now edit the JSP to hook up the itemsMethod property:

itemsMethod="#{Page1.selectValue1_matchValue}"

- Deploy.

Everything works as expected.

So I am passing this to the insync team for evaluation of the designtime error.
Comment 12 _ sandipchitale 2007-07-10 15:01:40 UTC
Deva, this looks like a issue with not handling the array type correctly? The TreeMakerUtils seems to be loading 
javax.faces.model.SelectItem[] (i.e. with []) as a type.
Comment 13 _ deva 2007-07-10 23:51:01 UTC
Caused because of not handling array types in TreeMakerUtils.createType()

Checking in TreeMakerUtils.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/java/TreeMakerUtils.java,v  <--  TreeMakerUtils.java
new revision: 1.5; previous revision: 1.4
Comment 14 Lark Fitzgerald 2007-08-15 18:08:44 UTC
Verified using:
Product Version: NetBeans 6 IDE Dev (Build 200708150000)
Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04 
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Woodstock 4.1: 200708141616

Ajax BluePrints: 0.1.2