<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Liferay Latino Blog &#187; javascript</title>
	<atom:link href="http://www.lrlatinoblog.com.ar/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lrlatinoblog.com.ar</link>
	<description>La comunidad latina de Liferay</description>
	<lastBuildDate>Sat, 19 Nov 2011 18:47:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Agregar un editor WYSIWYG a un portlet</title>
		<link>http://www.lrlatinoblog.com.ar/2011/11/19/agregar-un-editor-wysiwyg-a-un-portlet/</link>
		<comments>http://www.lrlatinoblog.com.ar/2011/11/19/agregar-un-editor-wysiwyg-a-un-portlet/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 18:45:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[Diseño]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[CKEditor]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.lrlatinoblog.com.ar/?p=210</guid>
		<description><![CDATA[Interesante nota de Erik Andersson en el site de Liferay donde explica como agregar un editor WYSIWYG a un portlet propio, y como se puede personalizar cambiando las barras de herramientas existentes o creando las propias. &#160;]]></description>
			<content:encoded><![CDATA[<p>Interesante <a href="http://www.liferay.com/web/erik.andersson/blog/-/blogs/11490753" target="_blank">nota</a> de Erik Andersson en el site de <a href="http://www.liferay.com" target="_blank">Liferay</a> donde explica como agregar un editor WYSIWYG a un portlet propio, y como se puede personalizar cambiando las barras de herramientas existentes o creando las propias.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lrlatinoblog.com.ar/2011/11/19/agregar-un-editor-wysiwyg-a-un-portlet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comprimir CSS y JavaScript</title>
		<link>http://www.lrlatinoblog.com.ar/2011/04/09/comprimir-css-y-javascript/</link>
		<comments>http://www.lrlatinoblog.com.ar/2011/04/09/comprimir-css-y-javascript/#comments</comments>
		<pubDate>Sat, 09 Apr 2011 18:28:06 +0000</pubDate>
		<dc:creator>joyola83</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Optimizacion]]></category>

		<guid isPermaLink="false">http://www.lrlatinoblog.com/?p=69</guid>
		<description><![CDATA[YUI Compressor es una herramienta que permite la reducción del tamaño de archivos Javascript y CSS permitiendo una optimización del tiempo de transferencia entre el servidor web y el browser. Los archivos Javascript son comprimidos eliminando comentarios y espacios en &#8230; <a href="http://www.lrlatinoblog.com.ar/2011/04/09/comprimir-css-y-javascript/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>YUI Compressor</strong> es una herramienta que permite la reducción del tamaño de archivos Javascript y CSS permitiendo una optimización del tiempo de transferencia entre el servidor web y el browser.</p>
<p>Los archivos Javascript son comprimidos eliminando comentarios y espacios en blanco, como asi tambien ofuscando variables locales utilizando nombres cortos.  Los archivos CSS son comprimidos haciendo uso de expresiones regulares basadas en CSS minifier.</p>
<p><strong>Instalación de YUI Compressor</strong></p>

<div class="wp_syntax"><div class="code"><pre class="powerscript" style="font-family:monospace;">sudo aptitude install yui-compressor</pre></div></div>

<p><strong>Comprimir y Obfuscar Javascript</strong></p>

<div class="wp_syntax"><div class="code"><pre class="powerscript" style="font-family:monospace;">cat *.js &gt; original.js
yui-compressor -type js -o compressed.js original.js</pre></div></div>

<p><strong>Comprimir CSS</strong></p>

<div class="wp_syntax"><div class="code"><pre class="powerscript" style="font-family:monospace;">cat *.css &gt; original.css
yui-compressor -type css -o compressed.css original.css</pre></div></div>

<p><strong>Utilizar YUI Compress con ANT</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;yuicompressor.classpath&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${yuicompressor.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/yuicompressor-2.2.5.jar&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/YUIAnt.jar&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
         <span style="color: #009900;">&lt;!– include <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/rhino*.jar&quot;</span>/ –<span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;js.compress&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;yuicompress&quot;</span> <span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;com.yahoo.platform.yui.compressor.YUICompressTask&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;classpath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">refid</span>=<span style="color: #ff0000;">&quot;yuicompressor.classpath&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/classpath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/taskdef<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;yuicompress</span> <span style="color: #000066;">warn</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">munge</span>=<span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #000066;">preserveallsemicolons</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">outputfolder</span>=<span style="color: #ff0000;">&quot;${js-min.dir}&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${js.dir}&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;javascript/*.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/yuicompress<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>Utilizar YUI Compress con Maven</strong></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>net.alchim31.maven<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>yuicompressor-maven-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>package<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>compress<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;failOnWarning<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/failOnWarning<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nosuffix<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nosuffix<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
             <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;force<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/force<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
             <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;aggregations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;aggregation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                      <span style="color: #808080; font-style: italic;">&lt;!-- Elimina los archivos declarado en agregations (default: false) --&gt;</span>
                      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;removeIncluded<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/removeIncluded<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
                      <span style="color: #808080; font-style: italic;">&lt;!-- Inserta una linea despues de concatenar los archivos (default: false) --&gt;</span>
                      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;insertNewLine<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/insertNewLine<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
                      <span style="color: #808080; font-style: italic;">&lt;!-- Es el archivo generado a partir de comprimir cada JS --&gt;</span>
                      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;output<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.basedir}/${webcontent.dir}/js/compressed.js<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/output<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
                      <span style="color: #808080; font-style: italic;">&lt;!-- Los archivos JS que deben comprimirse --&gt;</span>
                      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>                
                          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javascript/*.js<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
                      <span style="color: #808080; font-style: italic;">&lt;!-- Los archivos JS que deben omitirse --&gt;</span>
                      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;excludes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	                 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exclude<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exclude<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/excludes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/aggregation<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
             <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/aggregations<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.lrlatinoblog.com.ar/2011/04/09/comprimir-css-y-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PortletURL en JavaScript</title>
		<link>http://www.lrlatinoblog.com.ar/2008/12/22/portleturl-en-javascript/</link>
		<comments>http://www.lrlatinoblog.com.ar/2008/12/22/portleturl-en-javascript/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 03:40:40 +0000</pubDate>
		<dc:creator>joyola83</dc:creator>
				<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.lrlatinoblog.com/?p=71</guid>
		<description><![CDATA[Una funcionalidad que acabo de descubrir en el Blog de Liferay es crear el PortletUrl en JavaScript. Un ejemplo de PortletUrl es: http://localhost:8080/web/guest/home?p_p_id=EDITAR_CUENTA&#038;p_p_lifecycle=0&#038;p_p_state=maximized&#038;p_p_mode=view&#038;_EDITAR_CUENTA_struts_action=%2Feditar_cuenta%2Fview Aca le estoy pasando el portlet id, el estado del portlet, la fase del ciclo de vida, &#8230; <a href="http://www.lrlatinoblog.com.ar/2008/12/22/portleturl-en-javascript/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Una funcionalidad que acabo de descubrir en el Blog de Liferay es crear el PortletUrl en JavaScript.</p>
<p>Un ejemplo de PortletUrl es:</p>
<p>http://localhost:8080/web/guest/home?p_p_id=EDITAR_CUENTA&#038;p_p_lifecycle=0&#038;p_p_state=maximized&#038;p_p_mode=view&#038;_EDITAR_CUENTA_struts_action=%2Feditar_cuenta%2Fview</p>
<p>Aca le estoy pasando el portlet id, el estado del portlet, la fase del ciclo de vida, la acción de struts a ejecutar y 1 parametro (podrian ser muchos más).  Anteriormente la manipulación de esta url era medio complicada, ya que solo se podia generar a traves de JAVA o mediante una concatenación kilometrica de varios strings.  Con esta funcion nos proporciona mayor flexibilidad a la hora de programar.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
var portletURL = new Liferay.PortletURL(_PHASE);
portletURL.setParameter(&quot;key1&quot;, &quot;value&quot;);
portletURL.setParameter(&quot;key2&quot;, &quot;value&quot;);
portletURL.setPortletId(_PORTLET_ID);
&lt;/script&gt;
&nbsp;
&lt;a href=&quot;javascript: portletURL.toString()&quot;&gt;Go to&lt;/a&gt;</pre></div></div>

<p>Los valores que puede tomar _PHASE son:</p>
<ul>
<li>ACTION_PHASE</li>
<li>RENDER_PHASE</li>
<li>RESOURCE_PHASE</li>
</ul>
<p>También existen los siguientes métodos que permiten crear el PortletUrl según _PHASE:</p>
<ul>
<li>Liferay.PortletURL.createActionURL();</li>
<li>Liferay.PortletURL.createRenderURL();</li>
<li>Liferay.PortletURL.createResourceURL();</li>
</ul>
<p>Estos son los métodos restantes de la clase Liferay.PortletURL:</p>
<ul>
<li>setCopyCurrentRenderParameters: function(copyCurrentRenderParameters);</li>
<li>setDoAsUserId: function(doAsUserId);</li>
<li>setEncrypt: function(encrypt);</li>
<li>setEscapeXML: function(escapeXML);</li>
<li>setLifecycle: function(lifecycle);</li>
<li>setName: function(name);</li>
<li>setParameter: function(key, value);</li>
<li>setPlid: function(plid);</li>
<li>setPortletConfiguration: function(portletConfiguration);</li>
<li>setPortletId: function(portletId);</li>
<li>setPortletMode: function(portletMode);</li>
<li>setResourceId: function(resourceId);</li>
<li>setSecure: function(secure);</li>
<li>setWindowState: function(windowState);</li>
<li>toString: function();</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.lrlatinoblog.com.ar/2008/12/22/portleturl-en-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mostrar un portlet en un PopUp</title>
		<link>http://www.lrlatinoblog.com.ar/2008/11/12/mostrar-un-portlet-en-un-popup/</link>
		<comments>http://www.lrlatinoblog.com.ar/2008/11/12/mostrar-un-portlet-en-un-popup/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 02:27:07 +0000</pubDate>
		<dc:creator>joyola83</dc:creator>
				<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[portlet]]></category>

		<guid isPermaLink="false">http://www.lrlatinoblog.com/?p=34</guid>
		<description><![CDATA[Armo la URL &#60;portlet:renderURL windowState=&#34;&#60;%= LiferayWindowState.EXCLUSIVE.toString() %&#62;&#34; var=&#34;url&#34;&#62; &#60;portlet:param name=&#34;struts_action&#34; value=&#34;/miportlet/popupview&#34; /&#62; &#60;/portlet:actionURL&#62; Llamo al POPUP &#60;script type=&#34;text/javascript&#34;&#62; function mostrar_popup() { var _dialog = Liferay.Popup( { width: 700, modal: true, message: '&#60;div class=&#34;loading-animation&#34; /&#62;', position: ['center', 100], title: &#60;liferay-ui:message key&#34;popup-title&#34;/&#62;, &#8230; <a href="http://www.lrlatinoblog.com.ar/2008/11/12/mostrar-un-portlet-en-un-popup/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Armo la URL</strong></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>portlet<span style="color: #339933;">:</span>renderURL windowState<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;%= LiferayWindowState.EXCLUSIVE.toString() %&gt;&quot;</span> var<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>portlet<span style="color: #339933;">:</span>param name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;struts_action&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;/miportlet/popupview&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>portlet<span style="color: #339933;">:</span>actionURL<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>Llamo al POPUP</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
   function mostrar_popup() {
      var _dialog = Liferay.Popup( 	{
      width: 700,
      modal: true,
      message: '<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loading-animation&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>',
      position: ['center', 100],
      title: <span style="color: #009900;">&lt;liferay-ui:message key<span style="color: #ff0000;">&quot;popup-title&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>,
      resizable: false,
      draggable: false,
      onClose: function() {
         // se ejecuta cuando el portle se cierra
      }
   });
&nbsp;
   jQuery.ajax( {
      url: &quot;<span style="color: #009900;">&lt;%<span style="color: #66cc66;">=</span> url %&gt;</span>&quot;,
      success: function(message) {
         _dialog.html(message);
      }
   });
}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:mostrar_popup();&quot;</span>&gt;</span>mostrar popup<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p>Al definir el estado de la ventana como exclusivo, el resultado de la respuesta solamente va a ser el contenido del portlet al cual se invoca.</p>
<p><strong>Ejemplo:</strong></p>
<p><a href="http://www.lrlatinoblog.com.ar/wp-content/uploads/2008/11/mostrar-popup.png"><br />
<img class="alignnone size-medium wp-image-54" title="mostrar-popup" src="http://www.lrlatinoblog.com.ar/wp-content/uploads/2008/11/mostrar-popup-300x208.png" alt="" width="300" height="208" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lrlatinoblog.com.ar/2008/11/12/mostrar-un-portlet-en-un-popup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

