Specifying a Page View dynamically

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

Specifying a Page View dynamically

Mee, Laurence
Specifying a Page View dynamically

Is there any way in which a page view can be specified dynamically?

The scenario is that we have an application which uses the same pipeline and processing, but requires different views - currently depending on the URL.

For example, we might use http://domain.com/ops/app to display the usual view (xhtml), but would use http://domain.com/ops/app?template=basic to display the 'basic' view (different xhtml). What further complicates things is that views could be added or removed dynamically so we wouldn't want to hard-code the view into the page-flow. We can store the view 'name' in the model when we first get it, and then not have to worry about having it on the URL. We had considered that the view 'name' would be the sub-folder name that held all the view files.

I think there are two problems here.
1. How to specify what 'view' to use when first accessing the application. We use a URL parameter but there might be a neater way to do this.

2. How to get the page flow to use the specified view.

Does anyone have any thoughts as to how we might be able to do this?

Laurence Mee
Product Manager - Information Solutions Consultancy
Intelligent Transport Systems
Atkins Highways and Transportation

Woodcote Grove, Ashley Road, EPSOM, KT18 5BW, UK.
Tel: +44 (0)1372 750000
Fax: +44 (0)1372 750000
E-mail: [hidden email]
www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Specifying a Page View dynamically

Ryan Puddephatt
Specifying a Page View dynamically
Laurence,
 
You can use matching to specify the page you want to go to, see http://www.orbeon.com/ops/doc/reference-page-flow#d6e1950 for more details, but essentially you create a regex to match on the pagename and use ${1} to put create the view
 
Hope this helps

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


From: Mee, Laurence [mailto:[hidden email]]
Sent: 17 October 2006 12:31
To: [hidden email]
Subject: [ops-users] Specifying a Page View dynamically

Is there any way in which a page view can be specified dynamically?

The scenario is that we have an application which uses the same pipeline and processing, but requires different views - currently depending on the URL.

For example, we might use http://domain.com/ops/app to display the usual view (xhtml), but would use http://domain.com/ops/app?template=basic to display the 'basic' view (different xhtml). What further complicates things is that views could be added or removed dynamically so we wouldn't want to hard-code the view into the page-flow. We can store the view 'name' in the model when we first get it, and then not have to worry about having it on the URL. We had considered that the view 'name' would be the sub-folder name that held all the view files.

I think there are two problems here.
1. How to specify what 'view' to use when first accessing the application. We use a URL parameter but there might be a neater way to do this.

2. How to get the page flow to use the specified view.

Does anyone have any thoughts as to how we might be able to do this?

Laurence Mee
Product Manager - Information Solutions Consultancy
Intelligent Transport Systems
Atkins Highways and Transportation

Woodcote Grove, Ashley Road, EPSOM, KT18 5BW, UK.
Tel: +44 (0)1372 750000
Fax: +44 (0)1372 750000
E-mail: [hidden email]
www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Specifying a Page View dynamically

Mee, Laurence
In reply to this post by Mee, Laurence
Specifying a Page View dynamically
Thanks Ryan.
 
I wasn't aware that this matching was available, but it's done what I need.
 
Regards,
Laurence.


From: Ryan Puddephatt [mailto:[hidden email]]
Sent: 17 October 2006 12:42
To: [hidden email]
Subject: RE: [ops-users] Specifying a Page View dynamically

Laurence,
 
You can use matching to specify the page you want to go to, see http://www.orbeon.com/ops/doc/reference-page-flow#d6e1950 for more details, but essentially you create a regex to match on the pagename and use ${1} to put create the view
 
Hope this helps

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


From: Mee, Laurence [mailto:[hidden email]]
Sent: 17 October 2006 12:31
To: [hidden email]
Subject: [ops-users] Specifying a Page View dynamically

Is there any way in which a page view can be specified dynamically?

The scenario is that we have an application which uses the same pipeline and processing, but requires different views - currently depending on the URL.

For example, we might use http://domain.com/ops/app to display the usual view (xhtml), but would use http://domain.com/ops/app?template=basic to display the 'basic' view (different xhtml). What further complicates things is that views could be added or removed dynamically so we wouldn't want to hard-code the view into the page-flow. We can store the view 'name' in the model when we first get it, and then not have to worry about having it on the URL. We had considered that the view 'name' would be the sub-folder name that held all the view files.

I think there are two problems here.
1. How to specify what 'view' to use when first accessing the application. We use a URL parameter but there might be a neater way to do this.

2. How to get the page flow to use the specified view.

Does anyone have any thoughts as to how we might be able to do this?

Laurence Mee
Product Manager - Information Solutions Consultancy
Intelligent Transport Systems
Atkins Highways and Transportation

Woodcote Grove, Ashley Road, EPSOM, KT18 5BW, UK.
Tel: +44 (0)1372 750000
Fax: +44 (0)1372 750000
E-mail: [hidden email]
www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



This message has been scanned for viruses by MailControl



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws