Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Maintaining POJOs in designer across previews(How to maintain application context containing java objects across previews)
Maintaining POJOs in designer across previews [message #831778] Thu, 29 March 2012 10:38 Go to next message
Rafi Shachar is currently offline Rafi ShacharFriend
Messages: 2
Registered: March 2012
Junior Member
Hi,

I have a rich Java API which I would like to use when generating reports. When using the report engine API I add my java objects to the application context. This way the I don't have to initialize the object every time I generate a report. Those java objects are initialized by a spring application context and as described in several posts we add the spring application context to the BIRT's application context.

When developing a report I would like to achieve the same functionality - initialize the POJOs once and access use them many times across report previews. Is there a way to achieve this in the Eclipse based designer? I'm using Eclipse 3.7.0.

Rafi

[Updated on: Fri, 30 March 2012 11:11]

Report message to a moderator

Re: Maintaining POJOs in designer across previews [message #832365 is a reply to message #831778] Fri, 30 March 2012 03:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

From the designer you could always try remoting. Take a look at the
third scenario in this article:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

Or

Use the org.eclipse.birt.report.viewer.appcontext extension point to
supply your own appcontext for the designer session. I have attached a
small plugin project that shows a very simplistic implementation. Take a
look at the screen shot to see what preference needs to be set in your
designer to use the plugin once you have it deployed to your designer.

Jason

On 3/29/2012 6:38 AM, Rafi Shachar wrote:
> Hi,
>
> I have a reach Java API which I would like to use when generating
> reports. When using the report engine API I add my java objects to the
> application context. This way the I don't have to initialize the object
> every time I generate a report. Those java objects are initialized by a
> spring application context and as described in several posts we add the
> spring application context to the BIRT's application context.
>
> When developing a report I would like to achieve the same functionality
> - initialize the POJOs once and access use them many times across report
> previews. Is there a way to achieve this in the Eclipse based designer?
> I'm using Eclipse 3.7.0.
> Rafi
Re: Maintaining POJOs in designer across previews [message #832368 is a reply to message #831778] Fri, 30 March 2012 03:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

From the designer you could always try remoting. Take a look at the
third scenario in this article:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

Or

Use the org.eclipse.birt.report.viewer.appcontext extension point to
supply your own appcontext for the designer session. I have attached a
small plugin project that shows a very simplistic implementation. Take a
look at the screen shot to see what preference needs to be set in your
designer to use the plugin once you have it deployed to your designer.

Jason

On 3/29/2012 6:38 AM, Rafi Shachar wrote:
> Hi,
>
> I have a reach Java API which I would like to use when generating
> reports. When using the report engine API I add my java objects to the
> application context. This way the I don't have to initialize the object
> every time I generate a report. Those java objects are initialized by a
> spring application context and as described in several posts we add the
> spring application context to the BIRT's application context.
>
> When developing a report I would like to achieve the same functionality
> - initialize the POJOs once and access use them many times across report
> previews. Is there a way to achieve this in the Eclipse based designer?
> I'm using Eclipse 3.7.0.
> Rafi
Re: Maintaining POJOs in designer across previews [message #832371 is a reply to message #831778] Fri, 30 March 2012 03:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

From the designer you could always try remoting. Take a look at the
third scenario in this article:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

Or

Use the org.eclipse.birt.report.viewer.appcontext extension point to
supply your own appcontext for the designer session. I have attached a
small plugin project that shows a very simplistic implementation. Take a
look at the screen shot to see what preference needs to be set in your
designer to use the plugin once you have it deployed to your designer.

Jason

On 3/29/2012 6:38 AM, Rafi Shachar wrote:
> Hi,
>
> I have a reach Java API which I would like to use when generating
> reports. When using the report engine API I add my java objects to the
> application context. This way the I don't have to initialize the object
> every time I generate a report. Those java objects are initialized by a
> spring application context and as described in several posts we add the
> spring application context to the BIRT's application context.
>
> When developing a report I would like to achieve the same functionality
> - initialize the POJOs once and access use them many times across report
> previews. Is there a way to achieve this in the Eclipse based designer?
> I'm using Eclipse 3.7.0.
> Rafi
Re: Maintaining POJOs in designer across previews [message #832375 is a reply to message #831778] Fri, 30 March 2012 03:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

From the designer you could always try remoting. Take a look at the
third scenario in this article:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

Or

Use the org.eclipse.birt.report.viewer.appcontext extension point to
supply your own appcontext for the designer session. I have attached a
small plugin project that shows a very simplistic implementation. Take a
look at the screen shot to see what preference needs to be set in your
designer to use the plugin once you have it deployed to your designer.

Jason

On 3/29/2012 6:38 AM, Rafi Shachar wrote:
> Hi,
>
> I have a reach Java API which I would like to use when generating
> reports. When using the report engine API I add my java objects to the
> application context. This way the I don't have to initialize the object
> every time I generate a report. Those java objects are initialized by a
> spring application context and as described in several posts we add the
> spring application context to the BIRT's application context.
>
> When developing a report I would like to achieve the same functionality
> - initialize the POJOs once and access use them many times across report
> previews. Is there a way to achieve this in the Eclipse based designer?
> I'm using Eclipse 3.7.0.
> Rafi
Re: Maintaining POJOs in designer across previews [message #832378 is a reply to message #831778] Fri, 30 March 2012 03:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

From the designer you could always try remoting. Take a look at the
third scenario in this article:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

Or

Use the org.eclipse.birt.report.viewer.appcontext extension point to
supply your own appcontext for the designer session. I have attached a
small plugin project that shows a very simplistic implementation. Take a
look at the screen shot to see what preference needs to be set in your
designer to use the plugin once you have it deployed to your designer.

Jason

On 3/29/2012 6:38 AM, Rafi Shachar wrote:
> Hi,
>
> I have a reach Java API which I would like to use when generating
> reports. When using the report engine API I add my java objects to the
> application context. This way the I don't have to initialize the object
> every time I generate a report. Those java objects are initialized by a
> spring application context and as described in several posts we add the
> spring application context to the BIRT's application context.
>
> When developing a report I would like to achieve the same functionality
> - initialize the POJOs once and access use them many times across report
> previews. Is there a way to achieve this in the Eclipse based designer?
> I'm using Eclipse 3.7.0.
> Rafi
Re: Maintaining POJOs in designer across previews [message #832633 is a reply to message #832365] Fri, 30 March 2012 11:34 Go to previous messageGo to next message
Rafi Shachar is currently offline Rafi ShacharFriend
Messages: 2
Registered: March 2012
Junior Member
Jason,

Appreciate your quick response.

I encountered your two proposed solutions in previous blogs you have wrote. The option to use remoting is valid but requires a lot of work. The option to use extension point seems simpler to me. I checked the preferences page and the section to set a custom application context is disabled. I have Eclipse 3.7.0 installed (see attached screen shot). Please advise.

Rafi
  • Attachment: pref.jpg
    (Size: 39.53KB, Downloaded 150 times)
Re: Maintaining POJOs in designer across previews [message #832929 is a reply to message #832633] Fri, 30 March 2012 18:47 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The box will be enabled once you create the plugin and deploy it to your
designer.

Jason

On 3/30/2012 7:34 AM, Rafi Shachar wrote:
> Jason,
>
> Appreciate your quick response.
>
> I encountered your two proposed solutions in previous blogs you have wrote. The option to use remoting is valid but requires a lot of work. The option to use extension point seems simpler to me. I checked the preferences page and the section to set a custom application context is disabled. I have Eclipse 3.7.0 installed (see attached screen shot). Please advise.
>
> Rafi
Previous Topic:What Render Options does the Report Designer use?
Next Topic:charts in BIRT reports
Goto Forum:
  


Current Time: Thu Oct 28 08:23:56 GMT 2021

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

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

Back to the top