| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 17/11/2009 13:40:04
|
baek
User
Joined: 17/11/2009 12:53:49
Messages: 12
Location: Aalborg University, Denmark
Offline
|
We are interested in having different behaviour of components in infoglueDevlierWorking, infoglueDeliverLive, etc.
E.g. we have a "redirect" component, which redirects to another sitenode or external site. But when we have specified where the redirect should go to, the sitenode will actually do the redirection, and we don't have the possibility to change the redirect URL.
In infoglueDeliverWorking we want to have a page explaining where the redirect is going to, whereas infoglueDeliverLive of cause should do the actual redirect. In that way it should be possible to change the redirect URL.
Is there a way in jsp to check which context, we are in?
|
Lasse Bæk
AAU Portal Team
Aalborg University |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 17/11/2009 13:52:58
|
David
User
Joined: 10/11/2009 17:51:18
Messages: 25
Location: Université Lille 1, France
Offline
|
That should do the trick :
Context Path: <%=request.getContextPath()%>
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 18/11/2009 08:53:39
|
baek
User
Joined: 17/11/2009 12:53:49
Messages: 12
Location: Aalborg University, Denmark
Offline
|
Thanks, David!
Yep - that's an acceptable solution. I was thinking it could maybe be found through the page:pageContext/deliveryContext tags - maybe it would be a useful feature to add here...?
|
Lasse Bæk
AAU Portal Team
Aalborg University |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 18/11/2009 09:50:35
|
jaric
Admin
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 02/11/2009 10:09:03
Messages: 107
Location: Uppsala
Offline
|
I'm not sure if this is what you asked for, but I got his from Bogeblad once, when asking a similar question (my translation from Swedish):
pc.isInPageComponentMode tells you if you're in page building mode or not
pc.isDecorated tells you if EditOnSight is enabled
pc.operatingMode gives the deliver mode: 0 = working, 2=preview, 3=live
Where pc is declared with <page:pageContext id="pc"/>
|
Peter Jaric
Division for IT and Procurement
Uppsala University
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 18/11/2009 12:48:44
|
baek
User
Joined: 17/11/2009 12:53:49
Messages: 12
Location: Aalborg University, Denmark
Offline
|
Beautiful - that was exactly what I thought of!
|
Lasse Bæk
AAU Portal Team
Aalborg University |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 18/11/2009 12:52:43
|
jaric
Admin
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 02/11/2009 10:09:03
Messages: 107
Location: Uppsala
Offline
|
baek wrote:Beautiful - that was exactly what I thought of! 
Good!
Since the pc variable here is an instance of the interface TemplateController (and in reality of the class BasicTemplateController) all public getters from that interface are available for use in components, so there may be more interesting stuff there to look for.
|
Peter Jaric
Division for IT and Procurement
Uppsala University
|
|
|
 |
|
|