<?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; configuracion</title>
	<atom:link href="http://www.lrlatinoblog.com.ar/tag/configuracion/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>Portlet de sistema</title>
		<link>http://www.lrlatinoblog.com.ar/2008/11/19/portlet-de-sistema/</link>
		<comments>http://www.lrlatinoblog.com.ar/2008/11/19/portlet-de-sistema/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 14:38:35 +0000</pubDate>
		<dc:creator>joyola83</dc:creator>
				<category><![CDATA[configuracion]]></category>
		<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[portlet]]></category>

		<guid isPermaLink="false">http://www.lrlatinoblog.com/?p=56</guid>
		<description><![CDATA[En varias ocasiones tuve el requerimiento de no mostrar algunos portlets en la lista de portlets disponibles para ser agregados a una página, y este ocultamiento no se podia hacer mediante permisos porque el usuario tenia que usar el portlet &#8230; <a href="http://www.lrlatinoblog.com.ar/2008/11/19/portlet-de-sistema/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>En varias ocasiones tuve el requerimiento de no mostrar algunos portlets en la lista de portlets disponibles para ser agregados a una página, y este ocultamiento no se podia hacer mediante permisos porque el usuario tenia que usar el portlet y no debia tirar el error de que el portlet no estaba disponibles.  Entonces me di cuenta de que algunos portlets del core de Liferay no estaban disponibles para ser agregados a una página, por ejemplo el portlet de Look and Feel, el My Account o el del Page Setting.  Para esto hay que declarar al portlet como portlet de sistema en liferay-portlet.xml.</p>
<p><strong>liferay-portlet.xml</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;portlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;portlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>MIPORTLET<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/portlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    ...
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;system<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>;rue<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/system</span>&lt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/portlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Desde otro portlet vamos a llamar a MIPORTLET</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>
&nbsp;
PortletURL miPortletURL <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PortletURLImpl<span style="color: #009900;">&#40;</span>
request, <span style="color: #0000ff;">&quot;MIPORTLET&quot;</span>, plid, PortletRequest.<span style="color: #006633;">ACTION_PHASE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
miPortletURL.<span style="color: #006633;">setWindowState</span><span style="color: #009900;">&#40;</span>WindowState.<span style="color: #006633;">MAXIMIZED</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
miPortletURL.<span style="color: #006633;">setPortletMode</span><span style="color: #009900;">&#40;</span>PortletMode.<span style="color: #006633;">VIEW</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
miPortletURL.<span style="color: #006633;">setParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;struts_action&quot;</span>, <span style="color: #0000ff;">&quot;/miportlet/view&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">%&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;%= miPortletURL %&gt;&quot;</span><span style="color: #339933;">&lt;</span>IR A MI PORTLET<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.lrlatinoblog.com.ar/2008/11/19/portlet-de-sistema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configurar las preferencias de los Portlets</title>
		<link>http://www.lrlatinoblog.com.ar/2008/11/10/configurar-las-preferencias-de-los-portlets/</link>
		<comments>http://www.lrlatinoblog.com.ar/2008/11/10/configurar-las-preferencias-de-los-portlets/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 02:25:33 +0000</pubDate>
		<dc:creator>joyola83</dc:creator>
				<category><![CDATA[configuracion]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[desarrollo]]></category>

		<guid isPermaLink="false">http://www.lrlatinoblog.com/?p=24</guid>
		<description><![CDATA[En primer lugar vamos a crear un portlet con el Plugin SDK y luego vamos a editar el archivo $SDK_HOME/docroot/WEB-INF/portlet.xml. En este caso vamos a ver la configuración del Portlet RSS para tener un ejemplo concreto para ver, luego de &#8230; <a href="http://www.lrlatinoblog.com.ar/2008/11/10/configurar-las-preferencias-de-los-portlets/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>En primer lugar vamos a crear un portlet con el Plugin SDK y luego vamos a editar el archivo <strong>$SDK_HOME/docroot/WEB-INF/portlet.xml</strong>.</p>
<p>En este caso vamos a ver la configuración del Portlet RSS para tener un ejemplo concreto para ver, luego de agregar las propiedades vamos a ver como obtenemos dichos valores.</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;portlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;portlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>RSS<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/portlet-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;display-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>RSS<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/display-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;portlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.liferay.portlet.StrutsPortlet<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/portlet-class<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>view-action<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/rss/view<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/init-param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;expiration-cache<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/expiration-cache<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;supports<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mime-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>text/html<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mime-type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/supports<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resource-bundle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.liferay.portlet.StrutsResourceBundle<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resource-bundle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;portlet-preferences<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;preference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>urls<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://rss.news.yahoo.com/rss/tech<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://csmonitor.com/rss/scitech.rss<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://partners.userland.com/nytRss/technology.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/preference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;preference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>items-per-channel<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/preference<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/portlet-preferences<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;security-role-ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;role-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>power-user<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/role-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/security-role-ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;security-role-ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;role-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>user<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/role-name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/security-role-ref<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/portlet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>En ese caso hemos creado 2 preferencias, <strong>urls</strong> y <strong>items-per-channel</strong></p>
<p>Para obener estos valores hay que hacer:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">PortletPreferences porttletPreferences <span style="color: #339933;">=</span> renderRequest.<span style="color: #006633;">getPortletPreferences</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> urls <span style="color: #339933;">=</span> porttletPreferences.<span style="color: #006633;">getValues</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;urls&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">long</span> ipc <span style="color: #339933;">=</span> GetterUtil.<span style="color: #006633;">getLong</span><span style="color: #009900;">&#40;</span>portletPreferences.<span style="color: #006633;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;items-per-channel&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.lrlatinoblog.com.ar/2008/11/10/configurar-las-preferencias-de-los-portlets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

