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 02:32:07 UTC

svn commit: r1565034 [2/2] - in /myfaces/site/cms-site/trunk/content/wiki: ./ core/ core/committer-and-pmc-guide/ core/committer-and-pmc-guide/myfaces-project-management/ core/user-guide/ core/user-guide/configuration-of-special-features/ core/user-gui...

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/displaying-errors---infos---warnings-in-jsf-pages.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/displaying-errors---infos---warnings-in-jsf-pages.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/displaying-errors---infos---warnings-in-jsf-pages.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/displaying-errors---infos---warnings-in-jsf-pages.mdtext Thu Feb  6 01:32:06 2014
@@ -80,48 +80,39 @@ end, we found it is convienient to put q
 and sub-class all backing beans from it. This is similar to how Sun
 Creator's 1.0 manages backing beans and our methods are adopted from this.
 For severity our base class has two methods as below for INFO.</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
-   protected void setInfoMessage(String summary) {
 
-	getFacesContext().addMessage(null, new
-FacesMessage(FacesMessage.SEVERITY_INFO, summary, null));
-
-    }
+    :::java
+    protected void setInfoMessage(String summary) {
 
+        getFacesContext().addMessage(null, new
+        FacesMessage(FacesMessage.SEVERITY_INFO, summary, null));
 
+    }
 
     protected void setInfoMessage(UIComponent component, String summary) {
-
        
-getFacesContext().addMessage(component.getClientId(getFacesContext()), new
-FacesMessage(FacesMessage.SEVERITY_INFO, summary, null));
+        getFacesContext().addMessage(component.getClientId(getFacesContext()), new
+        FacesMessage(FacesMessage.SEVERITY_INFO, summary, null));
 
     }
 
-]
-]></ac:plain-text-body></ac:macro>
-
 <p>The first method enqueues a global message with INFO severity while the
 second method associates the INFO message with a component (most probably
 from a custom (page-specific) validation. We also have a base class for all
 our validators (which perform page-specific validation when necessary)
 which uses the following protected method for raising messages</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
+
+    :::java
     protected static void invalidateInput(UIInput uii, String message) {
 
-	uii.setValid(false);
+        uii.setValid(false);
 
-	FacesMessage facesMessage = new
-FacesMessage(FacesMessage.SEVERITY_WARN, message, null);
+        FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_WARN, message, null);
 
-	throw new ValidatorException(facesMessage);
+        throw new ValidatorException(facesMessage);
 
     }
 
-]
-]></ac:plain-text-body></ac:macro>
 <p>Note that we only raise messages with WARN severity as our requirements
 preclude displaying anything which looks or smells like an error to our
 users.	</p>
@@ -129,20 +120,18 @@ users.	</p>
 <p>As all our backing beans have these methods accesible to them, we can
 simply add appropriate calls to enqueue messages in our business logic such
 as</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
+
+    :::java
 	    setInfoMessage(Messages.getString("MANIFEST_SAVED"));
 
-or
+    or
 
 	    setWarnMessage(Messages.getString("UPDATE_DATABASE_ERROR"));
 
-or
+    or
 
 	    setInfoMessage(Messages.getString("STORAGE_TRANSFER_ONE", new
-Integer(count), fromUnit.getName(), toUnit.getName()));
-]
-]></ac:plain-text-body></ac:macro>
+            Integer(count), fromUnit.getName(), toUnit.getName()));
 
 <p>where the Messages class provides access to a messages properties file
 and performs standard parameter replacement using Apache's Common Lang
@@ -154,28 +143,26 @@ StringUtils.</p>
 consistent look and feel for all messages we choose to include a JSP in
 each page which handles all messages which are not component specific. Our
 PageMessages.jspf is as follows:</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
-
-<h:panelGrid styleClass="group" columns="2" cellpadding="2" cellspacing="0"
-width="100%" columnClasses="buttonCol, leftAlignCol"
-rowClasses="vertAlignTop" rendered="#{! empty
-facesContext.maximumSeverity}" >
-	<h:graphicImage value="#{PageMessages.messageImage}" style="float:
-left; vertical-align: top;" />	     
-	<h:panelGrid columns="1" cellpadding="2" cellspacing="2"
-columnClasses="leftAlignCol" rowClasses="vertAlignTop" width="100%">   
-	    <h:outputText value="#{PageMessages.messageHeader}"
-escape="false" rendered="#{PageMessages.renderMessage}"/>
-	    <h:messages errorClass="errorMessage" infoClass="infoMessage"
-layout="table" globalOnly="true" showDetail="false" showSummary="true"/>
-	</h:panelGrid>
-</h:panelGrid>
-]
-]></ac:plain-text-body></ac:macro>
+
+    :::xml
+    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+    <h:panelGrid styleClass="group" columns="2" cellpadding="2" cellspacing="0"
+    width="100%" columnClasses="buttonCol, leftAlignCol"
+    rowClasses="vertAlignTop" rendered="#{! empty
+    facesContext.maximumSeverity}" >
+        <h:graphicImage value="#{PageMessages.messageImage}" style="float:
+    left; vertical-align: top;" />	     
+        <h:panelGrid columns="1" cellpadding="2" cellspacing="2"
+    columnClasses="leftAlignCol" rowClasses="vertAlignTop" width="100%">   
+            <h:outputText value="#{PageMessages.messageHeader}"
+    escape="false" rendered="#{PageMessages.renderMessage}"/>
+            <h:messages errorClass="errorMessage" infoClass="infoMessage"
+    layout="table" globalOnly="true" showDetail="false" showSummary="true"/>
+        </h:panelGrid>
+    </h:panelGrid>
 
 <p>The messages are only displayed only if one or more messages are
 enqueued by conditionally rendering the table using
@@ -188,69 +175,70 @@ global messages are displayed in table f
 <p>You will notice that we use a backing bean (PageMessages.java) in <span
 style="text-decoration: underline;">request scope</span> to control the
 JSPF. The code for this is as follows:</p>
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">PageMessages.java</ac:parameter><ac:plain-text-body><![CDATA[
-import Messages;
-
-import org.apache.commons.lang.StringUtils;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
-
-
-public class PageMessages extends AbstractUIBean {
-    private static final long serialVersionUID = -6479897299239746841L;
-    private static final String BEAN_NAME = PageMessages.class.getName();
-    private String messageHeader;
-    private String messageImage;
-    private Severity severityLevel;
-
-    public PageMessages() {
-	messageHeader = null;
-
-	// See if there are messages queued for the page
-	severityLevel = getFacesContext().getMaximumSeverity();
-
-	if (null != severityLevel) {
-	    getLogger().debug("Severity Level Trapped: level = '" +
-severityLevel.toString() + "'");
-
-	    if (severityLevel.equals(FacesMessage.SEVERITY_ERROR)) {
-		messageHeader = Messages.getString("PAGE_MESSAGE_ERROR");
-		messageImage = "resources/warning.gif";
-	    } else if (severityLevel.equals(FacesMessage.SEVERITY_INFO)) {
-		messageHeader = null;
-		messageImage = "resources/information.gif";
-	    } else if (severityLevel.equals(FacesMessage.SEVERITY_WARN)) {
-		messageHeader = null;
-		messageImage = "resources/warning.gif";
-	    } else if (severityLevel.equals(FacesMessage.SEVERITY_FATAL)) {
-		messageHeader = Messages.getString("PAGE_FATAL_ERROR");
-		messageImage = "resources/stop.gif";
-	    }
-	} else {
-	    getLogger().debug("Severity Level Trapped: level = 'null'");
-	}
-    }
 
-    public Boolean getRenderMessage() {
-	return new Boolean(StringUtils.isNotBlank(getMessageHeader()));
-    }
+PageMessages.java
 
-    public String getBeanName() {
-	return BEAN_NAME;
-    }
+    :::java
+    import Messages;
 
-    public String getMessageHeader() {
-	return messageHeader;
-    }
+    import org.apache.commons.lang.StringUtils;
 
-    public String getMessageImage() {
-	return messageImage;
+    import javax.faces.application.FacesMessage;
+    import javax.faces.application.FacesMessage.Severity;
+
+
+    public class PageMessages extends AbstractUIBean {
+        private static final long serialVersionUID = -6479897299239746841L;
+        private static final String BEAN_NAME = PageMessages.class.getName();
+        private String messageHeader;
+        private String messageImage;
+        private Severity severityLevel;
+
+        public PageMessages() {
+            messageHeader = null;
+
+            // See if there are messages queued for the page
+            severityLevel = getFacesContext().getMaximumSeverity();
+
+            if (null != severityLevel) {
+                getLogger().debug("Severity Level Trapped: level = '" +
+                severityLevel.toString() + "'");
+
+                if (severityLevel.equals(FacesMessage.SEVERITY_ERROR)) {
+                messageHeader = Messages.getString("PAGE_MESSAGE_ERROR");
+                messageImage = "resources/warning.gif";
+                } else if (severityLevel.equals(FacesMessage.SEVERITY_INFO)) {
+                messageHeader = null;
+                messageImage = "resources/information.gif";
+                } else if (severityLevel.equals(FacesMessage.SEVERITY_WARN)) {
+                messageHeader = null;
+                messageImage = "resources/warning.gif";
+                } else if (severityLevel.equals(FacesMessage.SEVERITY_FATAL)) {
+                messageHeader = Messages.getString("PAGE_FATAL_ERROR");
+                messageImage = "resources/stop.gif";
+                }
+            } else {
+                getLogger().debug("Severity Level Trapped: level = 'null'");
+            }
+        }
+
+        public Boolean getRenderMessage() {
+            return new Boolean(StringUtils.isNotBlank(getMessageHeader()));
+        }
+
+        public String getBeanName() {
+            return BEAN_NAME;
+        }
+
+        public String getMessageHeader() {
+            return messageHeader;
+        }
+
+        public String getMessageImage() {
+            return messageImage;
+        }
     }
-}
-]
-]></ac:plain-text-body></ac:macro>
+
 <p>Our backing bean extends our basic UI base classes which provides access
 to central logging etc. You can see that if a component has enqueued a
 message of ERROR we add a localized message at the top of the page which
@@ -259,10 +247,8 @@ again with a bunch of annotations!</p>
 
 <p>The PageMessages.jspf is included into each JSP using the following
 code:</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<f:subview id="messages">
-    <jsp:directive.include file="PageMessages.jspf" />
-</f:subview>
-]
-]></ac:plain-text-body></ac:macro>
+
+    :::xml
+    <f:subview id="messages">
+        <jsp:directive.include file="PageMessages.jspf" />
+    </f:subview>

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/handling-server-errors.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/handling-server-errors.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/handling-server-errors.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/managing-errors---infos---warnings/handling-server-errors.mdtext Thu Feb  6 01:32:06 2014
@@ -8,78 +8,74 @@ javax.faces.context.ExceptionHandlerWrap
 exceptions. To do that, just create your custom class, an factory that
 wrap/override it and add the following into your faces-config.xml:</p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">faces-config.xml</ac:parameter><ac:plain-text-body><![CDATA[
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee" 
-	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-	      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" 
-	      version="2.0">
-
-    <!-- ... -->
-    <factory>
-	<!-- ... -->
-       
-<exception-handler-factory>org.apache.myfaces.context.ExceptionHandlerFactoryImpl</exception-handler-factory>
-	<!-- ... -->
-    </factory>
-    <!-- ... -->
-</faces-config>
-]
-]></ac:plain-text-body></ac:macro>
+faces-config.xml
+
+    :::xml
+    <faces-config xmlns="http://java.sun.com/xml/ns/javaee" 
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+    http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" 
+              version="2.0">
+
+        <!-- ... -->
+        <factory>
+        <!-- ... -->
+           
+    <exception-handler-factory>org.apache.myfaces.context.ExceptionHandlerFactoryImpl</exception-handler-factory>
+        <!-- ... -->
+        </factory>
+        <!-- ... -->
+    </faces-config>
 
 <p>This is an example of an ExceptionHandlerFactory, from myfaces code:</p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">ExceptionHandlerFactoryImpl.java</ac:parameter><ac:plain-text-body><![CDATA[
-public class ExceptionHandlerFactoryImpl extends ExceptionHandlerFactory
-{
+ExceptionHandlerFactoryImpl.java
 
-    @Override
-    public ExceptionHandler getExceptionHandler()
+    :::java
+    public class ExceptionHandlerFactoryImpl extends ExceptionHandlerFactory
     {
-	return new SwitchAjaxExceptionHandlerWrapperImpl(
-		new MyFacesExceptionHandlerWrapperImpl(new
-ExceptionHandlerImpl()) , 
-		new AjaxExceptionHandlerImpl());
+
+        @Override
+        public ExceptionHandler getExceptionHandler()
+        {
+        return new SwitchAjaxExceptionHandlerWrapperImpl(
+            new MyFacesExceptionHandlerWrapperImpl(new
+    ExceptionHandlerImpl()) , 
+            new AjaxExceptionHandlerImpl());
+        }
     }
-}
-]
-]></ac:plain-text-body></ac:macro>
 
 <p>If you need a wrapper:</p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">ExceptionHandlerFactoryImpl.java</ac:parameter><ac:plain-text-body><![CDATA[
-public class ExceptionHandlerFactoryImpl extends ExceptionHandlerFactory
-{
+ExceptionHandlerFactoryImpl.java
 
-    @Override
-    public ExceptionHandler getExceptionHandler()
+    :::java
+    public class ExceptionHandlerFactoryImpl extends ExceptionHandlerFactory
     {
-	return new
-CustomExceptionHandlerWrapper(getWrapped().getExceptionHandler());
+
+        @Override
+        public ExceptionHandler getExceptionHandler()
+        {
+        return new
+    CustomExceptionHandlerWrapper(getWrapped().getExceptionHandler());
+        }
     }
-}
-]
-]></ac:plain-text-body></ac:macro>
 
 <p>The most important method to override is
 <code>ExceptionHandler.handle()</code>. </p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">MyFacesExceptionHandlerWrapperImpl.java</ac:parameter><ac:plain-text-body><![CDATA[
-public class MyFacesExceptionHandlerWrapperImpl extends
-ExceptionHandlerWrapper
-{
-    //...
-    public void handle() throws FacesException
+MyFacesExceptionHandlerWrapperImpl.java
+
+    :::java
+    public class MyFacesExceptionHandlerWrapperImpl extends
+    ExceptionHandlerWrapper
     {
-       //... some custom code goes here ...
+        //...
+        public void handle() throws FacesException
+        {
+           //... some custom code goes here ...
+        }
     }
-}
-]
-]></ac:plain-text-body></ac:macro>
 
 <p>Take a look at MyFaces Core source code, to know in detail how
 ExceptionHandler implementations works.</p>
@@ -92,22 +88,19 @@ disabled on Production environments unle
 Don't forget to provide your custom error page in this scenario, to prevent
 show more information than necessary.</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.ERROR_HANDLING</param-name>
-    <param-value>true</param-value>
-  </context-param>
+    :::xml
+    <context-param>
+        <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+        <param-value>true</param-value>
+    </context-param>
 
-  <!-- if you want to use a different resource template file than 
+    <!-- if you want to use a different resource template file than 
        "META-INF/rsc/myfaces-dev-error.xml" this param let you configure
        it. (since 1.2.4-SNAPSHOT and 1.1.6-SNAPSHOT)-->
-  <context-param>
-    <param-name>org.apache.myfaces.ERROR_TEMPLATE_RESOURCE</param-name>
-    <param-value>META-INF/rsc/custom-dev-error.xml</param-value>
-  </context-param>
-]
-]></ac:plain-text-body></ac:macro>
+    <context-param>
+        <param-name>org.apache.myfaces.ERROR_TEMPLATE_RESOURCE</param-name>
+        <param-value>META-INF/rsc/custom-dev-error.xml</param-value>
+    </context-param>
 
 <h3>Provide an error page</h3>
 
@@ -115,14 +108,11 @@ ac:name="code"><ac:default-parameter>xml
 handling is disabled just throw an exception. So you can still setup an
 error page adding something like this in your web.xml file:</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
+    :::xml
 	<error-page>
 		<error-code>500</error-code>
 		<location>/somepage.jsp</location>
 	</error-page>
-]
-]></ac:plain-text-body></ac:macro>
 
 <h2>Error handling for MyFaces Core 1.2 and earlier versions</h2>
 
@@ -135,36 +125,33 @@ have exactly what you want with these ne
 <p>If this is not what you want, though, you can always disable or modify
 this error-handling with the following parameters:</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-  <!-- if you want to disable the behaviour completely -->
-  <context-param>
-    <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
-    <param-value>false</param-value>
-  </context-param>
-  <!-- if you are using myfaces + facelets don't forget to do this -->
-  <context-param>
-    <param-name>facelets.DEVELOPMENT</param-name>
-    <param-value>false</param-value>
-  </context-param>
+    :::xml
+    <!-- if you want to disable the behaviour completely -->
+    <context-param>
+        <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <!-- if you are using myfaces + facelets don't forget to do this -->
+    <context-param>
+        <param-name>facelets.DEVELOPMENT</param-name>
+        <param-value>false</param-value>
+    </context-param>
 
-  <!-- if you want to use a different resource template file than 
+    <!-- if you want to use a different resource template file than 
        "META-INF/rsc/myfaces-dev-error.xml" this param let you configure
        it. (since 1.2.4-SNAPSHOT and 1.1.6-SNAPSHOT)-->
-  <context-param>
-    <param-name>org.apache.myfaces.ERROR_TEMPLATE_RESOURCE</param-name>
-    <param-value>META-INF/rsc/custom-dev-error.xml</param-value>
-  </context-param>
-
-  <!-- if you want to choose a different class for handling the exception -
-the error-handler needs to include a method handleException(FacesContext
-fc, Exception ex)-->
-  <context-param>
-    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
-    <param-value>my.project.ErrorHandler</param-value>
-  </context-param> 
-]
-]></ac:plain-text-body></ac:macro>
+    <context-param>
+        <param-name>org.apache.myfaces.ERROR_TEMPLATE_RESOURCE</param-name>
+        <param-value>META-INF/rsc/custom-dev-error.xml</param-value>
+    </context-param>
+
+    <!-- if you want to choose a different class for handling the exception -
+         the error-handler needs to include a method handleException(FacesContext
+         fc, Exception ex)-->
+    <context-param>
+        <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
+        <param-value>my.project.ErrorHandler</param-value>
+    </context-param> 
 
 <p>If you do this, you can now read on to get to general ways of handling
 server-errors.</p>
@@ -186,19 +173,16 @@ to handle errors.</p>
 
 <p>For define a custom template 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.ERROR_HANDLING</param-name>
-    <param-value>true</param-value>
-  </context-param>
-
-  <context-param>
-    <param-name>org.apache.myfaces.ERROR_TEMPLATE_RESOURCE</param-name>
-    <param-value>META-INF/rsc/mycustom-template-error.xml</param-value>
-  </context-param>
-]
-]></ac:plain-text-body></ac:macro>
+    :::xml
+    <context-param>
+        <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>org.apache.myfaces.ERROR_TEMPLATE_RESOURCE</param-name>
+        <param-value>META-INF/rsc/mycustom-template-error.xml</param-value>
+    </context-param>
 
 <h3>Use sandbox
 org.apache.myfaces.tomahawk.util.ErrorRedirectJSFPageHandler</h3>
@@ -225,16 +209,14 @@ could be set in the config-parameter
 org.apache.myfaces.ERROR_REDIRECT_ALTERNATE_HANDLER</p>
 
 <p>The info of the error in the jsf page can be found using:</p>
-<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
-1. {exceptionContext.cause} : Cause retrieved from the exception
-1. {exceptionContext.stackTrace} : Stack trace of the exception
-1. {exceptionContext.exception} : Exception handled by this page 
-1. {exceptionContext.tree} : Print the component tree of the page that cause
-the error
-1. {exceptionContext.vars} : Enviroment variables from the request
-]
-]></ac:plain-text-body></ac:macro>
 
+    :::text
+    1. {exceptionContext.cause} : Cause retrieved from the exception
+    1. {exceptionContext.stackTrace} : Stack trace of the exception
+    1. {exceptionContext.exception} : Exception handled by this page 
+    1. {exceptionContext.tree} : Print the component tree of the page that cause
+    the error
+    1. {exceptionContext.vars} : Enviroment variables from the request
 
 <h3>Using servlets</h3>
 <p>Mert Caliskan (<a class="external-link"
@@ -269,141 +251,128 @@ web.xml&lt;&lt;BR&gt;&gt;</p>
 <p><ac:link><ri:page ri:content-title="1" /></ac:link> define an error
 handling web page in web.xml</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
+    :::xml
 	<error-page>
 		<error-code>500</error-code>
 		<location>/ErrorDisplay.jsf</location>
 	</error-page>
-]
-]></ac:plain-text-body></ac:macro>
 
 <p><ac:link><ri:page ri:content-title="2" /></ac:link> Create the error
 handler display. Due to a problem with the JSF 1.1 specification, the error
 handling page cannot use a &lt;f:view&gt; but must use a subview.</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<f:subview id="error"
-    xmlns:f="http://java.sun.com/jsf/core"
-    xmlns:t="http://myfaces.apache.org/tomahawk"
-    xmlns:h="http://java.sun.com/jsf/html">
-
-<html>
-<head>
-	<meta content="no-cache" http-equiv="Cache-Control" />
-	<meta content="no-cache" http-equiv="Pragma" />
-	<title>CMS - Error</title>
-	<t:stylesheet path="#{SessionBean.styleSheet}" />
-	</head>
-	<body>
-	<h:form>
-	   :
-	   : set up the normal view
-	   :
-	   <h:outputText styleClass="infoMessage" escape="false"
-value="#{ErrorDisplay.infoMessage}" />
-	   <t:htmlTag value="br" />
-	   <h:inputTextarea style="width: 99%;" rows="10" readonly="true"
-value="#{ErrorDisplay.stackTrace}" />
-	   :
-	   : more view stuff
-	   :
-	</h:form>
-    </body>
-</html>
-</f:subview>
 
-]
-]></ac:plain-text-body></ac:macro>
+    :::xml
+    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+    <f:subview id="error"
+        xmlns:f="http://java.sun.com/jsf/core"
+        xmlns:t="http://myfaces.apache.org/tomahawk"
+        xmlns:h="http://java.sun.com/jsf/html">
+
+    <html>
+    <head>
+        <meta content="no-cache" http-equiv="Cache-Control" />
+        <meta content="no-cache" http-equiv="Pragma" />
+        <title>CMS - Error</title>
+        <t:stylesheet path="#{SessionBean.styleSheet}" />
+        </head>
+        <body>
+        <h:form>
+           :
+           : set up the normal view
+           :
+           <h:outputText styleClass="infoMessage" escape="false"
+    value="#{ErrorDisplay.infoMessage}" />
+           <t:htmlTag value="br" />
+           <h:inputTextarea style="width: 99%;" rows="10" readonly="true"
+    value="#{ErrorDisplay.stackTrace}" />
+           :
+           : more view stuff
+           :
+        </h:form>
+        </body>
+    </html>
+    </f:subview>
 
 <p><ac:link><ri:page ri:content-title="3" /></ac:link> Create a backing
 bean in request scope which can process the error. (don't forget to
 register it on faces-config.xml)</p>
 
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">ErrorDisplay.java</ac:parameter><ac:plain-text-body><![CDATA[
+ErrorDisplay.java
 
-import cms.beans.framework.AbstractUIBean;
+    :::java
+    import cms.beans.framework.AbstractUIBean;
 
-import com.c2gl.jsf.framework.ApplicationResource;
+    import com.c2gl.jsf.framework.ApplicationResource;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
+    import java.io.PrintWriter;
+    import java.io.StringWriter;
 
-import java.util.Map;
+    import java.util.Map;
 
-import javax.faces.context.FacesContext;
+    import javax.faces.context.FacesContext;
 
-import javax.servlet.ServletException;
+    import javax.servlet.ServletException;
 
-public class ErrorDisplay extends AbstractUIBean {
-    private static final long serialVersionUID = 3123969847287207137L;
-    private static final String BEAN_NAME = ErrorDisplay.class.getName();
+    public class ErrorDisplay extends AbstractUIBean {
+        private static final long serialVersionUID = 3123969847287207137L;
+        private static final String BEAN_NAME = ErrorDisplay.class.getName();
 
-    public String getInfoMessage() {
-	return "An unexpected processing error has occurred. Please cut and
-paste the following information" + " into an email and send it to <b>" +
-	some email address + "</b>. If this error " + "continues to occur
-please contact our technical support staff at <b>" +
-	some phone number etc + "</b>.";
-    }
+        public String getInfoMessage() {
+            return "An unexpected processing error has occurred. Please cut and
+        paste the following information" + " into an email and send it to <b>" +
+            some email address + "</b>. If this error " + "continues to occur
+        please contact our technical support staff at <b>" +
+            some phone number etc + "</b>.";
+        }
 
-    public String getStackTrace() {
-	FacesContext context = FacesContext.getCurrentInstance();
-	Map requestMap = context.getExternalContext().getRequestMap();
-	Throwable ex = (Throwable)
-requestMap.get("javax.servlet.error.exception");
-
-	StringWriter writer = new StringWriter();
-	PrintWriter pw = new PrintWriter(writer);
-	fillStackTrace(ex, pw);
+        public String getStackTrace() {
+            FacesContext context = FacesContext.getCurrentInstance();
+            Map requestMap = context.getExternalContext().getRequestMap();
+            Throwable ex = (Throwable) requestMap.get("javax.servlet.error.exception");
 
-	return writer.toString();
-    }
+            StringWriter writer = new StringWriter();
+            PrintWriter pw = new PrintWriter(writer);
+            fillStackTrace(ex, pw);
 
-    private void fillStackTrace(Throwable ex, PrintWriter pw) {
-	if (null == ex) {
-	    return;
-	}
-
-	ex.printStackTrace(pw);
-
-	if (ex instanceof ServletException) {
-	    Throwable cause = ((ServletException) ex).getRootCause();
-
-	    if (null != cause) {
-		pw.println("Root Cause:");
-		fillStackTrace(cause, pw);
-	    }
-	} else {
-	    Throwable cause = ex.getCause();
-
-	    if (null != cause) {
-		pw.println("Cause:");
-		fillStackTrace(cause, pw);
-	    }
-	}
-    }
-}
+            return writer.toString();
+            }
+
+            private void fillStackTrace(Throwable ex, PrintWriter pw) {
+            if (null == ex) {
+                return;
+            }
+
+            ex.printStackTrace(pw);
 
-]
-]></ac:plain-text-body></ac:macro>
+            if (ex instanceof ServletException) {
+                Throwable cause = ((ServletException) ex).getRootCause();
+
+                if (null != cause) {
+                pw.println("Root Cause:");
+                fillStackTrace(cause, pw);
+                }
+            } else {
+                Throwable cause = ex.getCause();
+
+                if (null != cause) {
+                pw.println("Cause:");
+                fillStackTrace(cause, pw);
+                }
+            }
+        }
+    }
 
 <p>Also have a look at our ExceptionUtils class. It encapsulates the way
 how to get the real root cause</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
+    :::java
 	[1](1.html)
- List exceptions = ExceptionUtils.getExceptions(exception);
+        List exceptions = ExceptionUtils.getExceptions(exception);
 	[2](2.html)
- Throwable throwable = (Throwable) exceptions.get(exceptions.size()-1);
+       Throwable throwable = (Throwable) exceptions.get(exceptions.size()-1);
 	[3](3.html)
- String exceptionMessage = ExceptionUtils.getExceptionMessage(exceptions);
-]
-]></ac:plain-text-body></ac:macro>
+        String exceptionMessage = ExceptionUtils.getExceptionMessage(exceptions);
 
 <p><ac:link><ri:page ri:content-title="1" /></ac:link> get a list of all
 exceptions - using getRootCause if available or
@@ -414,29 +383,26 @@ exception&lt;&lt;BR&gt;&gt;<br />
 with an message starting with the initial exception</p>
 
 <p>So the new fillStackTrace become</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
+
+    :::java
     private void fillStackTrace(Throwable ex, PrintWriter pw)
     {
-	if (null == ex) {
-	    return;
-	}
-
-	List exceptions = ExceptionUtils.getExceptions(exception);
-	Throwable throwable = (Throwable)
-exceptions.get(exceptions.size()-1);
-
-	for (int i = 0; i<exceptions.size(); i++)
-	{
-	    if (i > 0)
-	    {
-		pw.println("Cause:");
-	    }
-	    throwable.printStackTrace(pw);
-	}
+        if (null == ex) {
+            return;
+        }
+
+        List exceptions = ExceptionUtils.getExceptions(exception);
+        Throwable throwable = (Throwable) exceptions.get(exceptions.size()-1);
+
+        for (int i = 0; i<exceptions.size(); i++)
+        {
+            if (i > 0)
+            {
+            pw.println("Cause:");
+            }
+            throwable.printStackTrace(pw);
+        }
     }
-]
-]></ac:plain-text-body></ac:macro>
 
 <p>In the backing bean we construct a message which informs the user that
 something we didnt't plan for has happened with directions on who to call,
@@ -471,53 +437,49 @@ page mappings.</p>
 specifying a non-JSF URL as the error page and then somehow redirecting to
 the JSF error page. For example, for the 404 error code you could specify
 ''/error/404_redirect.html'':</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<html><head><meta http-equiv="Refresh" content="0;
-URL=/DPSV4/error/404.jsf"></head></html>
-]
-]></ac:plain-text-body></ac:macro>
+
+    :::xml
+    <html><head><meta http-equiv="Refresh" content="0;
+    URL=/DPSV4/error/404.jsf"></head></html>
 
 <p>This works, but requires you to hard code the context path.</p>
 
 <p>The solution I ended up with involves a ''RedirectServlet'':</p>
