portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r481204 - in /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml: menu.vm psml.vm
Date Fri, 01 Dec 2006 09:45:49 GMT
Author: smilek
Date: Fri Dec  1 01:45:48 2006
New Revision: 481204

URL: http://svn.apache.org/viewvc?view=rev&rev=481204
Log:
use velocity EscapeTool to get proper xml encoding on labels; add <icon> element to
portlet fragments in psml.vm

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/menu.vm
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/psml.vm

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/menu.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/menu.vm?view=diff&rev=481204&r1=481203&r2=481204
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/menu.vm
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/menu.vm
Fri Dec  1 01:45:48 2006
@@ -4,11 +4,11 @@
 ${_indent}    <name>$_menu.getName()</name>
 #end
 #if("$!_locale" != "")
-${_indent}    <title>$_menu.getTitle($_locale)</title>
-${_indent}    <short-title>$_menu.getShortTitle($_locale)</short-title>
+${_indent}    <title>$esc.xml($_menu.getTitle($_locale))</title>
+${_indent}    <short-title>$esc.xml($_menu.getShortTitle($_locale))</short-title>
 #else
-${_indent}    <title>$_menu.getTitle()</title>
-${_indent}    <short-title>$_menu.getShortTitle()</short-title>
+${_indent}    <title>$esc.xml($_menu.getTitle())</title>
+${_indent}    <short-title>$esc.xml($_menu.getShortTitle())</short-title>
 #end
 #if("$!_menu.getSkin()" != "")
 ${_indent}    <skin>$_menu.getSkin()</skin>
@@ -27,11 +27,11 @@
 ${_indent}    <option>
 ${_indent}        <type>$element.getType()</type>
 #if("$!_locale" != "")
-${_indent}        <title>$element.getTitle($_locale)</title>
-${_indent}        <short-title>$element.getShortTitle($_locale)</short-title>
+${_indent}        <title>$esc.xml($element.getTitle($_locale))</title>
+${_indent}        <short-title>$esc.xml($element.getShortTitle($_locale))</short-title>
 #else
-${_indent}        <title>$element.getTitle()</title>
-${_indent}        <short-title>$element.getShortTitle()</short-title>
+${_indent}        <title>$esc.xml($element.getTitle())</title>
+${_indent}        <short-title>$esc.xml($element.getShortTitle())</short-title>
 #end
 #if("$!element.getSkin()" != "")
 ${_indent}        <skin>$element.getSkin()</skin>
@@ -53,17 +53,17 @@
 ${_indent}    <separator>
 #if("$!_locale" != "")
 #if("$!element.getTitle($_locale)" != "")
-${_indent}        <title>$element.getTitle($_locale)</title>
+${_indent}        <title>$esc.xml($element.getTitle($_locale))</title>
 #end
 #if("$!element.getText($_locale)" != "")
-${_indent}        <text>$element.getText($_locale)</text>
+${_indent}        <text>$esc.xml($element.getText($_locale))</text>
 #end
 #else
 #if("$!element.getTitle()" != "")
-${_indent}        <title>$element.getTitle()</title>
+${_indent}        <title>$esc.xml($element.getTitle())</title>
 #end
 #if("$!element.getText()" != "")
-${_indent}        <text>$element.getText()</text>
+${_indent}        <text>$esc.xml($element.getText())</text>
 #end
 #end
 #if("$!element.getSkin()" != "")

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/psml.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/psml.vm?view=diff&rev=481204&r1=481203&r2=481204
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/psml.vm
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/ajax-xml/psml.vm
Fri Dec  1 01:45:48 2006
@@ -22,13 +22,16 @@
         #traverseFragments($subf)
 		#end
 	#end
-	#if($f.Type == "portlet")
+#if($f.Type == "portlet")
 	#foreach ($action in $f.decoration.actions)
      <action id="${action.ActionName}" type="${action.ActionType}" name="${action.Name}"
url="${action.Action}"/>    
-#end
+	#end
 	<mode>$f.decoration.getCurrentModeAction()</mode>
 	<state>$f.decoration.getCurrentStateAction()</state>
-	#end
+	#if($portletIcons.get($f.Id))
+    <icon>$portletIcons.get($f.Id)</icon>
+    #end
+#end
     </fragment>                                		
 #end
 
@@ -43,8 +46,8 @@
   />
   <name>$page.Name</name>
   <path>$page.Path</path>
-  <title>$page.Title</title>
-  <short-title>$page.ShortTitle</short-title>
+  <title>$esc.xml($page.Title)</title>
+  <short-title>$esc.xml($page.ShortTitle)</short-title>
   
 #foreach ($meta in $page.Metadata.Fields)
 	<metadata name="$meta.Name" xml:lang="$meta.Locale.Language">$meta.Value</metadata>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message