You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ta...@jakarta.apache.org on 2005/03/08 21:54:28 UTC
[Jakarta Tapestry Wiki] Updated: Tapestry31Spring
Date: 2005-03-08T12:54:28
Editor: DannyMandel
Wiki: Jakarta Tapestry Wiki
Page: Tapestry31Spring
URL: http://wiki.apache.org/jakarta-tapestry/Tapestry31Spring
no comment
Change Log:
------------------------------------------------------------------------------
@@ -91,6 +91,40 @@
</listener>
}}}
+And let we try a simple XML file (name it under WEB-INF/applicationContext.xml).
+
+{{{
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+ <bean id="person" class="id.co.nincec.dymension.page.Person">
+ <property name="name">
+ <value>Nanda Firdausi</value>
+ </property>
+ </bean>
+</beans>
+}}}
+
+It defines one object with one property.
+
+Now time to see whether our bean can be accessed from Tapestry page. First, let we create the page specification (Home.page).
+
+{{{
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE page-specification PUBLIC
+ "-//Apache Software Foundation//Tapestry Specification 3.1//EN"
+ "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_1.dtd">
+
+<page-specification class="org.apache.tapestry.html.BasePage">
+ <inject property="inuyasha"
+ object="spring:person" />
+</page-specification>
+}}}
+
See, how easy to take Spring's bean managed into Tapestry page!! And so natural!!
The page template is trivial, one super-simple-example is like this (Home.html).
@@ -102,4 +136,4 @@
I wait for comment, suggestion, and any other things related to this simple tutorial.
----
-''This information was originally written in an email to the Tapestry User's List on March 7, 2005 by Nanda Firausi''
+''This information was originally written in an email to the Tapestry User's List on March 7, 2005 by Nanda Firdausi''
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org