-<ac:macro ac:name="code"><ac:parameter
-ac:name="title">RedirectServlet.java</ac:parameter><ac:plain-text-body><![CDATA[
-public class RedirectServlet extends HttpServlet {
-	private static final String URL_PREFIX = "url=";
-
-	@Override
-	protected void doGet(HttpServletRequest req, HttpServletResponse
-resp) throws ServletException, IOException {
-		String query = req.getQueryString();
-		if ( query.contains(URL_PREFIX) ) {
-			String url = query.replace(URL_PREFIX, "");
-			if ( !url.startsWith(req.getContextPath()) ) {
-				url = req.getContextPath() + url;
-			}
-			
-		resp.sendRedirect(url);
-		}
-	}
-
-	@Override
-	protected void doPost(HttpServletRequest req, HttpServletResponse
-resp) throws ServletException, IOException {
-		doGet(req, resp);
-	}
 
-}
+RedirectServlet.java
 
-]
-]></ac:plain-text-body></ac:macro>
+    :::java
+    public class RedirectServlet extends HttpServlet {
+        private static final String URL_PREFIX = "url=";
+
+        @Override
+        protected void doGet(HttpServletRequest req, HttpServletResponse
+    resp) throws ServletException, IOException {
+            String query = req.getQueryString();
+            if ( query.contains(URL_PREFIX) ) {
+                String url = query.replace(URL_PREFIX, "");
+                if ( !url.startsWith(req.getContextPath()) ) {
+                    url = req.getContextPath() + url;
+                }
+                
+            resp.sendRedirect(url);
+            }
+        }
+
+        @Override
+        protected void doPost(HttpServletRequest req, HttpServletResponse
+    resp) throws ServletException, IOException {
+            doGet(req, resp);
+        }
+
+    }
 
 <p>used like this in ''web.xml'':</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
+
+    :::xml
 	<servlet>
 	    <servlet-name>Redirect Servlet</servlet-name>
-	   
-<servlet-class>ca.gc.agr.ops.web.jsf.redirect.RedirectServlet</servlet-class>
+	    <servlet-class>ca.gc.agr.ops.web.jsf.redirect.RedirectServlet</servlet-class>
 	</servlet>    
 	<servlet-mapping>
 	    <servlet-name>Redirect Servlet</servlet-name>
@@ -537,9 +499,6 @@ ac:name="code"><ac:default-parameter>xml
 		<location>/redirect?url=/error/500.jsf</location>
 	</error-page>
 
-]
-]></ac:plain-text-body></ac:macro>
-
 <h3>With plain JSP </h3>
 
 <p>If you didn't require any JSF functionality in your JSP page it might be
@@ -550,14 +509,11 @@ worth to consider using the following er
 
 <p>with this web.xml configuration</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
+    :::xml
 	<error-page>
 		<error-code>500</error-code>
 		<location>/error.jsp</location>
 	</error-page>
-]
-]></ac:plain-text-body></ac:macro>
 
 <p>This reduces the number of technologies required to show the error page
 which might improve the availablity of this page <ac:emoticon
@@ -580,31 +536,28 @@ classloading via hidden-classes setting.
 
 <p>A fragment of your dependency plan would be like this:</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<dep:dependencies>
-.
-.
-	<dep:dependency>
-		<dep:groupId>org.apache.myfaces.core</dep:groupId>
-		<dep:artifactId>myfaces-api</dep:artifactId>
-		<dep:type>jar</dep:type>
-	</dep:dependency>
-	<dep:dependency>
-		<dep:groupId>org.apache.myfaces.core</dep:groupId>
-		<dep:artifactId>myfaces-impl</dep:artifactId>
-		<dep:type>jar</dep:type>
-	</dep:dependency>
-.
-.
-</dep:dependencies>
-
-<dep:hidden-classes>
-	<dep:filter>javax.faces</dep:filter>
-	<dep:filter>org.apache.myfaces</dep:filter>
-</dep:hidden-classes>
-]
-]></ac:plain-text-body></ac:macro>
+    :::xml
+    <dep:dependencies>
+    .
+    .
+        <dep:dependency>
+            <dep:groupId>org.apache.myfaces.core</dep:groupId>
+            <dep:artifactId>myfaces-api</dep:artifactId>
+            <dep:type>jar</dep:type>
+        </dep:dependency>
+        <dep:dependency>
+            <dep:groupId>org.apache.myfaces.core</dep:groupId>
+            <dep:artifactId>myfaces-impl</dep:artifactId>
+            <dep:type>jar</dep:type>
+        </dep:dependency>
+    .
+    .
+    </dep:dependencies>
+
+    <dep:hidden-classes>
+        <dep:filter>javax.faces</dep:filter>
+        <dep:filter>org.apache.myfaces</dep:filter>
+    </dep:hidden-classes>
 
 <p>This solution was tested under Apache Geronimo 2.1.3., but will probably
 be similar in other versions.</p>

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables.mdtext Thu Feb  6 01:32:06 2014
@@ -1,5 +1,4 @@
 Title: Working with tables
 
-<ac:macro ac:name="children"><ac:parameter
-ac:name="all">true</ac:parameter></ac:macro>
-
+{% for label, page in children %}* [{{ page.headers.title }}]({{ page.path }})
+{% endfor %}

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/executing-methods-from-link-or-button-inside-a-table.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/executing-methods-from-link-or-button-inside-a-table.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/executing-methods-from-link-or-button-inside-a-table.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/executing-methods-from-link-or-button-inside-a-table.mdtext Thu Feb  6 01:32:06 2014
@@ -27,17 +27,15 @@ clicked:<br />
 see exactly which item was selected</p>
 
 <p>This solution looks something like the following:</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<h:dataTable var="emp" .... >
- 
-<h:commandLink action="#{employeeAction.prepareForEdit}">
-    <h:outputText value="#{msgs.edit}" />
-    <t:updateActionListener property="#{employeeAction.currentEmployee}"
-value="#{emp}" />
-</h:commandLink>
-]
-]></ac:plain-text-body></ac:macro>
+
+    :::xml
+    <h:dataTable var="emp" .... >
+     
+    <h:commandLink action="#{employeeAction.prepareForEdit}">
+        <h:outputText value="#{msgs.edit}" />
+        <t:updateActionListener property="#{employeeAction.currentEmployee}"
+    value="#{emp}" />
+    </h:commandLink>
 
 <p>When the above link is clicked, JSF will first call the
 setCurrentEmployee(Employee) method on the backing bean (which should store
@@ -70,42 +68,40 @@ component can be found, and its DataMode
 even simpler, as the &quot;getRowData&quot; method on the UIData component
 can be used directly (it just delegates to the DataModel method).<br />
 The JSF page looks like this:
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<h:commandLink actionListener="#{employeeAction.prepareForEdit}">
-    <h:outputText value="#{msgs.edit}" />
-</h:commandLink>
-]
-]></ac:plain-text-body></ac:macro>
+
+    :::xml
+    <h:commandLink actionListener="#{employeeAction.prepareForEdit}">
+        <h:outputText value="#{msgs.edit}" />
+    </h:commandLink>
+
 And the backing bean looks like this:
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
-  public void prepareForEdit(ActionEvent anEvent) {
 
-    YourBeanClass tmpBean = null;
+    :::java
+    public void prepareForEdit(ActionEvent anEvent) {
 
-    UIComponent tmpComponent = anEvent.getComponent();
+        YourBeanClass tmpBean = null;
 
-    while (null != tmpComponent && !(tmpComponent instanceof UIData)) {
-      tmpComponent = tmpComponent.getParent();
-    }
+        UIComponent tmpComponent = anEvent.getComponent();
 
-    if (tmpComponent != null && (tmpComponent instanceof UIData)) {
-      Object tmpRowData = ((UIData) tmpComponent).getRowData();
-      if (tmpRowData instanceof YourBeanClass) {
-	tmpBean = (YourBeanClass) tmpRowData;
+        while (null != tmpComponent && !(tmpComponent instanceof UIData)) {
+          tmpComponent = tmpComponent.getParent();
+        }
 
-	//TODO Implementation of your method 
+        if (tmpComponent != null && (tmpComponent instanceof UIData)) {
+          Object tmpRowData = ((UIData) tmpComponent).getRowData();
+          if (tmpRowData instanceof YourBeanClass) {
+            tmpBean = (YourBeanClass) tmpRowData;
 
-      }
-    }
+        //TODO Implementation of your method 
 
-    //TODO Exception Handling if UIData not found or tmpRowBean of wrong
-type
+          }
+        }
 
-  }
-]
-]></ac:plain-text-body></ac:macro></li>
+        //TODO Exception Handling if UIData not found or tmpRowBean of wrong
+        type
+
+    }
+</li>    
 	<li>You could also use the &quot;binding&quot; attribute on the
 h:dataTable to make it accessable from the backing bean. However component
 bindings have their own problems and should be avoided where possible.</li>
@@ -119,46 +115,39 @@ may have previously solved this problem 
 as request parameters as part of a link, perhaps via something like
 this:</p>
 
-<ac:macro ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[<a href="/appContext/someAction.do?id=1234&userAction=prepareEdit">Edit</a>](cdata[<a-href="/appcontext/someaction.do?id=1234&useraction=prepareedit">edit</a>.html)
-]></ac:plain-text-body></ac:macro>
+    :::xml
+    <a href="/appContext/someAction.do?id=1234&userAction=prepareEdit">Edit</a>](cdata[<a-href="/appcontext/someaction.do?id=1234&useraction=prepareedit">edit</a>.html)
 
 <p>Using JSTL to create the above:</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<c:url value="someAction.do" var="url">
-   <c:param name="id" value="1234" />
-   <c:param name="userAction" value="prepareEdit" />
-</c:url>
-<a href="${url}">Edit</a>
-]
-]></ac:plain-text-body></ac:macro>
+
+    :::xml
+    <c:url value="someAction.do" var="url">
+       <c:param name="id" value="1234" />
+       <c:param name="userAction" value="prepareEdit" />
+    </c:url>
+    <a href="${url}">Edit</a>
 
 <p>It is possible to use this approach with JSF, but it is not in the
 spirit of JSF; the solutions documented above are generally considered
 better. Nevertheless, this can be implemented as follows:</p>
 
 <p>Use an f:param tag inside of the commandButton or commandLink:</p>
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<t:dataTable var="emp" .... >
-
- <h:commandLink id="editLink" action="#{employeeAction.prepareEdit}">
-  <h:outputText value="#{msg.edit}"/>
-  <f:param name="id" value="#{emp.id}"/>
-</h:commandLink>
-]
-]></ac:plain-text-body></ac:macro>
+
+    :::xml
+    <t:dataTable var="emp" .... >
+
+     <h:commandLink id="editLink" action="#{employeeAction.prepareEdit}">
+      <h:outputText value="#{msg.edit}"/>
+      <f:param name="id" value="#{emp.id}"/>
+     </h:commandLink>
 
 <p>To then get a handle to this request parameter in your
 &quot;prepareEdit&quot; method, you could do:</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
-FacesContext context = FacesContext.getCurrentInstance();
-Map map = context.getExternalContext().getRequestParameterMap();
-String employeeID = (String) map.get("id");
-]
-]></ac:plain-text-body></ac:macro>
+    :::java
+    FacesContext context = FacesContext.getCurrentInstance();
+    Map map = context.getExternalContext().getRequestParameterMap();
+    String employeeID = (String) map.get("id");
 
 <p>Note that in this case the parameter is a String, which you'll have to
 map to the appropriate object id yourself. Plus, you have extra lines of

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/get-row-data-from-an-actionlistener.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/get-row-data-from-an-actionlistener.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/get-row-data-from-an-actionlistener.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/jsf-and-myfaces-howtos/working-with-tables/get-row-data-from-an-actionlistener.mdtext Thu Feb  6 01:32:06 2014
@@ -6,53 +6,47 @@ Title: Get row data from an ActionListen
 is an easy way to get to row bean from an <a
 href="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/event/ActionListener.html">javax.faces.event.ActionListener</a>.</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>xml</ac:default-parameter><ac:plain-text-body><![CDATA[
-<h:dataTable value="#{ResultsBean.hitSet.hits}" var="hit">
-  <h:column>
-    <h:commandLink>
-      <f:actionListener type="net.java.OrderActionListener" />
-      <h:outputText value="Order" />
-    </h:commandLink>
-    ...
-  </h:column>
-</h:dataTable>
-]
-]></ac:plain-text-body></ac:macro>
+    :::xml
+    <h:dataTable value="#{ResultsBean.hitSet.hits}" var="hit">
+      <h:column>
+        <h:commandLink>
+          <f:actionListener type="net.java.OrderActionListener" />
+          <h:outputText value="Order" />
+        </h:commandLink>
+        ...
+      </h:column>
+    </h:dataTable>
 
 <p>By this simple Java code in your subclass of <a
 href="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/event/ActionListener.html">javax.faces.event.ActionListener</a>
 you get the row bean.</p>
 
