More dynamic file paths in Page Flow Controller

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

More dynamic file paths in Page Flow Controller

Ethan Gruber
Hi all,

I have an issue that I believe has multiple solutions, and I am looking for the simplest one. I have an application with two separate projects that use most of the underlying code, but will have stylistic differences: different CSS/JS files and logos. These UI files would ideally be stored elsewhere in the filesystem.

I have the following idea:

<files path="/myapp/project1/javascript/.+\.js"/>
<files path="/myapp/project2/javascript/.+\.js"/>

I would like to implement some sort of aliasing where the first path links to file:///projects/project1/javascript/{$1}.js and the second is file:///projects/project2/javascript/{$2}.js

Is it possible to do this in Orbeon? It appears that the <files> in the PFC doesn't allow this sort of complexity. My other alternative is to implement a themes folder in oxf:/apps which contains a bunch of symlinks and introduce a 'theme' into each project's configuration files. It's not a terrible solution, but a little more complicated.

Thanks,
Ethan

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: More dynamic file paths in Page Flow Controller

Erik Bruchez
Administrator
Ethan,

Unlike the <page> and <service> elements which support using the regexp groups, as in:

    <page path="/([^/]+)/.*" model="apps/${1}/page-flow.xml" public-methods="#all"/>

the <files> element doesn't support this. It wouldn't be terribly hard to do probably around here:

    http://goo.gl/EUYvQj

But it's not a feature yet.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: More dynamic file paths in Page Flow Controller

Ethan Gruber
Hi Erik,

Thanks for the info. In the meantime, I implemented a theme system (more painless than I predicted), but I do think using regexp groups for files is the best way to go in the long term. I'll dig deeper into this.

Ethan

On Wednesday, October 1, 2014 6:02:15 PM UTC-4, ebruchez wrote:
Ethan,

Unlike the <page> and <service> elements which support using the regexp
groups, as in:

    <page path="/([^/]+)/.*" model="apps/${1}/page-flow.xml"
public-methods="#all"/>

the <files> element doesn't support this. It wouldn't be terribly hard to do
probably around here:

    <a href="http://goo.gl/EUYvQj" target="_blank" onmousedown="this.href='http://goo.gl/EUYvQj';return true;" onclick="this.href='http://goo.gl/EUYvQj';return true;">http://goo.gl/EUYvQj

But it's not a feature yet.

-Erik

--
View this message in context: <a href="http://discuss.orbeon.com/More-dynamic-file-paths-in-Page-Flow-Controller-tp4659052p4659064.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FMore-dynamic-file-paths-in-Page-Flow-Controller-tp4659052p4659064.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFUHKX5X9Kc_zsV0upTQe0cLsC65g';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2FMore-dynamic-file-paths-in-Page-Flow-Controller-tp4659052p4659064.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFUHKX5X9Kc_zsV0upTQe0cLsC65g';return true;">http://discuss.orbeon.com/More-dynamic-file-paths-in-Page-Flow-Controller-tp4659052p4659064.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].