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><?xml version="1.0" encoding="UTF-8"?<
+ <pre>
+<?xml version="1.0" encoding="UTF-8"?>
- <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">
-
- <!-- 1. the conversation scope -->
- <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
- <property name="scopes">
- <map>
- <entry key="conversation">
+ <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">
+
+ <!-- 1. the conversation scope -->
+ <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
+ <property name="scopes">
+ <map>
+ <entry key="conversation">
<bean class="org.apache.myfaces.orchestra.conversation.spring.SpringConversationScope">
- <property name="advices">
- <list>
- <ref bean="persistentContextConversationInterceptor"/>
- </list>
- </property>
- </bean>
- </entry>
- </map>
- </property>
- </bean>
-
- <!-- 2. the "entitiy manager" manager -->
- <bean id="persistentContextConversationInterceptor"
- class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor">
- <property name="persistenceContextFactory" ref="persistentContextFactory"/>
- </bean>
-
- <!-- 3. conversation - persistence adapter -->
- <bean id="persistentContextFactory"
- class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
+ <property name="advices">
+ <list>
+ <ref bean="persistentContextConversationInterceptor"/>
+ </list>
+ </property>
+ </bean>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- 2. the "entitiy manager" manager -->
+ <bean id="persistentContextConversationInterceptor"
+ class="org.apache.myfaces.orchestra.conversation.spring.PersistenceContextConversationInterceptor">
+ <property name="persistenceContextFactory" ref="persistentContextFactory"/>
+ </bean>
+
+ <!-- 3. conversation - persistence adapter -->
+ <bean id="persistentContextFactory"
+ class="org.apache.myfaces.orchestra.conversation.persistenceContexts.JpaPersistenceContextFactory">
+ <property name="entityManagerFactory" ref="entityManagerFactory"/>
+ </bean>
+
+ <!-- 4. persistence -->
+ <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
+
+ <tx:annotation-driven />
+
+ <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory" ref="entityManagerFactory"/>
+ </bean>
+
+ <bean id="entityManagerFactory"
+ class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
+ <property name="jpaProperties">
+ <props>
+ <prop key="toplink.logging.level"<FINE</prop>
+ <prop key="toplink.jdbc.driver"<org.apache.derby.jdbc.EmbeddedDriver</prop>
+ <prop key="toplink.jdbc.url"<jdbc:derby:myfacesOrchestraDB;create=true</prop>
+ <prop key="toplink.jdbc.user"<sa</prop>
+ <prop key="toplink.jdbc.password"<foobar</prop>
+ <prop key="toplink.target-database"<oracle.toplink.essentials.platform.database.DerbyPlatform</prop>
+ <prop key="toplink.ddl-generation"<create-tables</prop>
+ </props>
+ </property>
+ <property name="persistenceUnitName" value="default"/>
+ </bean>
- <!-- 4. persistence -->
- <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
-
- <tx:annotation-driven />
-
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
-
- <bean id="entityManagerFactory"
- class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
- <property name="jpaProperties">
- <props>
- <prop key="toplink.logging.level"<FINE</prop>
- <prop key="toplink.jdbc.driver"<org.apache.derby.jdbc.EmbeddedDriver</prop>
- <prop key="toplink.jdbc.url"<jdbc:derby:myfacesOrchestraDB;create=true</prop>
- <prop key="toplink.jdbc.user"<sa</prop>
- <prop key="toplink.jdbc.password"<foobar</prop>
- <prop key="toplink.target-database"<oracle.toplink.essentials.platform.database.DerbyPlatform</prop>
- <prop key="toplink.ddl-generation"<create-tables</prop>
- </props>
- </property>
- <property name="persistenceUnitName" value="default"/>
- </bean>
-
- </beans></pre>
+</beans>
+ </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> <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <listener>
- <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
- </listener></pre>
+ <pre>
+<listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+</listener>
+<listener>
+ <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+</listener>
+ </pre>
<p>and</p>
<pre>
- <filter>
- <filter-name>orchestraFilter</filter-name>
- <filter-class>org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter</filter-class>
- </filter>
-
- <filter>
- <filter-name>requestParameterFilter</filter-name>
- <filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>orchestraFilter</filter-name>
- <url-pattern>*.faces</url-pattern>
- </filter-mapping>
-
- <filter-mapping>
- <filter-name>requestParameterFilter</filter-name>
- <url-pattern>*.faces</url-pattern>
- </filter-mapping>
+<filter>
+ <filter-name>orchestraFilter</filter-name>
+ <filter-class>org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter</filter-class>
+</filter>
+
+<filter>
+ <filter-name>requestParameterFilter</filter-name>
+ <filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
+</filter>
+
+<filter-mapping>
+ <filter-name>orchestraFilter</filter-name>
+ <url-pattern>*.faces</url-pattern>
+</filter-mapping>
+
+<filter-mapping>
+ <filter-name>requestParameterFilter</filter-name>
+ <url-pattern>*.faces</url-pattern>
+</filter-mapping>
</pre>
<p>
<b>Notice:</b> Replace the <code>*.faces</code> url-pattern by the one used by your application.