[JIRA] (JENKINS-57807) Stapler JS proxy not correctly created for classes implementing StaplerProxy

10 views
Skip to first unread message

ullrich.hafner@gmail.com (JIRA)

unread,
May 31, 2019, 6:23:02 PM5/31/19
to jenkinsc...@googlegroups.com
Ulli Hafner created an issue
 
Jenkins / Bug JENKINS-57807
Stapler JS proxy not correctly created for classes implementing StaplerProxy
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-05-31 22:22
Priority: Minor Minor
Reporter: Ulli Hafner

If a method of a Stapler model object *S* is annotated with @JavaScriptMethod then code to access this method using an Ajax call is automatically generated. If the model object implement StaplerProxy and thus delegates all UI logic to a new object *P* of a different class then the invocation of the @JavaScriptMethod (that is now part of the class *P) does not work anymore. In order to get this working again, one needs to add an additional empty method In the class **S* that is also marked with @JavaScriptMethod.

See [ChangeLog of warnings plugin 5.1.0](https://github.com/jenkinsci/warnings-ng-plugin/compare/warnings-ng-5.0.0...warnings-ng-5.1.0) for details.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ullrich.hafner@gmail.com (JIRA)

unread,
May 31, 2019, 6:23:02 PM5/31/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
Change By: Ulli Hafner
If a method of a Stapler model object * * S* * is annotated with {{@JavaScriptMethod}} then code to access this method using an Ajax call is automatically generated. If the model object implement {{StaplerProxy}} and thus delegates all UI logic to a new object * * P* * of a different class then the invocation of the {{@JavaScriptMethod}} (that is now part of the class * * P* * ) does not work anymore. In order to get this working again, one needs to add an additional empty method In the class * * S* * that is also marked with {{@JavaScriptMethod}}.

ullrich.hafner@gmail.com (JIRA)

unread,
May 31, 2019, 6:24:01 PM5/31/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
If a method of a Stapler model object *S* is annotated with {{@JavaScriptMethod}} then code to access this method using an Ajax call is automatically generated. If the model object implement {{StaplerProxy}} and thus delegates all UI logic to a new object *P* of a different class then the invocation of the {{@JavaScriptMethod}} (that is now part of the class *P*) does not work anymore. In order to get this working again, one needs to add an additional empty method with the same name in the class *S* that is also marked with {{@JavaScriptMethod}}.

See [ChangeLog of warnings plugin 5.1.0
]( | https://github.com/jenkinsci/warnings-ng-plugin/compare/warnings-ng-5.0.0...warnings-ng-5.1.0 ) ] for details.

ullrich.hafner@gmail.com (JIRA)

unread,
May 31, 2019, 6:24:02 PM5/31/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
If a method of a Stapler model object *S* is annotated with {{@JavaScriptMethod}} then code to access this method using an Ajax call is automatically generated. If the model object implement {{StaplerProxy}} and thus delegates all UI logic to a new object *P* of a different class then the invocation of the {{@JavaScriptMethod}} (that is now part of the class *P*) does not work anymore. In order to get this working again, one needs to add an additional empty method In with the same name in the class *S* that is also marked with {{@JavaScriptMethod}}.

See [ChangeLog of warnings plugin 5.1.0](https://github.com/jenkinsci/warnings-ng-plugin/compare/warnings-ng-5.0.0...warnings-ng-5.1.0) for details.

dbeck@cloudbees.com (JIRA)

unread,
Jun 13, 2019, 2:36:02 PM6/13/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages