You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bayk <st...@gmx.net> on 2007/08/16 13:21:23 UTC

T5: Partial Page Rendering

Hi
I tried to perform a partial page refresh with tapestry5 and ajax... I used
the following code piece Kris Marinkovic postet on the mailing-list a month
ago... Everything works fine, except if I try to render a component, which
is not surrounded by a form-tag. Then it says: 

org.apache.tapestry.ioc.internal.util.TapestryException: No object of type
org.apache.tapestry.services.FormSupport is available from the Environment. 
Available types are org.apache.tapestry.MarkupWriter,
org.apache.tapestry.PageRenderSupport,
org.apache.tapestry.ValidationDecorator, org.apache.tapestry.dom.Document,
org.apache.tapestry.internal.services.DocumentScriptBuilder,
org.apache.tapestry.services.Heartbeat. 


The code of the component looks like that:

....
// to retrieve page instances
	@Inject
	private RequestPageCache _cache;
	// returns markupwriter
	@Inject
	private MarkupWriterFactory _mwf;
	// sets the environment
	@Inject
	private PageRenderInitializer initializer;

	public Object onActionFromUpdateLink()
	{
		MarkupWriter markupWriter = _mwf.newMarkupWriter();

		initializer.setup(markupWriter);

		Page page = _cache.get(pageName);
		ComponentPageElement element = page.getRootElement();
		for(String id : elementId)
			element = element.getEmbeddedElement(id);

		RenderQueueImpl queue = new RenderQueueImpl(page.getLog());
		queue.push(element);
		queue.run(markupWriter);

		initializer.cleanup(markupWriter);

		return new TextStreamResponse("text/html", markupWriter.toString());
	}
....

There has to be an easy solution to that problem, but I just dont get it...

Regards, 
Klaus
-- 
View this message in context: http://www.nabble.com/T5%3A-Partial-Page-Rendering-tf4278997.html#a12179365
Sent from the Tapestry - User mailing list archive at Nabble.com.


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