Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » EventHandlers : Java AND JavaScript on an object?
EventHandlers : Java AND JavaScript on an object? [message #548251] Wed, 21 July 2010 09:12 Go to next message
Robert Aust is currently offline Robert AustFriend
Messages: 17
Registered: July 2009
Junior Member
Hi there,

I've been experimenting with event handlers in script and java.
My intention was to use Java-Adapters for standard event handling in my
application [creation of application-specific context, logging etc.]
and ALSO to use script handlers for any special tasks, that I would
possible need in a report.

That does not seem to work, does it?

It seems that BIRT is executing the script when there is one defined and
is this case does NOT call the appropriate method in the registered java
handler on the object.
I'v tested that with report.beforeFactory : I have a ReportEventAdapter
set but as soon as I define an "beforeFactory"-Script this method is not
called anymore in my JavaHandler .. but the others are.

Is this intented? Why?
Wouldn't it be better to execute both in a defined [possible
configurable] sequence? E.g. first Java, then script..

Thanks for any feedback.
Robert
Re: EventHandlers : Java AND JavaScript on an object? [message #548670 is a reply to message #548251] Thu, 22 July 2010 15:28 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Robert,

As defined now the JavaScript event handlers take precedence. If you
define both for a particular event it will only run the JavaScript one.

Jason

On 7/21/2010 5:13 AM, Robert Aust wrote:
>
> Hi there,
>
> I've been experimenting with event handlers in script and java.
> My intention was to use Java-Adapters for standard event handling in my
> application [creation of application-specific context, logging etc.]
> and ALSO to use script handlers for any special tasks, that I would
> possible need in a report.
>
> That does not seem to work, does it?
>
> It seems that BIRT is executing the script when there is one defined and
> is this case does NOT call the appropriate method in the registered java
> handler on the object.
> I'v tested that with report.beforeFactory : I have a ReportEventAdapter
> set but as soon as I define an "beforeFactory"-Script this method is not
> called anymore in my JavaHandler .. but the others are.
>
> Is this intented? Why?
> Wouldn't it be better to execute both in a defined [possible
> configurable] sequence? E.g. first Java, then script..
>
> Thanks for any feedback.
> Robert
Previous Topic:The viewing session is not available or has expired.
Next Topic:Using SVG in a PDF report
Goto Forum:
  


Current Time: Fri Nov 28 01:53:21 GMT 2014

Powered by FUDForum. Page generated in 0.02408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software