-<ac:macro
-ac:name="code"><ac:default-parameter>java</ac:default-parameter><ac:plain-text-body><![CDATA[
-public class OrderActionListener implements ActionListener {
+    :::java
+    public class OrderActionListener implements ActionListener {
 
-  public void processAction(ActionEvent anEvent) throws
-AbortProcessingException {
+      public void processAction(ActionEvent anEvent) throws
+    AbortProcessingException {
 
-    YourBeanClass tmpBean = null;
+        YourBeanClass tmpBean = null;
 
-    UIComponent tmpComponent = anEvent.getComponent();
+        UIComponent tmpComponent = anEvent.getComponent();
 
-    while (null != tmpComponent && !(tmpComponent instanceof UIData)) {
-      tmpComponent = tmpComponent.getParent();
-    }
+        while (null != tmpComponent && !(tmpComponent instanceof UIData)) {
+          tmpComponent = tmpComponent.getParent();
+        }
 
-    if (tmpComponent != null && (tmpComponent instanceof UIData)) {
-      Object tmpRowData = ((UIData) tmpComponent).getRowData();
-      if (tmpRowData instanceof YourBeanClass) {
-	tmpBean = (YourBeanClass) tmpRowData;
+        if (tmpComponent != null && (tmpComponent instanceof UIData)) {
+          Object tmpRowData = ((UIData) tmpComponent).getRowData();
+          if (tmpRowData instanceof YourBeanClass) {
+        tmpBean = (YourBeanClass) tmpRowData;
 
-	//TODO Implementation of your method 
+        //TODO Implementation of your method 
 
-      }
-    }
+          }
+        }
 
-    //TODO Exception Handling if UIData not found or tmpRowBean of wrong
-type
+        //TODO Exception Handling if UIData not found or tmpRowBean of wrong
+    type
 
-  }
-}
-]
-]></ac:plain-text-body></ac:macro>
+      }
+    }

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/migration-guide.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/migration-guide.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/migration-guide.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/migration-guide.mdtext Thu Feb  6 01:32:06 2014
@@ -1,4 +1,6 @@
 Title: Migration Guide
 
-<ac:macro ac:name="children" />
+{% for label, page in children %}* [{{ page.headers.title }}]({{ page.path }})
+{% endfor %}
+
 

Modified: myfaces/site/cms-site/trunk/content/wiki/core/user-guide/working-with-myfaces-core-integration-tests.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/core/user-guide/working-with-myfaces-core-integration-tests.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/core/user-guide/working-with-myfaces-core-integration-tests.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/core/user-guide/working-with-myfaces-core-integration-tests.mdtext Thu Feb  6 01:32:06 2014
@@ -16,21 +16,17 @@ against the running container.</p>
 automatically add the integration-tests submodule and thus execute all
 integration-tests.</p>
 
-<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
-mvn clean install -Pintegration-tests
-]
-]></ac:plain-text-body></ac:macro> 
+    :::bash
+    mvn clean install -Pintegration-tests
 
 <h3>Running a specific integration-test module</h3>
 
 <p>Just go to the desired integration-test module and execute a standard
 maven build lifecycle, e.g.</p>
 
-<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
-cd integration-tests/servlet25-el10-basic-tests/
-mvn clean install
-]
-]></ac:plain-text-body></ac:macro>
+    :::bash
+    cd integration-tests/servlet25-el10-basic-tests/
+    mvn clean install
 
 <h3>Starting an integration-test environment for manual tests</h3>
 
@@ -38,10 +34,8 @@ mvn clean install
 given configuration until Ctrl+C is entered in the console (just like the
 jetty-maven-plugin).</p>
 
-<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
-mvn clean package cargo:run
-]
-]></ac:plain-text-body></ac:macro>
+    :::bash
+    mvn clean package cargo:run
 
 <h3>Creating a new integration-test submodule with a specific
 configuration</h3>

Modified: myfaces/site/cms-site/trunk/content/wiki/gsoc-and-myfaces.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/gsoc-and-myfaces.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/gsoc-and-myfaces.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/gsoc-and-myfaces.mdtext Thu Feb  6 01:32:06 2014
@@ -7,3 +7,7 @@ at ASF</a> for more information about ho
 
 <p>Under this section you can see documentation of previous GSOC projects
 done in MyFaces land.</p>
+
+{% for label, page in children %}* [{{ page.headers.title }}]({{ page.path }})
+{% endfor %}
+

Modified: myfaces/site/cms-site/trunk/content/wiki/index.mdtext
URL: http://svn.apache.org/viewvc/myfaces/site/cms-site/trunk/content/wiki/index.mdtext?rev=1565034&r1=1565033&r2=1565034&view=diff
==============================================================================
--- myfaces/site/cms-site/trunk/content/wiki/index.mdtext (original)
+++ myfaces/site/cms-site/trunk/content/wiki/index.mdtext Thu Feb  6 01:32:06 2014
@@ -30,7 +30,6 @@ Welcome to the Apache CMS.  Please see t
  - <http://www.apache.org/dev/cmsref.html>
  - <http://wiki.apache.org/general/ApacheCms2010>
 
-
   [1]: jsfintro.html
 
 Testing: Edit from the bookmarklet. - grantsmith
\ No newline at end of file