Re: Using Jivan in a Barracuda App

David R Robison <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
By the way... here is my code...

class RenderSitePageHandler extends DefaultBaseEventListener {
	public void handleViewEvent(ViewEventContext context) throws EventException,
ServletException, IOException {
		HttpServletRequest req = context.getRequest();

		//get the XMLC object
		JivanDOMFactory domFactory = new JivanDOMFactory();
			domFactory.setServletContext(context.getConfig().getServletContext());
		Document page = domFactory.getInstance("/WEB-INF/jivan/SitePage.html");

		//create a template component and render it
		Node node = page.getElementById("SiteForm");
		BTemplate templateComp = new BTemplate(new SiteModel(context));
		templateComp.setView(new DefaultTemplateView(node));
		try {templateComp.render(new DefaultViewContext(context));}
		catch (RenderException re) {logger.warn("Render err:"+re);}

		//now actually render the page 
		new DefaultDOMWriter().write(page, context.getResponse());
	}
}

David

Quoting David R Robison <[email protected]>:

> I'm trying to use Jivan in my Barracuda app. However, I think I'm
> doing
> something wrong. My app still seems to want some of the XMLC code. Also,
> my
> tables are not being generated correctly. Can anyone give me the steps
> neccessary to use Jivan instead of XMLC? 
> 
> Thanks in advance,
> David Robison
> 
> Ps. I'm useing the latest CVS version of Barracuda.
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.