You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by de...@apache.org on 2008/01/29 16:49:21 UTC

svn commit: r616403 - /portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java

Author: dettborn
Date: Tue Jan 29 07:49:20 2008
New Revision: 616403

URL: http://svn.apache.org/viewvc?rev=616403&view=rev
Log:
fix escapexml

Modified:
    portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java

Modified: portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java?rev=616403&r1=616402&r2=616403&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java (original)
+++ portals/pluto/trunk/pluto-taglib/src/main/java/org/apache/pluto/tags/PortletURLTag286.java Tue Jan 29 07:49:20 2008
@@ -19,6 +19,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.portlet.PortletConfig;
 import javax.portlet.PortletRequest;
 import javax.servlet.jsp.JspException;
 
@@ -46,25 +47,21 @@
 	 */
 	@Override
     public int doStartTag() throws JspException {    	    	  
-        
-       //FIXME:implement escapeXml-container-runtime-option check! 
-        /*PortletConfig portletConfig = 
+         
+        PortletConfig portletConfig = 
         	(PortletConfig) pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
-        
-        if(portletConfig != null){
-        	PortletContext portletContext = portletConfig.getPortletContext();
-        	if(portletContext != null){
-        		System.out.println(portletContext.getContainerRuntimeOptions());
-        		/*Map<String, String[]> containerOptions = portletContext.getContainerRuntimeOptions(); 
-        		if(containerOptions != null){
-        			String[] escapeXmlOption = 
-        				containerOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
-        			if(escapeXmlOption != null){
-        				System.out.println(escapeXmlOption);
-        			}
+        Map<String,String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
+        if (containerRuntimeOptions != null){
+        	String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
+        	if (result != null){
+        		if (result.length > 0){
+        			if (result[0].equals(true))
+        				escapeXml = true;
+        			else if (result[0].equals(false))
+        				escapeXml = false;
         		}
         	}
-        }*/
+        }
         
         return super.doStartTag();
     }