You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2007/05/24 13:36:47 UTC

svn commit: r541272 - in /myfaces/orchestra/trunk/core/src/site/xdoc: bestPractice.xml conversationManagement.xml installation.xml

Author: imario
Date: Thu May 24 04:36:46 2007
New Revision: 541272

URL: http://svn.apache.org/viewvc?view=rev&rev=541272
Log:
added link to article about conmponent-binding, layout fixes

Modified:
    myfaces/orchestra/trunk/core/src/site/xdoc/bestPractice.xml
    myfaces/orchestra/trunk/core/src/site/xdoc/conversationManagement.xml
    myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml

Modified: myfaces/orchestra/trunk/core/src/site/xdoc/bestPractice.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/site/xdoc/bestPractice.xml?view=diff&rev=541272&r1=541271&r2=541272
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/bestPractice.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/bestPractice.xml Thu May 24 04:36:46 2007
@@ -30,6 +30,15 @@
 				already are under a different conversation scope when assigned!
 				</p>
 
+			<subsection name="Component bindings">
+				<p>
+				Read something about <a href="component-bindings.html">component binding and the scoping problem</a>.
+				</p>
+				<p>
+					This document is not related to Apache MyFaces Orchestra. It's a good reading for every JSF developer.
+				</p>
+			</subsection>
+
 			<subsection name="Single Page Conversation">
 
 				<p>

Modified: myfaces/orchestra/trunk/core/src/site/xdoc/conversationManagement.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/site/xdoc/conversationManagement.xml?view=diff&rev=541272&r1=541271&r2=541272
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/conversationManagement.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/conversationManagement.xml Thu May 24 04:36:46 2007
@@ -110,13 +110,13 @@
 					if you would like to have your new bean returned.
 				</p>
 				<p>
-					A good patter might be:
+					A good pattern might be:
 					<pre>
 public void invalidateAndRestart()
 {
     YouBean bean = (YourBean)
         ConversationUtils.invalidateAndRestart(Conversation.getCurrentInstance());
-    bean.setRestartedUser(createdUser.getId());
+    bean.setUser(createdUser.getId());
 }
 					</pre>
 

Modified: myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml?view=diff&rev=541272&r1=541271&r2=541272
==============================================================================
--- myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml (original)
+++ myfaces/orchestra/trunk/core/src/site/xdoc/installation.xml Thu May 24 04:36:46 2007
@@ -55,74 +55,76 @@
 					name applicationContext.xml. This can be configured, just have a look at
 					the Spring documentation.
 				</p>
-				<pre>&lt;?xml version="1.0" encoding="UTF-8"?&lt;
+				<pre>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 
-					&lt;beans xmlns="http://www.springframework.org/schema/beans"
-					xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-					xmlns:tx="http://www.springframework.org/schema/tx"
-					xmlns:aop="http://www.springframework.org/schema/aop"
-					xsi:schemaLocation="
-					http://www.springframework.org/schema/beans
-					http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-					http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
-					http://www.springframework.org/schema/aop
-					http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&gt;
-
-					&lt;!-- 1. the conversation scope --&gt;
-					&lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
-					&lt;property name="scopes"&gt;
-					&lt;map&gt;
-					&lt;entry key="conversation"&gt;
+	&lt;beans xmlns="http://www.springframework.org/schema/beans"
+		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		xmlns:tx="http://www.springframework.org/schema/tx"
+		xmlns:aop="http://www.springframework.org/schema/aop"
+		xsi:schemaLocation="
+		http://www.springframework.org/schema/beans
+		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
+		http://www.springframework.org/schema/aop
+		http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&gt;
+
+	&lt;!-- 1. the conversation scope --&gt;
+	&lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;
+		&lt;property name="scopes"&gt;
+			&lt;map&gt;
+				&lt;entry key="conversation"&gt;
 					&lt;bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope"&gt;
-					&lt;property name="advices"&gt;
-					&lt;list&gt;
-					&lt;ref bean="persistentContextConversationInterceptor"/&gt;
-					&lt;/list&gt;
-					&lt;/property&gt;
-					&lt;/bean&gt;
-					&lt;/entry&gt;
-					&lt;/map&gt;
-					&lt;/property&gt;
-					&lt;/bean&gt;
-
-					&lt;!-- 2. the "entitiy manager" manager --&gt;
-					&lt;bean id="persistentContextConversationInterceptor"
-					class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor"&gt;
-					&lt;property name="persistenceContextFactory" ref="persistentContextFactory"/&gt;
-					&lt;/bean&gt;
-
-					&lt;!-- 3. conversation - persistence adapter --&gt;
-					&lt;bean id="persistentContextFactory"
-					class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory"&gt;
-					&lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
-					&lt;/bean&gt;
+						&lt;property name="advices"&gt;
+							&lt;list&gt;
+								&lt;ref bean="persistentContextConversationInterceptor"/&gt;
+							&lt;/list&gt;
+						&lt;/property&gt;
+					&lt;/bean&gt;
+				&lt;/entry&gt;
+			&lt;/map&gt;
+		&lt;/property&gt;
+	&lt;/bean&gt;
+
+	&lt;!-- 2. the "entitiy manager" manager --&gt;
+		&lt;bean id="persistentContextConversationInterceptor"
+			class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor"&gt;
+		&lt;property name="persistenceContextFactory" ref="persistentContextFactory"/&gt;
+	&lt;/bean&gt;
+
+	&lt;!-- 3. conversation - persistence adapter --&gt;
+		&lt;bean id="persistentContextFactory"
+			class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory"&gt;
+		&lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
+	&lt;/bean&gt;
+
+	&lt;!-- 4. persistence --&gt;
+	&lt;bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/&gt;
+
+	&lt;tx:annotation-driven /&gt;
+
+	&lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
+		&lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
+	&lt;/bean&gt;
+
+	&lt;bean id="entityManagerFactory"
+		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
+		&lt;property name="jpaProperties"&gt;
+			&lt;props&gt;
+				&lt;prop key="toplink.logging.level"&lt;FINE&lt;/prop&gt;
+				&lt;prop key="toplink.jdbc.driver"&lt;org.apache.derby.jdbc.EmbeddedDriver&lt;/prop&gt;
+				&lt;prop key="toplink.jdbc.url"&lt;jdbc:derby:myfacesOrchestraDB;create=true&lt;/prop&gt;
+				&lt;prop key="toplink.jdbc.user"&lt;sa&lt;/prop&gt;
+				&lt;prop key="toplink.jdbc.password"&lt;foobar&lt;/prop&gt;
+				&lt;prop key="toplink.target-database"&lt;oracle.toplink.essentials.platform.database.DerbyPlatform&lt;/prop&gt;
+				&lt;prop key="toplink.ddl-generation"&lt;create-tables&lt;/prop&gt;
+			&lt;/props&gt;
+		&lt;/property&gt;
+		&lt;property name="persistenceUnitName" value="default"/&gt;
+	&lt;/bean&gt;
 
