HTML生成库 renderSnake
jopen
13年前
<p><a href="/misc/goto?guid=4959499572233545936"><img title="HTML生成库 renderSnake" border="0" alt="HTML生成库 renderSnake" src="https://simg.open-open.com/show/f89a13be7539920164d61f827acf5fe9.jpg" width="42" height="55" /> </a><br /> <strong>RenderSnake</strong> 是一个轻量级的Java类库用来通过Java方法生产html页面,包含4个核心类库:</p> <ul> <li><strong>HtmlCanvas</strong> , a class that has methods for all HTML 4.01 and HTML5 tags for opening and closing it</li> <li><strong>HtmlAttributes</strong>, a class that has methods for all existing HTML attributes for setting an attribute value</li> <li><strong>Renderable</strong>, a interface that is used to create component classes. Each component must implement the method renderOn(HtmlCanvas)</li> <li><strong>PageContext</strong>, a Map-like object to store any information that is used for rendering a Page.</li> </ul> <p>示例代码:</p> <pre>canvas.html() .body() .h1().write("RenderSnake")._h1() ._body() ._html()</pre> <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1324395042280" target="_blank">http://www.open-open.com/lib/view/home/1324395042280</a></p>