Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Linked CSS styles and relative path
Linked CSS styles and relative path [message #256480] Thu, 27 September 2007 18:40 Go to next message
Jeff Ramsdale is currently offline Jeff RamsdaleFriend
Messages: 122
Registered: July 2009
Senior Member
I'm using linked CSS as described in the Styles Revisited post on BIRT
World. Works great in the report designer. When I try to run my report,
though, my styles disappear.

I gather from this thread:
< http://dev.eclipse.org/newslists/news.eclipse.birt/msg20240. html> that
I need to set the resource path for the engine config. The sample code
provided from Jason uses an absolute path, though, and my CSS file and
report are embedded in an Eclipse plugin.

Can I use a relative path here? (And relative to what?) Or a platform
URL or some-such? I'm having trouble finding where to put a breakpoint
to figure out how the path is evaluated.

Jeff
Re: Linked CSS styles and relative path [message #256571 is a reply to message #256480] Fri, 28 September 2007 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Jeff,

Are you using the WebViewer or the engine API?
If you are using the Web Viewer look at the web.xml there is a setting
for resource path, which can be set relative to the context. If you are
using the engine API you should be able to set to wherever you want.

Jason

Jeff Ramsdale wrote:
> I'm using linked CSS as described in the Styles Revisited post on BIRT
> World. Works great in the report designer. When I try to run my report,
> though, my styles disappear.
>
> I gather from this thread:
> < http://dev.eclipse.org/newslists/news.eclipse.birt/msg20240. html> that
> I need to set the resource path for the engine config. The sample code
> provided from Jason uses an absolute path, though, and my CSS file and
> report are embedded in an Eclipse plugin.
>
> Can I use a relative path here? (And relative to what?) Or a platform
> URL or some-such? I'm having trouble finding where to put a breakpoint
> to figure out how the path is evaluated.
>
> Jeff
Re: Linked CSS styles and relative path [message #256578 is a reply to message #256571] Fri, 28 September 2007 15:46 Go to previous messageGo to next message
Jeff Ramsdale is currently offline Jeff RamsdaleFriend
Messages: 122
Registered: July 2009
Senior Member
Jason,

I'm using the engine API. Since my styles don't show up but neither do I
get any exceptions I'm wondering where the path gets resolved and how I
determine why it didn't work. For instance, if I use a relative path how
do I tell what it's resolved against?

Jeff

Jason Weathersby wrote:
> Jeff,
>
> Are you using the WebViewer or the engine API?
> If you are using the Web Viewer look at the web.xml there is a setting
> for resource path, which can be set relative to the context. If you are
> using the engine API you should be able to set to wherever you want.
>
> Jason
>
> Jeff Ramsdale wrote:
>> I'm using linked CSS as described in the Styles Revisited post on BIRT
>> World. Works great in the report designer. When I try to run my
>> report, though, my styles disappear.
>>
>> I gather from this thread:
>> < http://dev.eclipse.org/newslists/news.eclipse.birt/msg20240. html>
>> that I need to set the resource path for the engine config. The sample
>> code provided from Jason uses an absolute path, though, and my CSS
>> file and report are embedded in an Eclipse plugin.
>>
>> Can I use a relative path here? (And relative to what?) Or a platform
>> URL or some-such? I'm having trouble finding where to put a breakpoint
>> to figure out how the path is evaluated.
>>
>> Jeff
Re: Linked CSS styles and relative path [message #256602 is a reply to message #256578] Fri, 28 September 2007 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Jeff,

If your resources are in a plugin, can you use something like:

Bundle bundle =
org.eclipse.core.runtime.Platform.getBundle("my.resource.plugin ");
config.setResourcePath(config.bundle.getEntry("pathinplugin "));

Jason

Jeff Ramsdale wrote:
> Jason,
>
> I'm using the engine API. Since my styles don't show up but neither do I
> get any exceptions I'm wondering where the path gets resolved and how I
> determine why it didn't work. For instance, if I use a relative path how
> do I tell what it's resolved against?
>
> Jeff
>
> Jason Weathersby wrote:
>> Jeff,
>>
>> Are you using the WebViewer or the engine API?
>> If you are using the Web Viewer look at the web.xml there is a setting
>> for resource path, which can be set relative to the context. If you
>> are using the engine API you should be able to set to wherever you want.
>>
>> Jason
>>
>> Jeff Ramsdale wrote:
>>> I'm using linked CSS as described in the Styles Revisited post on
>>> BIRT World. Works great in the report designer. When I try to run my
>>> report, though, my styles disappear.
>>>
>>> I gather from this thread:
>>> < http://dev.eclipse.org/newslists/news.eclipse.birt/msg20240. html>
>>> that I need to set the resource path for the engine config. The
>>> sample code provided from Jason uses an absolute path, though, and my
>>> CSS file and report are embedded in an Eclipse plugin.
>>>
>>> Can I use a relative path here? (And relative to what?) Or a platform
>>> URL or some-such? I'm having trouble finding where to put a
>>> breakpoint to figure out how the path is evaluated.
>>>
>>> Jeff
Re: Linked CSS styles and relative path [message #256606 is a reply to message #256602] Fri, 28 September 2007 17:27 Go to previous message
Jeff Ramsdale is currently offline Jeff RamsdaleFriend
Messages: 122
Registered: July 2009
Senior Member
Huh. I was pretty certain I'd tried that, unsuccessfully. Tried again,
though and worked perfectly! (Minor correction--you get a URL from
getEntry and have to do toExternalForm()...)

Thanks!

-Jeff

Jason Weathersby wrote:
> Jeff,
>
> If your resources are in a plugin, can you use something like:
>
> Bundle bundle =
> org.eclipse.core.runtime.Platform.getBundle("my.resource.plugin ");
> config.setResourcePath(config.bundle.getEntry("pathinplugin "));
>
> Jason
>
> Jeff Ramsdale wrote:
>> Jason,
>>
>> I'm using the engine API. Since my styles don't show up but neither do
>> I get any exceptions I'm wondering where the path gets resolved and
>> how I determine why it didn't work. For instance, if I use a relative
>> path how do I tell what it's resolved against?
>>
>> Jeff
Previous Topic:Websphere Memory utilization is HIGH (URGENT)
Next Topic:QT4 and Birt
Goto Forum:
  


Current Time: Wed Jul 17 15:51:37 GMT 2024

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

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

Back to the top