On 29.11.2007, at 11:02, Ulrich Stärk wrote:
These are just guesses, I haven't tried them nor verified them.
I could imagine that the parameter isn't available via the
WebRequest because the page didn't get called by a GET request
directly but with the help of the service encoder, so your
parameter isn't there anymore when the page get's rendered. Try to
get hold of the IRequestCycle by calling getRequestCycle() and call
getParameter on it. I wouldn't be surprised if it's in there.
Hi Uli,
That was it! It turns out that the
@InjectObject("infrastructure:request")
public abstract WebRequest getRequest();
is not needed anymore with this solution.
Thanks a lot for the help,
Kaspar
P.S. For the sake of completeness, here is the complete
solution -- in case somebody else needs it.
public abstract class MyPage extends BasePage
implements PageBeginRenderListener {
public void pageBeginRender(PageEvent event)
{
super.pageBeginRender(event);
// find out the node we're suppost to show
IRequestCycle cycle = getRequestCycle();
String myParam = cycle.getParameter("myParam");
}
// ...
}
public class KCNodeServiceEncoder implements ServiceEncoder {
// ...
public void decode(ServiceEncoding encoding)
{
// ... (get parameter value from URL)
encoding.setParameterValue("myParam", value);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]