I'm not sure how the code you included would help with this problem
unless you know that whatever page is giving you this error is not
rendering content when there is no context.

> java.lang.RuntimeException
> Page Error did not generate any markup when rendered. This could be because
> its template file could not be located, or because a render phase method in
> the page prevented rendering

The error here tells you what the problem is, either it can't find the
template or your page is canceling the render phase. Since you say you
are doing a redirect, I'd guess you aren't trying to render content.
How are you trying to redirect? You should probably be returning one
of the objects described here:
http://tapestry.apache.org/tapestry5.1/guide/pagenav.html

Josh

On Fri, Jun 4, 2010 at 9:15 AM, Khalid EL BOUKHARI <elboukh...@gmail.com> wrote:
> Hi,
> I'm developing some unit tests. In my application I have a fake (not to be
> displayed) page that redirect me to a page with some form.
> The problem is that Tapestry returns an error page :
>
> java.lang.RuntimeException
> Page Error did not generate any markup when rendered. This could be because
> its template file could not be located, or because a render phase method in
> the page prevented rendering.
> Hide uninteresting stack frames Stack trace
>
>   - 
> org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:67)
>
>   - 
> $PageMarkupRenderer_129039e1ce0.renderPageMarkup($PageMarkupRenderer_129039e1ce0.java)
>
>   - 
> org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:61)
>
>   - 
> $PageResponseRenderer_129039e1ca3.renderPageResponse($PageResponseRenderer_129039e1ca3.java)
>
>   - 
> org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:63)
>
>
>
> Before that a was a problem with the context, so my solution was :
>
>        TestableRequest request =
> pageTester.getService(TestableRequest.class);
>        request.loadParameter("DATA", "tutu");
>
>        Assert.assertEquals(request.getParameter("DATA"), "tutu");
>
> In this URL (
> http://tapestry.apache.org/tapestry5.1/guide/unit-testing-pages.html)a found
> a solution :
>
>        Object[] context = new Object[]{ "abc", 123 };
>
>        Document doc = tester.invoke(new ComponentInvocation(new
> PageLinkTarget("MyPage"), context));
>
> But invoke method and ComonentInvocation are not recorgnized by Eclipse.
>
> Any Idea please?
> --
> KEB
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to