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 125897 - Dragging And Dropping JSP Get Property Tag From Palette Results in incorrect casing for properties using camel case
Summary: Dragging And Dropping JSP Get Property Tag From Palette Results in incorrect ...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Palette (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: pslechta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-24 02:00 UTC by dheffelfinger
Modified: 2008-03-27 13:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A simple project illustrating the issue (25.63 KB, application/octet-stream)
2008-01-24 02:01 UTC, dheffelfinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dheffelfinger 2008-01-24 02:00:08 UTC
After dropping "Get Bean Property" from the palette and selecting a bean from the Bean Name drop down, all properties
that use camel case in the bean are shown in all lower case. The generated tag also has the incorrect all lowercase
property. Deploying the application and navigating to the page containing the incorrect property name results in an
error 500.
Comment 1 dheffelfinger 2008-01-24 02:01:23 UTC
Created attachment 55470 [details]
A simple project illustrating the issue
Comment 2 pslechta 2008-03-26 09:26:22 UTC
I was able to reproduce this problem on NB 6.1 dev build. Project supplied by dheffelfinger and also newly created web
project confirmed the wrong behavior of customizing dialog for Get Bean Property palette item.

This may be serious issue because code generated by Get Bean Property palette item is wrong. Should not we change
priority of this issue?
Comment 3 Petr Jiricka 2008-03-26 09:56:25 UTC
The workaround is to correct the code in the editor after dragging. I think the priority is correct, according to the
priority guidelines:
http://qa.netbeans.org/bugzilla/bug_priority_guidelines.html

"Part of a product feature is affected, a viable workaround exists"
Comment 4 pslechta 2008-03-26 09:57:58 UTC
Root cause of the problem: class org.netbeans.modules.web.core.palette.JSPPaletteUtilities, method getTypeProperties:

private String extractPropName(String methodName, String[] prefix) {
    String res = "";
    for (int i = 0; i < prefix.length; i++) {
        String string = prefix[i];
        if (methodName.startsWith(string)) {
            res = methodName.substring(string.length()).toLowerCase();
            break;
        }
    }
    return res;
}

toLowerCase() call should not be there... only first character should be changed to lower case...
Comment 5 pslechta 2008-03-27 13:05:11 UTC
Fixed.

c4d1d6fe6c32