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 245489 - [801cat] ajax listener rename failure
Summary: [801cat] ajax listener rename failure
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-08 14:18 UTC by muellermi
Modified: 2014-07-12 05:10 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 muellermi 2014-07-08 14:18:24 UTC
Product Version = NetBeans IDE Dev (Build 201407080001)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_05
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.5-b02

Given, a JSF page and a named bean "AdminTask"

<f:ajax render="@this" listener="#{adminTask.changeListener}"/>

now, in AdminTask, rename changeListerner to something else, e.g. "valueChangeListener"


expected:

<f:ajax render="@this" listener="#{adminTask.valueChangeListener}"/>

but its still unchanged

Renaming methods will affect the JSF page in other cases.
Comment 1 Vladimir Riha 2014-07-10 08:23:07 UTC
I cannot reproduce it (JSF 2.2), having bean like

@Named(value = "myBean")
@Dependent
public class MyBean {
    public MyBean() {}
    public void foo(){}
}


if I use the foo() in the listener attribute and then rename/refactor the method from the bean class, it is changed in the JSF page as well. However () is appended to the EL which I'm not sure is correct.

Does it happen in every project?


Product Version: NetBeans IDE Dev (Build 201407090001)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.13.0-30-generic running on i386; UTF-8; en_US (nb)
Comment 2 Martin Fousek 2014-07-10 09:01:17 UTC
(In reply to muellermi from comment #0)
> <f:ajax render="@this" listener="#{adminTask.changeListener}"/>
> now, in AdminTask, rename changeListerner to something else, e.g.
> "valueChangeListener"
> expected:
> <f:ajax render="@this" listener="#{adminTask.valueChangeListener}"/>
> but its still unchanged
> Renaming methods will affect the JSF page in other cases.

I'm able to reproduce that when the AdminTask accepts a FacesEvent like:
public void changeListener(AjaxBehaviorEvent event) {}
muellermi, please is that your case?


(In reply to Vladimir Riha from comment #1)
> However () is appended to the EL which I'm not sure is correct.

Actually that can bring issues in the project when somebody uses the Event subclass parameter as mentioned above. Vlado please can you raise an issue for that? The () shouldn't be appended there. Thanks a lot.
Comment 3 Vladimir Riha 2014-07-10 09:27:26 UTC
Sure, thanks. Issue 245540
Comment 4 Martin Fousek 2014-07-10 11:06:21 UTC
(In reply to Martin Fousek from comment #2)
> I'm able to reproduce that when the AdminTask accepts a FacesEvent like:
> public void changeListener(AjaxBehaviorEvent event) {}
> muellermi, please is that your case?

Confirmed by reporter over email.
Comment 5 Martin Fousek 2014-07-11 10:50:58 UTC
Should be fixed in web-main #ed451447a268.
Comment 6 Quality Engineering 2014-07-12 05:10:59 UTC
Integrated into 'main-silver', will be available in build *201407120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ed451447a268
User: Martin Fousek <marfous@netbeans.org>
Log: #245489 - [801cat] ajax listener rename failure