You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Alessandro La Rocca <al...@teracomsrl.it> on 2004/02/16 10:31:06 UTC

buildNormalContext called twice?

Hi all,

I created and configured a simple jsp portlet with the related action
class. Since it is a test, both the jsp template and the action class do
nothing other than printing a line (to the System.out) as debug for
checking the execution.

If I simply open the pane where this porlet is included, both the
template and the action are executed once. When I submit  any other
portlet (for instance, the StockQuotes) within the same pane, when this
is refreshed, my portlet action runs twice and the template just once.
Why?


Thank you,
Alessandro



-- the template
---------------------------------------------------------------------

<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld'
prefix='jetspeed' %>

<%
  System.out.println(">> SimpleJsp executed");
%>

<P><BR/>Hello</P>

-- the action
-----------------------------------------------------------------------

public class SimpleJspAction extends JspPortletAction {

  protected void buildNormalContext(Portlet portlet, RunData rundata) {
    System.out.println(">> SimpleJspAction.buildNormalContext
executed");
  }

-- the registry entry
---------------------------------------------------------------

    <portlet-entry name="SimpleJsp" hidden="false" type="ref"
        parent="JSP" application="false">
        <meta-info>
            <title>Simple Jsp</title>
        </meta-info>
 
<classname>org.apache.jetspeed.portal.portlets.JspPortlet</classname>
        <parameter name="template" value="SimpleJsp.jsp"
            hidden="true" cachedOnName="true" cachedOnValue="true"/>
        <parameter name="action"
            value="portlets.SimpleJspAction" hidden="true"
            cachedOnName="true" cachedOnValue="true"/>
        <media-type ref="html"/>
        <url cachedOnURL="true"/>
        <category group="Jetspeed">my.portlets</category>
    </portlet-entry>

-- the PSML entry (anon user)
-------------------------------------------------------

    <portlets id="1009">
        <metainfo>
            <title>My Portlets</title>
        </metainfo>
        <security-ref parent="anon-view_admin-all"/>
        <controller name="TwoColumns"/>
        <portlets id="1010">
            <layout position="-1" size="-1">
                <property name="row" value="0"/>
                <property name="column" value="0"/>
            </layout>
            <entry id="1011" parent="StockQuote"/>
        </portlets>
        <portlets id="1012">
            <layout position="-1" size="-1">
                <property name="row" value="1"/>
                <property name="column" value="0"/>
            </layout>
            <entry id="1013" parent="SimpleJsp"/>
        </portlets>
    </portlets>



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