|
Re: Firing JS event at end of RunTask? [message #244014 is a reply to message #243973] |
Thu, 21 June 2007 16:17 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Olaf,
The afterFactory is the correct location. How are you determining that
it is not being called.
If you use runandrender vs a run and then render the events are called
slightly different. Also initialize is always called for each phase.
Jason
Olaf Lenzmann wrote:
> Hi all,
>
> I am running and rendering reports in separate tasks and want to write
> some JS-code that sets a global persistent variable after running the
> report, before the document is saved (based on what other JS-handlers
> have gathered in onCreate() of their items). What would be the right
> hook to use? afterFactory() doesn't seem to get called by the RunTask
> and of the report item events, onCreate() is too early and onRender() is
> only called by the RenderTask.
>
> TIA,
>
> Olaf
>
>
|
|
|
Re: Firing JS event at end of RunTask? [message #244019 is a reply to message #244014] |
Thu, 21 June 2007 16:30 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Olaf,
There may be an issue with accessing variables from onRender.
I just logged a bugzilla entry.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=193782
Jason
Jason Weathersby wrote:
> Olaf,
>
> The afterFactory is the correct location. How are you determining that
> it is not being called.
>
> If you use runandrender vs a run and then render the events are called
> slightly different. Also initialize is always called for each phase.
>
> Jason
>
>
> Olaf Lenzmann wrote:
>> Hi all,
>>
>> I am running and rendering reports in separate tasks and want to write
>> some JS-code that sets a global persistent variable after running the
>> report, before the document is saved (based on what other JS-handlers
>> have gathered in onCreate() of their items). What would be the right
>> hook to use? afterFactory() doesn't seem to get called by the RunTask
>> and of the report item events, onCreate() is too early and onRender()
>> is only called by the RenderTask.
>>
>> TIA,
>>
>> Olaf
>>
>>
|
|
|
|
Re: Firing JS event at end of RunTask? [message #244157 is a reply to message #244019] |
Fri, 22 June 2007 06:40 |
No real name Messages: 23 Registered: July 2009 |
Junior Member |
|
|
Jason,
I have in my afterFactory()
reportContext.setPersistentGlobalVariable( "rating", new
Packages.java.lang.Long(3) )
and looking at the file that the run task creates, I cannot find the
variable stored.
The workaround I use now is to put the code into beforeClose() of my main
dataset and with this change, the global variable appears in the report
document.
Olaf
Jason Weathersby wrote:
> Olaf,
> There may be an issue with accessing variables from onRender.
> I just logged a bugzilla entry.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=193782
> Jason
> Jason Weathersby wrote:
>> Olaf,
>>
>> The afterFactory is the correct location. How are you determining that
>> it is not being called.
>>
>> If you use runandrender vs a run and then render the events are called
>> slightly different. Also initialize is always called for each phase.
>>
>> Jason
>>
>>
>> Olaf Lenzmann wrote:
>>> Hi all,
>>>
>>> I am running and rendering reports in separate tasks and want to write
>>> some JS-code that sets a global persistent variable after running the
>>> report, before the document is saved (based on what other JS-handlers
>>> have gathered in onCreate() of their items). What would be the right
>>> hook to use? afterFactory() doesn't seem to get called by the RunTask
>>> and of the report item events, onCreate() is too early and onRender()
>>> is only called by the RenderTask.
>>>
>>> TIA,
>>>
>>> Olaf
>>>
>>>
|
|
|
Re: Firing JS event at end of RunTask? [message #244346 is a reply to message #244157] |
Fri, 22 June 2007 15:57 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Olaf,
According to the bugzilla entry the report document is closed before the
afterfactory event. This is why it is not showing up.
Jason
Olaf Lenzmann wrote:
> Jason,
>
> I have in my afterFactory()
>
> reportContext.setPersistentGlobalVariable( "rating", new
> Packages.java.lang.Long(3) )
>
> and looking at the file that the run task creates, I cannot find the
> variable stored.
>
> The workaround I use now is to put the code into beforeClose() of my
> main dataset and with this change, the global variable appears in the
> report document.
>
> Olaf
>
>
> Jason Weathersby wrote:
>
>> Olaf,
>
>> There may be an issue with accessing variables from onRender.
>> I just logged a bugzilla entry.
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=193782
>
>> Jason
>
>> Jason Weathersby wrote:
>>> Olaf,
>>>
>>> The afterFactory is the correct location. How are you determining
>>> that it is not being called.
>>>
>>> If you use runandrender vs a run and then render the events are
>>> called slightly different. Also initialize is always called for each
>>> phase.
>>>
>>> Jason
>>>
>>>
>>> Olaf Lenzmann wrote:
>>>> Hi all,
>>>>
>>>> I am running and rendering reports in separate tasks and want to
>>>> write some JS-code that sets a global persistent variable after
>>>> running the report, before the document is saved (based on what
>>>> other JS-handlers have gathered in onCreate() of their items). What
>>>> would be the right hook to use? afterFactory() doesn't seem to get
>>>> called by the RunTask and of the report item events, onCreate() is
>>>> too early and onRender() is only called by the RenderTask.
>>>>
>>>> TIA,
>>>>
>>>> Olaf
>>>>
>>>>
>
>
|
|
|
Re: Firing JS event at end of RunTask? [message #244531 is a reply to message #244346] |
Mon, 25 June 2007 06:19 |
No real name Messages: 23 Registered: July 2009 |
Junior Member |
|
|
Jason,
I had not seen that in the entry - thanks.
Olaf
On 22.06.2007 17:57:50, Jason Weathersby wrote:
> Olaf,
>
> According to the bugzilla entry the report document is closed before the
> afterfactory event. This is why it is not showing up.
>
> Jason
>
> Olaf Lenzmann wrote:
>> Jason,
>>
>> I have in my afterFactory()
>>
>> reportContext.setPersistentGlobalVariable( "rating", new
>> Packages.java.lang.Long(3) )
>>
>> and looking at the file that the run task creates, I cannot find the
>> variable stored.
>>
>> The workaround I use now is to put the code into beforeClose() of my
>> main dataset and with this change, the global variable appears in the
>> report document.
>>
>> Olaf
>>
>>
>> Jason Weathersby wrote:
>>
>>> Olaf,
>>
>>> There may be an issue with accessing variables from onRender.
>>> I just logged a bugzilla entry.
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=193782
>>
>>> Jason
>>
>>> Jason Weathersby wrote:
>>>> Olaf,
>>>>
>>>> The afterFactory is the correct location. How are you determining
>>>> that it is not being called.
>>>>
>>>> If you use runandrender vs a run and then render the events are
>>>> called slightly different. Also initialize is always called for each
>>>> phase.
>>>>
>>>> Jason
>>>>
>>>>
>>>> Olaf Lenzmann wrote:
>>>>> Hi all,
>>>>>
>>>>> I am running and rendering reports in separate tasks and want to
>>>>> write some JS-code that sets a global persistent variable after
>>>>> running the report, before the document is saved (based on what
>>>>> other JS-handlers have gathered in onCreate() of their items). What
>>>>> would be the right hook to use? afterFactory() doesn't seem to get
>>>>> called by the RunTask and of the report item events, onCreate() is
>>>>> too early and onRender() is only called by the RenderTask.
>>>>>
>>>>> TIA,
>>>>>
>>>>> Olaf
>>>>>
>>>>>
>>
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04751 seconds