Hi Wilhem,

This is indeed not the easiest thing to do, because all the URL generation code is located in the wrapper as you have properly deducted yourself.

The appUniqueID = fieldIDStr + APP_ID_SEPARATOR + appIDStr

the FieldID you can retrieve, and the appID is available through the JahiaApplicationField.getObject method.

The jParams is the tricky part if you need a link to a portlet that's on another page. You will probably have to create a new ParamBean instance and then use the ParamBean.changePage method on it.

Regards,
 Serge Huber.

[EMAIL PROTECTED] wrote:

Hi!

I have to create some kind of shortcut links from Jahia pages to selected
pages of a portlet. I do have the original links like they are created from
the portlet, but to use them from a Jahia page I think I have to encode
them, the same way like Jahia's encodeURL-interceptor does?

Within my Jahia page, where I want to place the shortcut, I have tried to
instantiate somehow a ServletIncludeResponseWrapper

       ServletIncludeResponseWrapper responseWrapper = new
ServletIncludeResponseWrapper(
         response, "6921_31", "http://localhost:8080/jforum";, jParams,
true, "UTF-8");

-- (currently most params are harcoded, just try&error)


my questions are:

-- is this basically the correct way or is there some easier one?

-- how can I get rid of the hardcoded parameter values, in special I think
I would need a jParams of the target page that contains the porlet, and
also the appUniqueId of the portlet?


P.S. I would need these encoded links also to intergrate portlet content
with the Jahia search!


____

kind regards
Wilhelm Berger



Reply via email to