Skip to main content



      Home
Home » Archived » BIRT » EventHandlers : Java AND JavaScript on an object?
EventHandlers : Java AND JavaScript on an object? [message #548251] Wed, 21 July 2010 05:12 Go to next message
Eclipse UserFriend
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 11:28 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 12:48:35 EDT 2025

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

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

Back to the top