-					&lt;!-- 4. persistence --&gt;
-					&lt;bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/&gt;
-
-					&lt;tx:annotation-driven /&gt;
-
-					&lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
-					&lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
-					&lt;/bean&gt;
-
-					&lt;bean id="entityManagerFactory"
-					class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
-					&lt;property name="jpaProperties"&gt;
-					&lt;props&gt;
-					&lt;prop key="toplink.logging.level"&lt;FINE&lt;/prop&gt;
-					&lt;prop key="toplink.jdbc.driver"&lt;org.apache.derby.jdbc.EmbeddedDriver&lt;/prop&gt;
-					&lt;prop key="toplink.jdbc.url"&lt;jdbc:derby:myfacesOrchestraDB;create=true&lt;/prop&gt;
-					&lt;prop key="toplink.jdbc.user"&lt;sa&lt;/prop&gt;
-					&lt;prop key="toplink.jdbc.password"&lt;foobar&lt;/prop&gt;
-					&lt;prop key="toplink.target-database"&lt;oracle.toplink.essentials.platform.database.DerbyPlatform&lt;/prop&gt;
-					&lt;prop key="toplink.ddl-generation"&lt;create-tables&lt;/prop&gt;
-					&lt;/props&gt;
-					&lt;/property&gt;
-					&lt;property name="persistenceUnitName" value="default"/&gt;
-					&lt;/bean&gt;
-
-					&lt;/beans&gt;</pre>
+&lt;/beans&gt;
+				</pre>
 				<p>Ok, this might look a little bit much for the start of
 					an installation guide, though, its not that complicated. So, head up, lets
 					go through this configuration step by step.
@@ -194,33 +196,35 @@
 					<li>The Apache MyFaces Orchestra RequestParameterServletFilter</li>
 				</ul>
 				<p>So this looks like:</p>
-				<pre>	&lt;listener&gt;
-					&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
-					&lt;/listener&gt;
-					&lt;listener&gt;
-					&lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
-					&lt;/listener&gt;</pre>
+				<pre>
+&lt;listener&gt;
+	&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
+&lt;/listener&gt;
+&lt;listener&gt;
+	&lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
+&lt;/listener&gt;
+				</pre>
 				<p>and</p>
 				<pre>
-					&lt;filter&gt;
-					&lt;filter-name&gt;orchestraFilter&lt;/filter-name&gt;
-					&lt;filter-class&gt;org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter&lt;/filter-class&gt;
-					&lt;/filter&gt;
-
-					&lt;filter&gt;
-					&lt;filter-name&gt;requestParameterFilter&lt;/filter-name&gt;
-					&lt;filter-class&gt;org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter&lt;/filter-class&gt;
-					&lt;/filter&gt;
-
-					&lt;filter-mapping&gt;
-					&lt;filter-name&gt;orchestraFilter&lt;/filter-name&gt;
-					&lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
-					&lt;/filter-mapping&gt;
-
-					&lt;filter-mapping&gt;
-					&lt;filter-name&gt;requestParameterFilter&lt;/filter-name&gt;
-					&lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
-					&lt;/filter-mapping&gt;
+&lt;filter&gt;
+	&lt;filter-name&gt;orchestraFilter&lt;/filter-name&gt;
+	&lt;filter-class&gt;org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter&lt;/filter-class&gt;
+&lt;/filter&gt;
+
+&lt;filter&gt;
+	&lt;filter-name&gt;requestParameterFilter&lt;/filter-name&gt;
+	&lt;filter-class&gt;org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter&lt;/filter-class&gt;
+&lt;/filter&gt;
+
+&lt;filter-mapping&gt;
+	&lt;filter-name&gt;orchestraFilter&lt;/filter-name&gt;
+	&lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
+&lt;/filter-mapping&gt;
+
+&lt;filter-mapping&gt;
+	&lt;filter-name&gt;requestParameterFilter&lt;/filter-name&gt;
+	&lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
+&lt;/filter-mapping&gt;
 				</pre>
 				<p>
 					<b>Notice:</b> Replace the <code>*.faces</code> url-pattern by the one used by your application.