| Author |
Automatic "Back" link - Portal / WCM
|
|
|
| Hi all,
being new with Portal/WCM, I am working on a kind of "search" portlet for data-store.
It displays results and invite the user to clic one of them in order to view it. The thing is users cannot use the "previous" button on their browser which displays that the page has expired etc.
I would like to find an easy way to bring the user back to the "search page" with his last results list.
Is there an existing "back to previous state" tools I could use ?
many thanks
| |
|
| Finally I found something I think I was looking for :
<wps:portletBack>
The only thing is I was unable to use it.
let's admit I wrote something like :
<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %>
<%@ taglib uri="/WEB-INF/tld/engine.tld" prefix="wps" %>
<%@ page import="com.ibm.workplace.wcm.api.*" %>
<portletAPI:init/>
<div class="articleTitle">
<wps:portletBack>
<a href='<%=wpsPortletBackURL%>'>
<img border="0" align="absmiddle" src="<wps:urlFindInTheme file='img/picto_puce_title.gif'/>"></a>
</wps:portletBack>
</div>
which is quite close to the example given in the infoCenter
( Designing>Portal design reference>Tags used by the portal JSPs and then search on the page for "portletBack" )
The obvious error is the wpsPortletBackURL which simply comes from nowhere....InfoCenter does not says many things about this value and I wondered how to find out what's the relative value in my portlet...
The result I obtain with the lines above is simply nothing (empty space).
So I tried to print the <%=wpsPortletBackURL%> value and I logged on error on my stackTrace (Portlet is unavailable)
Trace :
Nested Exception is org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 48 in the jsp file:
/view/MyView.jsp
Generated servlet error:
view/_MyView.java:299: cannot resolve symbol
symbol : variable wpsPortletBackURL
location: class org.apache.jsp._MyView
out.print(wpsPortletBackURL);
^
1 error
Any ideas are very very welcome
| |
|
| oops my code seems to work here ^^'
here is what I wrote (if I do not mistake You only have to add <% < or </ when necessary)
@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %>
@ taglib uri="/WEB-INF/tld/engine.tld" prefix="wps" %>
@ page import="com.ibm.workplace.wcm.api.*" %>
portletAPI:init/>
div class="articleTitle">
wps:portletBack>
a href='=wpsPortletBackURL%>'>
img border="0" align="absmiddle" src="wps:urlFindInTheme file='img/picto_puce_title.gif'/>"><///a>
wps:portletBack>
div>
|
|
|
|