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 "Luta, Raphael (VUN)" <Ra...@groupvu.Com> on 2003/08/07 18:23:30 UTC

RE : RE : JSP layouts in Jetspeed

De : Meghan_E_Pietila@eFunds.Com [mailto:Meghan_E_Pietila@eFunds.Com]
>
> Raphael--
>
> Thank you for the advice; I did change the files (I believe
> you meant to change the tr.properties value to
> "/templates/jsp" instead of just
> "/templates"?)
>

Yes. sorry for the typo.

> Unfortunately, the error message has not changed at all.
>
> Anyone else have ideas?  I'll keep searching the
> newsgroups--if I find a solution, I'll post it.
>

Don't you have additionnal information in your logs, either
Jetspeed or Websphere ?

--
Raphaƫl Luta - raphael@apache.org
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

**********************************************
Vivendi Universal - HTTP://www.vivendiUniversal.com:
The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or privileged
material of Vivendi Universal which is for the exclusive use of the
individual designated above as the recipient. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact immediately
the sender by returning e-mail and delete the material from any computer.
If you are not the specified recipient, you are hereby notified that all
disclosure, reproduction, distribution or action taken on the basis of this
message is prohibited.

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


VelocityPortlet problem

Posted by Yan Liu <ya...@hotpop.com>.
I wrote a test velocity portlet which is very simple,
but it seems that after pressing the submit button, it's 
always the default vm is loaded next. I don't know if jetspeed
didn't find the right action method or in the action method, the
setTemplate() method doesn't work. Who had the same trouble before?
what to do? But some other examples from jetspeed tutorial work very fine.

Can anybody help? Thanks a lot.

Samuel

Here is the vm files, quite simple:

test-default.vm:

<form method="POST" action="$jslink.Template">
        <p>Now is step $!stepnumber</p>
        <p><input type="submit" value="goto 1" name="eventSubmit_doGMTest1"></p>
</form>

test-1.vm:

<form method="POST" action="$jslink.Template">
        <p>Now is step $!stepnumber</p>
        <p><input type="submit" value="goto 2" name="eventSubmit_doGMTest2"></p>
</form>

test-2.vm:
<p>this is the end at step $!stepnumber</p>

testActin class:

package org.apache.jetspeed.modules.actions.mytest;
.....
public class GMTestAction extends VelocityPortletAction {
    private String property_stepnumber = "stepnumber";
    public buildNormalContext(...) {}
    public void doGMTest1( RunData runData, Context myContext ) {
        myContext.put(property_stepnumber, new Integer(1));
        setTemplate(runData, "test-1");
    }
    public void doGMTest2( RunData runData, Context myContext ) {
        myContext.put(property_stepnumber, new Integer(2));
        setTemplate(runData, "test-2");
    }
}

portlet registry:(.xreg)
<registry>
  <portlet-entry name="my-test" hidden="false" type="ref"
        parent="CustomizerVelocity" application="false">
    <meta-info>
      <title>jetspeed-test</title>
      <description>test jetspeed </description>
    </meta-info>
    <classname>org.apache.jetspeed.portal.portlets.CustomizerVelocityPortlet</classname>
    <parameter name="template" value="test-default" hidden="false"
            cachedOnName="true" cachedOnValue="true"/>
    <parameter name="cache-period-milliseconds" value="0"
            hidden="false" cachedOnName="true" cachedOnValue="true"/>
    <parameter name="action" value="mytest.GMTestAction"
            hidden="false" cachedOnName="true" cachedOnValue="true"/>
    <parameter name="stepnumber" value="0"
            hidden="false" cachedOnName="true" cachedOnValue="true"/>
    <media-type ref="html"/>
    <url cachedOnURL="true"/>
</registry>


VelocityPortlet problem

Posted by Yan Liu <ya...@hotpop.com>.
I wrote a test velocity portlet which is very simple,
but it seems that after pressing the submit button, it's 
always the default vm is loaded next. I don't know if jetspeed
didn't find the right action method or in the action method, the
setTemplate() method doesn't work. Who had the same trouble before?
what to do? But some other examples from jetspeed tutorial work very fine.

Can anybody help? Thanks a lot.

Samuel

Here is the vm files, quite simple:

test-default.vm:

<form method="POST" action="$jslink.Template">
        <p>Now is step $!stepnumber</p>
        <p><input type="submit" value="goto 1" name="eventSubmit_doGMTest1"></p>
</form>

test-1.vm:

<form method="POST" action="$jslink.Template">
        <p>Now is step $!stepnumber</p>
        <p><input type="submit" value="goto 2" name="eventSubmit_doGMTest2"></p>
</form>

test-2.vm:
<p>this is the end at step $!stepnumber</p>

testActin class:

package org.apache.jetspeed.modules.actions.mytest;
.....
public class GMTestAction extends VelocityPortletAction {
    private String property_stepnumber = "stepnumber";
    public buildNormalContext(...) {}
    public void doGMTest1( RunData runData, Context myContext ) {
        myContext.put(property_stepnumber, new Integer(1));
        setTemplate(runData, "test-1");
    }
    public void doGMTest2( RunData runData, Context myContext ) {
        myContext.put(property_stepnumber, new Integer(2));
        setTemplate(runData, "test-2");
    }
}

portlet registry:(.xreg)
<registry>
  <portlet-entry name="my-test" hidden="false" type="ref"
        parent="CustomizerVelocity" application="false">
    <meta-info>
      <title>jetspeed-test</title>
      <description>test jetspeed </description>
    </meta-info>
    <classname>org.apache.jetspeed.portal.portlets.CustomizerVelocityPortlet</classname>
    <parameter name="template" value="test-default" hidden="false"
            cachedOnName="true" cachedOnValue="true"/>
    <parameter name="cache-period-milliseconds" value="0"
            hidden="false" cachedOnName="true" cachedOnValue="true"/>
    <parameter name="action" value="mytest.GMTestAction"
            hidden="false" cachedOnName="true" cachedOnValue="true"/>
    <parameter name="stepnumber" value="0"
            hidden="false" cachedOnName="true" cachedOnValue="true"/>
    <media-type ref="html"/>
    <url cachedOnURL="true"/>
</registry>


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