You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2014/02/06 01:19:34 UTC

svn commit: r1565012 - /myfaces/site/cms-site/trunk/content/wiki/core/user-guide/configuration-of-special-features/cache-el-expressions.mdtext

Author: lu4242
Date: Thu Feb  6 00:19:34 2014
New Revision: 1565012

URL: http://svn.apache.org/r1565012
Log:
test how to fix documentation

Modified:
    myfaces/site/cms-site/trunk/content/wiki/core/user-guide/configuration-of-special-features/cache-el-expressions.mdtext

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/configuration-of-special-features/cache-el-expressions.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/configuration-of-special-features/cache-el-expressions.mdtext?rev=1565012&r1=1565011&r2=1565012&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/configuration-of-special-features/cache-el-expressions.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/configuration-of-special-features/cache-el-expressions.mdtext Thu Feb  6 00:19:34 2014
@@ -6,14 +6,11 @@ facelets compiler create all EL expressi
 with this special configuration, you can reduce the time and memory
 resources required to build a view. Just add this to your web.xml file:</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-      <context-param>
-	<param-name>org.apache.myfaces.CACHE_EL_EXPRESSIONS</param-name>
-	<param-value>always</param-value>
-      </context-param>
-]
-]></ac:plain-text-body></ac:macro>
+    :::xml
+    <context-param>
+        <param-name>org.apache.myfaces.CACHE_EL_EXPRESSIONS</param-name>
+        <param-value>always</param-value>
+    </context-param>
 
 <p>There are 4 valid modes for this param:</p>
 
@@ -36,31 +33,25 @@ which option can be enabled in your appl
 <p>In theory the mode &quot;always&quot; does not work with the following
 case:</p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">a.xhtml</ac:parameter><ac:plain-text-body><![CDATA[
-<ui:composition template="c.xhtml">
-    <ui:param name="var1" value="value1"/>
-</ui:composition>
-]
-]></ac:plain-text-body></ac:macro>
-
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">b.xhtml</ac:parameter><ac:plain-text-body><![CDATA[
-<ui:composition template="c.xhtml">
-    <ui:param name="var1" value="value1"/>
-    <ui:param name="var2" value="value2"/>
-</ui:composition>
-]
-]></ac:plain-text-body></ac:macro>
-
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">c.xhtml</ac:parameter><ac:plain-text-body><![CDATA[
-<ui:composition>
-   <h:outputText value="#{var1}/>
-   <h:outputText value="#{var2}/>
-</ui:composition>
-]
-]></ac:plain-text-body></ac:macro>
+ * a.xhtml
+    :::xml
+    <ui:composition template="c.xhtml">
+        <ui:param name="var1" value="value1"/>
+    </ui:composition>
+
+ * b.xhtml
+    :::xml
+    <ui:composition template="c.xhtml">
+        <ui:param name="var1" value="value1"/>
+        <ui:param name="var2" value="value2"/>
+    </ui:composition>
+
+ * c.xhtml
+    :::xml
+    <ui:composition>
+       <h:outputText value="#{var1}/>
+       <h:outputText value="#{var2}/>
+    </ui:composition>
 
 <p>if a.xhtml view is constructed before b.xhtml, #{var2} will be cached,
 even if this is not wanted and then when b.xhtml is called, the expression
@@ -73,15 +64,13 @@ number of params.</p>
 <p>The mode &quot;allowCset&quot; and &quot;always&quot; does not work with
 the following case too:</p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">csetuse.xhtml</ac:parameter><ac:plain-text-body><![CDATA[
+ * csetuse.xhtml
+    :::xml
 	<c:if test="....">
 		<c:set var="attribute1" value="somevalue" />
 	</c:if>
 
 	<!-- some use of attribute1 -->
-]
-]></ac:plain-text-body></ac:macro>
 
 <p>The problem here consists in a value expression is created
 conditionally, but if the expression is not created the first time, other
@@ -89,11 +78,9 @@ value expressions will not be marked as 
 
 <p>The solution is use this syntax instead:</p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">csetuse.xhtml</ac:parameter><ac:plain-text-body><![CDATA[
+ * csetuse.xhtml
+    :::xml
     <c:set var="attribute1" value="#{somecondition ? 'somevalue' : null}"/>
-]
-]></ac:plain-text-body></ac:macro>
 
 <p>In this way, any use of attribute1 will detect and handle the expression
 correctly.</p>