velocity portlet without action class?

2004-11-08 Thread Dan Moore
Hi folks,

I'm interested in a simple portlet that will just have one velocity
template.  I looked at the VelocityPortlet, but that has a backing
action class that I just don't need (everything is available in message
bundles via l10n).  I looked at the portlet catalog and in the
demo-portlets registry entry, but didn't find anything that looked
applicable.

I'm using jetspeed 1.5.

Thanks,
Dan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Javascript validation in a velocity portlet using panes

2004-06-28 Thread Jean-Bruno Giard
Hello
I have an HTML form in a Velocity portlet using panes. I would like to know 
if it is possible to validate this form with Javascript. I tried to create 
hidden fields but when I have more than one fields to validate, it does not 
work.

Here is my code :
For this code, I tried to validate "Description" and "Due date" fields.
Thank you in advance
Jean-Bruno Giard



<!--
function ValidateTemplate()
{
var FieldList = "";
// Field1 validation.
if (document.form.description.value == "")
{
FieldList = "Description\n"; // Message to user.
};
// Field2 validation.
if (document.form.duedate.value == "")
{
FieldList = FieldList + "Due date\n"; // Message to user.
};</pre><br>
<pre style="margin: 0em;">// Other validations go here. Copy from above.
// Submit form or display message.
if (FieldList == "")
{
document.form.submit();
} else
{
alert("Please fill in the following field(s):\n\n" + FieldList);
};
}</pre><br>
<pre style="margin: 0em;">function save()
{
document.form.eventSubmit_doSave.value="Save";
if (ValidateTemplate())
{
document.form.submit();
}
}</pre><br>
<tt>//--><br>




 
   
 
   
 


 
 
 
 
   
 
   
 
  
   






 
   
 #set ( $tabNames = ["description", "context","due_date"] )
 #set ( $tabActions = ["doDescription", "doContext", "doDue_date"] 
)
 #set ( $index = 0 )
 #foreach ( $name in $tabNames )
 #if ( $curTab == $name )


 
   $name
 
 #else
 
   $name
   #end
 
 #set ( $index = $index + 1 )
 #end
   
 
   
   
 
   
 #if ( $curTab == "description")
 
   
 Description : 
   
 $!curTemplate.getDescription()
   
 
 #elseif ( $curTab == "context" )
 
   
 Context :
   
 $!curTemplate.getContext()
   
 
 
 #elseif ( $curTab == "due_date" )
 
   
 Due date :
   
 
   
 
 #end
 
   
 




_
MSN Search, le moteur de recherche qui pense comme vous !  
http://fr.ca.search.msn.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


automatically changing the title of a velocity portlet

2004-06-10 Thread Johannes Hackl
Hi,
 
I want dynamically change the title of a velocity portlet without
entering the customize mode where i can change the title manually.. The
thing I try to achieve is the following:
I can set the template of a velocity portlet with the help of another
velocity portlet and for the different contents that can be displayed in
the velocity portlet I want to adjust the portlet title.
 
Thanks for your help!
 
Lg joey
 


Re: problem with velocity portlet-org-

2004-05-20 Thread Raphael Luta
masa lang wrote:
Hi raphael,
 
i did what you said but i saw something bizzare , there is no portlet (.class like XSLPortlet, VelocityPortlet, etc...):
C:\tomcat\webapps\jetspeed\WEB-INF\classes\org\apache\jetspeed\modules\actions\portlets 
but in the interface of jetspeed  i saw them in portlets browser and i can use them !!!
 
What is wrong ?
 
Nothing :)
Portlets are located in the org.apache.jetspeed.portal.portlets package
but what you want to do is *not* creating a brand new portlet class but
use the VelocityPortlet.
The behavior of this protlet can be customized by your action class and
this class must be in org.apache.jetspeed.modules.actions.portlets (or
any Turbine modules package you define in your properties file).
In short:
portlets go to:
WEB-INF/classes/org/apache/jetspeed/portal/portlets
VelcoityPortlet or JSPPortlet action classes go to: 
WEB-INF/classes/org/apache/jetspeed/modules/action/portlets.

--
Raphaël Luta - [EMAIL PROTECTED]
Apache Jetspeed - Enterprise Portal in Java
http://portals.apache.org/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: problem with velocity portlet-org-

2004-05-20 Thread Vikas Gupta
Hi Masa
Actually the classes are present in jetspeed1_5.jar.
So there i no need for them to be in ur local classes directory.
Regards
Vikas

-Original Message-
From: masa lang [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 8:15 PM
To: Jetspeed Users List
Subject: Re: problem with velocity portlet-org-


Hi raphael,
 
i did what you said but i saw something bizzare , there is no portlet
(.class like XSLPortlet, VelocityPortlet, etc...):
C:\tomcat\webapps\jetspeed\WEB-INF\classes\org\apache\jetspeed\modules\a
ctions\portlets 
but in the interface of jetspeed  i saw them in portlets browser and
i can use them !!!
 
What is wrong ?
 
thanks
 


raphael <[EMAIL PROTECTED]> wrote:
masa lang wrote:

>Hi ,
> 
>i want to devleop my first velocity portlet , i put the class file in :
>C:\tomcat\webapps\jetspeed\WEB-INF\classes\org\apache\jetspeed\portal\p
ortlets
> 
>and the vm file in :
>C:\tomcat\webapps\jetspeed\WEB-INF\templates\vm\portlets\html
>in myVm.vm , i have a variable $!name 
>this $name is initialised in myClass ..
> 
>i created a velocity portlet with {action : myClass & template :myVm}
>when i tried to see it (this variable $name )
> 
>What's wrong ?
> 
> 
>
Your action class should be in:
WEB-INF/classes/org/apache/jetspeed/modules/actions/portlets

portal/portlets is where you'll find the actual complete Portlets
like the XSLPortlet, VelocityPortlet, etc... but since you're using
an existing portlet you don't have to deal with package.

--
Raphael Luta - [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Post your free ad now! Yahoo! Canada Personals

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with velocity portlet-org-

2004-05-20 Thread masa lang
Hi raphael,
 
i did what you said but i saw something bizzare , there is no portlet (.class like 
XSLPortlet, VelocityPortlet, etc...):
C:\tomcat\webapps\jetspeed\WEB-INF\classes\org\apache\jetspeed\modules\actions\portlets
 
but in the interface of jetspeed  i saw them in portlets browser and i can use 
them !!!
 
What is wrong ?
 
thanks
 


raphael <[EMAIL PROTECTED]> wrote:
masa lang wrote:

>Hi ,
> 
>i want to devleop my first velocity portlet , i put the class file in :
>C:\tomcat\webapps\jetspeed\WEB-INF\classes\org\apache\jetspeed\portal\portlets
> 
>and the vm file in :
>C:\tomcat\webapps\jetspeed\WEB-INF\templates\vm\portlets\html
>in myVm.vm , i have a variable $!name 
>this $name is initialised in myClass ..
> 
>i created a velocity portlet with {action : myClass & template :myVm}
>when i tried to see it (this variable $name )
> 
>What's wrong ?
> 
> 
>
Your action class should be in:
WEB-INF/classes/org/apache/jetspeed/modules/actions/portlets

portal/portlets is where you'll find the actual complete Portlets
like the XSLPortlet, VelocityPortlet, etc... but since you're using
an existing portlet you don't have to deal with package.

--
Raphael Luta - [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Post your free ad now! Yahoo! Canada Personals


Re: problem with velocity portlet

2004-05-20 Thread raphael
masa lang wrote:
Hi ,
i want to devleop my first velocity portlet , i put the class file in :
C:\tomcat\webapps\jetspeed\WEB-INF\classes\org\apache\jetspeed\portal\portlets
and the vm file in :
C:\tomcat\webapps\jetspeed\WEB-INF\templates\vm\portlets\html
in myVm.vm  ,  i have a variable $!name 
this $name is initialised  in myClass ..

i created a velocity portlet with {action : myClass & template :myVm}
when i tried to see it  (this variable $name )
What's wrong ?
 

Your action class should be in:
WEB-INF/classes/org/apache/jetspeed/modules/actions/portlets
portal/portlets is where you'll find the actual complete Portlets
like the XSLPortlet, VelocityPortlet, etc... but since you're using
an existing portlet you don't have to deal with package.
--
Raphael Luta - [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


problem with velocity portlet

2004-05-19 Thread masa lang
Hi ,
 
i want to devleop my first velocity portlet , i put the class file in :
C:\tomcat\webapps\jetspeed\WEB-INF\classes\org\apache\jetspeed\portal\portlets
 
and the vm file in :
C:\tomcat\webapps\jetspeed\WEB-INF\templates\vm\portlets\html
in myVm.vm  ,  i have a variable $!name 
this $name is initialised  in myClass ..
 
i created a velocity portlet with {action : myClass & template :myVm}
when i tried to see it  (this variable $name )
 
What's wrong ?
 
thanks in advance 
 
massa



-
Post your free ad now! Yahoo! Canada Personals


Re: Velocity Portlet

2004-02-10 Thread Bela Kovac
Am 10.02.2004 um 09:17 schrieb Pernoud Aurelien:

You're missing the media-type parameter in your portlet xreg, see 
archives, this has been answered.
Thank you for your help. It didn't work out at first, but then i 
noticed that Jetspeed seems to be caching my xreg-files. I had to stop 
Tomcat, then remove the old xreg-files, copy the new ones, and starting 
Tomcat anew.

Bela

--
"Der Blitzableiter auf einem Kirchturm ist das denkbar stärkste 
Misstrauensvotum gegen den lieben Gott."
  -- Karl Kraus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Velocity Portlet

2004-02-10 Thread Pernoud Aurelien
You're missing the media-type parameter in your portlet xreg, see archives, this has 
been answered.

Aurelien

Bela Kovac a écrit :

> Hi again,
> 
> i am having trouble getting a test portlet (velocity) to work. The
> portlet doesn't show up in the "Add Portlet" menu.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Velocity Portlet

2004-02-09 Thread Bela Kovac
Hi again,

i am having trouble getting a test portlet (velocity) to work. The  
portlet doesn't show up in the "Add Portlet" menu.

I don't see anything problematic in the logs:

gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$  
grep -i helloWorld log/*
log/jetspeedservices.log:2004-02-09 18:27:29,557 [http8080-Processor21]  
DEBUG CastorRegistryService - RegistryService: Adding entry  
pripeHelloWorld of class class  
org.apache.jetspeed.om.registry.base.BasePortletEntry to registry  
Registry
log/jetspeedservices.log:2004-02-09 18:27:29,959 [Thread-221] DEBUG  
CastorRegistryService - RegistryService: No changes to entry  
pripeHelloWorld

The xreg-file:

gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$  
cat conf/pripeHelloWorld.xreg



parent="Velocity" application="false">

    PRiPE Hello World
Minimales Velocity-Portlet

 
org.apache.jetspeed.portal.portlets.VelocityPortlet

cachedOnName="true" cachedOnValue="true"/>

hidden="true" cachedOnName="true" cachedOnValue="true"/>

cachedOnName="true" cachedOnValue="true"/>

PRiPE



The vm-file:

gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$  
cat templates/vm/portlets/html/pripeHelloWorld.vm
Test

Blah, blubb, bloing.

The class file resides in  
classes/de/upb/zit/pripe/jetspeed/modules/actions/portlets  
(conf/TurbineResources.properties is updated:  
module.packages=de.upb.zit.pripe.jetspeed.modules). The corresponding  
java source:

gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$  
cat  
src/de/upb/zit/pripe/jetspeed/modules/actions/portlets/ 
HelloWorldAction.java
/*
 * Created on 09.02.2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package de.upb.zit.pripe.jetspeed.modules.actions.portlets;

import  
org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
import org.apache.jetspeed.portal.portlets.VelocityPortlet;
import org.apache.turbine.util.RunData;
import org.apache.velocity.context.Context;

/**
 * @author wizard
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class HelloWorldAction extends VelocityPortletAction {
protected void buildNormalContext(VelocityPortlet portlet,  
Context context, RunData rundata) {

//String test = "Bl";
    //context.put("test", test);
}

}

Does anyone know what i'm missing?

---

Besides that, i have another velocity portlet, also not working, where  
the logs say:

log/jetspeedservices.log:2004-02-09 18:32:30,503 [Thread-221] DEBUG  
CastorRegistryService - RegistryService: Skipping fragment  
/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF/conf/ 
velocityExample.xreg

Don't know what's going on here, too. The xreg-file:

gonzales:/java/jakarta-tomcat-5.0.18/webapps/jetspeed/WEB-INF wizard$  
cat conf/pripeVelocityExample.xreg



parent="Velocity" application="false">

PRiPE Velocity Example
Mal schauen obs klappt...

 
org.apache.jetspeed.portal.portlets.VelocityPortlet

hidden="true" cachedOnName="true" cachedOnValue="true"/>

hidden="true" cachedOnName="true" cachedOnValue="true"/>

hidden="false" cachedOnName="true" cachedOnValue="true">

Kleiner Test-Text-String
Eigentlich total unwichtig



hidden="false" cachedOnName="true" cachedOnValue="true">

Text-String
Nur so als kleiner Test...



cachedOnName="true" cachedOnValue="true">

LDAP Search Base
Welcher Teil des LDAP-Baums soll  
durchsucht werden



PRiPE



Is the error in the xreg-file itself, or could it be that the class  
file or whatever is causing this strange log message?

Am fighting with this darn portlets all afternoon. If anyone can help  
me save the day, that would be great! :-)

Bela

--
"Der Blitzableiter auf einem Kirchturm ist das denkbar stärkste  
Misstrauensvotum gegen den lieben Gott."
  -- Karl Kraus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: Including a web page into a velocity portlet

2003-01-22 Thread Heine, Christian (Extern)
Hi,

i hope that i've understood correctly what u're problem is : U will have an
half dynamic Velocity Portlet, which shows u a webpage content form an url
inserted in a text field.

I've solved this in my portal by using IFRAME Elements (for representig the
web content) in my Velocity Portlets. For representing the web content u
must refresh u're portlet by an action which uses the setTemplate Method to
call the same portlet. Is the page refreshed (check this by an Flag in the
$data Object) force the Iframe to show the URL.

Thats all and it works fine :o), bye
Christian


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Including a web page into a velocity portlet

2003-01-22 Thread Stuart Belden
If i understand correctly, you want to have a portlet with an html FORM submit to some 
arbitrary URL, then display the results of that submit in the portlet?

One way to do this would be to have the portlet call a velocity action on submit, grab 
all the FORM parms from the rundata, then make a URLConnection to the "real" submit 
url passing along all the FORM parms you just grabbed.

>>> [EMAIL PROTECTED] 01/21/03 01:58PM >>>
How can I program my velocity portlet to include a page (not necessarily a
.vm page). 
 
Ex. The velocity portlet shows a form with a field "name" within the form. 
 
When the user submits this form, the portlet should display within the
portlet space, the result of the page ->
<http://someaddress/page.cgi?name=> http://someaddress/page.cgi?name=.
 
Thanks.


 

 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Including a web page into a velocity portlet

2003-01-21 Thread Damle, Nikhil
How can I program my velocity portlet to include a page (not necessarily a
.vm page). 
 
Ex. The velocity portlet shows a form with a field "name" within the form. 
 
When the user submits this form, the portlet should display within the
portlet space, the result of the page ->
<http://someaddress/page.cgi?name=> http://someaddress/page.cgi?name=.
 
Thanks.


 

 



RE: HELP!!! showing a jsp in a velocity portlet?

2002-12-06 Thread Luta, Raphael (VUN)
You can if you really need to by making the RequestDispatcher available
in the Velocity portlet context but what don't you just use JspPortlet ?

> -Message d'origine-
> De : Leonard Flournoy [mailto:[EMAIL PROTECTED]]
> Envoyé : vendredi 6 décembre 2002 06:58
> À : Jetspeed Users List
> Objet : HELP!!! showing a jsp in a velocity portlet?
> 
> 
> Is it possible to display a jsp file in a velocity porlet? If so, how?
> 
> Please help!!
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




HELP!!! showing a jsp in a velocity portlet?

2002-12-06 Thread Leonard Flournoy
Is it possible to display a jsp file in a velocity porlet? If so, how?

Please help!!



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Velocity Portlet

2002-11-14 Thread Luta, Raphael (VUN)
Don't define  in your portlet definition and make
sure your package follows the Turbine naming conventions, ie
your action must in a packe like this:

.actions.

based on your example below

com.xymphany.portlet.general.actions.portlets.TestAction

although you could have put in the action parameter a "TestAction" value
which would allow you to use

com.xymphany.portlet.general.actions.TestAction

All this assuming you have defined either in TurbineResources.properties
or my.properties:
module.packages=com.xymphany.portlet.general

> -Message d'origine-
> De : Mohd Amin [mailto:princeamin@;hotmail.com]
> Envoyé : jeudi 14 novembre 2002 06:27
> À : [EMAIL PROTECTED]
> Objet : Velocity Portlet
> 
> 
> Hi,
> 
> Been trying to create my own velocity portlet but have been 
> unsuccessful.
> The registry entry looks like this
> 
> ---*.xreg-
>  parent="Velocity" application="false">
> 
> Sample Velocity Action
> Test velocity portlet
> 
> com.xymphany.portlet.general.action.TestAction
>  cachedOnName="true" cachedOnValue="true"/>
>  hidden="false" cachedOnName="true" cachedOnValue="true"/>
> 
> Velocity
> 
> --*.xreg---
> 
> --com.xymphany.portlet.general.action.TestAction-
> package com.xymphany.portlet.general.action;
> 
> // Jetspeed
> import 
> org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
> import org.apache.jetspeed.services.rundata.JetspeedRunData;
> import org.apache.jetspeed.portal.portlets.VelocityPortlet;
> 
> // Velocity
> import org.apache.velocity.context.Context;
> 
> // Turbine
> import org.apache.turbine.util.ParameterParser;
> import org.apache.turbine.util.RunData;
> import org.apache.turbine.services.logging.TurbineLogging;
> 
> public class TestAction extends VelocityPortletAction
> {
> 
>   TurbineLogging tb = new TurbineLogging();
> 
>   protected void buildNormalContext( VelocityPortlet velocityPortlet,
> Context context, RunData runData )
>   {
> try
> {
>   tb.debug( "TestAction::Starting to enter context data" );
>   context.put( "Developer", "Mohd Amin Mohd Din" );
>   context.put( "Company", "Xymphany" );
>   context.put( "Version", "0.01" );
>   tb.debug( "TestAction::End of entering context data" );
> }
> catch( Exception e )
> {
>   tb.error( "TestAction::" + e.getMessage() );
>   context.put( "message", e.getMessage() );
> }
>   }
> -com.xymphany.portlet.general.action.TestAction---
> 
> Error message
> 
> ---jetpseed.log---
> java.lang.ClassCastException: 
> com.xymphany.portlet.general.action.TestAction
>  at
> org.apache.jetspeed.services.portletfactory.JetspeedPortletFac
> toryService.ge
> tPortlet(JetspeedPortletFactoryService.java:308)
>  at
> org.apache.jetspeed.services.portletfactory.JetspeedPortletFac
> toryService.ge
> tPortlet(JetspeedPortletFactoryService.java:157)
>  at
> org.apache.jetspeed.services.PortletFactory.getPortlet(Portlet
> Factory.java:9
> 2)
>  at
> org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolk
> itService.getS
> et(JetspeedPortalToolkitService.java:426)
>  at
> org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolk
> itService.getS
> et(JetspeedPortalToolkitService.java:407)
>  at
> org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolk
> itService.getS
> et(JetspeedPortalToolkitService.java:363)
>  at
> org.apache.jetspeed.services.PortalToolkit.getSet(PortalToolki
> t.java:165)
>  at
> org.apache.jetspeed.util.template.JetspeedTool.getPane(Jetspee
> dTool.java:173
> )
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:42
> )
>  
> .
> ...
> -jetspeed
> 
> Any ideas?
> 
> Thanks
> Amin
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jetspeed-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:jetspeed-user-help@;jakarta.apache.org>
> 

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




RE: Velocity Portlet

2002-11-14 Thread Stefaan
You're gettint definitions of portlets and actions mixed up.
Check out the comments below and the documentation on the web site.

> -Original Message-
> From: Mohd Amin [mailto:princeamin@;hotmail.com]
> Sent: donderdag 14 november 2002 6:27
> To: [EMAIL PROTECTED]
> Subject: Velocity Portlet
>
>
> Hi,
>
> Been trying to create my own velocity portlet but have been unsuccessful.
> The registry entry looks like this
>
> ---*.xreg-

here you define a portlet, say XymphonyPortlet instead of VelocityAction.
parent should be VelocityPortlet (check the conf/xreg files for the exact
name)
>  parent="Velocity" application="false">
> 
> Sample Velocity Action
> Test velocity portlet
> 
You need to define a class of a portlet here not an action. However, the
parent portlet spec
usually already has a class definition. Only when your portlet has behaviour
which cannot be handled by
an action should have to specify your own portlet class.
> com.xymphany.portlet.general.action.TestAction
>  cachedOnName="true" cachedOnValue="true"/>
>  hidden="false" cachedOnName="true" cachedOnValue="true"/>
> 
> Velocity
> 
> --*.xreg---
>
> --com.xymphany.portlet.general.action.TestAction-
> package com.xymphany.portlet.general.action;
>
> // Jetspeed
> import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
> import org.apache.jetspeed.services.rundata.JetspeedRunData;
> import org.apache.jetspeed.portal.portlets.VelocityPortlet;
>
> // Velocity
> import org.apache.velocity.context.Context;
>
> // Turbine
> import org.apache.turbine.util.ParameterParser;
> import org.apache.turbine.util.RunData;
> import org.apache.turbine.services.logging.TurbineLogging;
>
> public class TestAction extends VelocityPortletAction
> {
>
>   TurbineLogging tb = new TurbineLogging();
>
>   protected void buildNormalContext( VelocityPortlet velocityPortlet,
> Context context, RunData runData )
>   {
> try
> {
>   tb.debug( "TestAction::Starting to enter context data" );
>   context.put( "Developer", "Mohd Amin Mohd Din" );
>   context.put( "Company", "Xymphany" );
>   context.put( "Version", "0.01" );
>   tb.debug( "TestAction::End of entering context data" );
> }
> catch( Exception e )
> {
>   tb.error( "TestAction::" + e.getMessage() );
>   context.put( "message", e.getMessage() );
> }
>   }
> -com.xymphany.portlet.general.action.TestAction---
>
> Error message
>
> ---jetpseed.log---
> java.lang.ClassCastException:
> com.xymphany.portlet.general.action.TestAction
>  at
> org.apache.jetspeed.services.portletfactory.JetspeedPortletFactory
> Service.ge
> tPortlet(JetspeedPortletFactoryService.java:308)
>  at
> org.apache.jetspeed.services.portletfactory.JetspeedPortletFactory
> Service.ge
> tPortlet(JetspeedPortletFactoryService.java:157)
>  at
> org.apache.jetspeed.services.PortletFactory.getPortlet(PortletFact
> ory.java:9
> 2)
>  at
> org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolkitSe
> rvice.getS
> et(JetspeedPortalToolkitService.java:426)
>  at
> org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolkitSe
> rvice.getS
> et(JetspeedPortalToolkitService.java:407)
>  at
> org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolkitSe
> rvice.getS
> et(JetspeedPortalToolkitService.java:363)
>  at
> org.apache.jetspeed.services.PortalToolkit.getSet(PortalToolkit.java:165)
>  at
> org.apache.jetspeed.util.template.JetspeedTool.getPane(JetspeedToo
> l.java:173
> )
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
> pl.java:42
> )
>  
> .
> ...
> -jetspeed
>
> Any ideas?
>
> Thanks
> Amin
>
> --
> To unsubscribe, e-mail:
> <mailto:jetspeed-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:jetspeed-user-help@;jakarta.apache.org>
>



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




Velocity Portlet

2002-11-13 Thread Mohd Amin
Hi,

Been trying to create my own velocity portlet but have been unsuccessful.
The registry entry looks like this

---*.xreg-


Sample Velocity Action
Test velocity portlet

com.xymphany.portlet.general.action.TestAction



Velocity

--*.xreg---

--com.xymphany.portlet.general.action.TestAction-
package com.xymphany.portlet.general.action;

// Jetspeed
import org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction;
import org.apache.jetspeed.services.rundata.JetspeedRunData;
import org.apache.jetspeed.portal.portlets.VelocityPortlet;

// Velocity
import org.apache.velocity.context.Context;

// Turbine
import org.apache.turbine.util.ParameterParser;
import org.apache.turbine.util.RunData;
import org.apache.turbine.services.logging.TurbineLogging;

public class TestAction extends VelocityPortletAction
{

  TurbineLogging tb = new TurbineLogging();

  protected void buildNormalContext( VelocityPortlet velocityPortlet,
Context context, RunData runData )
  {
try
{
  tb.debug( "TestAction::Starting to enter context data" );
  context.put( "Developer", "Mohd Amin Mohd Din" );
  context.put( "Company", "Xymphany" );
  context.put( "Version", "0.01" );
  tb.debug( "TestAction::End of entering context data" );
}
catch( Exception e )
{
  tb.error( "TestAction::" + e.getMessage() );
  context.put( "message", e.getMessage() );
}
  }
-com.xymphany.portlet.general.action.TestAction---

Error message

---jetpseed.log---
java.lang.ClassCastException: com.xymphany.portlet.general.action.TestAction
 at
org.apache.jetspeed.services.portletfactory.JetspeedPortletFactoryService.ge
tPortlet(JetspeedPortletFactoryService.java:308)
 at
org.apache.jetspeed.services.portletfactory.JetspeedPortletFactoryService.ge
tPortlet(JetspeedPortletFactoryService.java:157)
 at
org.apache.jetspeed.services.PortletFactory.getPortlet(PortletFactory.java:9
2)
 at
org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolkitService.getS
et(JetspeedPortalToolkitService.java:426)
 at
org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolkitService.getS
et(JetspeedPortalToolkitService.java:407)
 at
org.apache.jetspeed.services.portaltoolkit.JetspeedPortalToolkitService.getS
et(JetspeedPortalToolkitService.java:363)
 at
org.apache.jetspeed.services.PortalToolkit.getSet(PortalToolkit.java:165)
 at
org.apache.jetspeed.util.template.JetspeedTool.getPane(JetspeedTool.java:173
)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42
)
 
.
...
-jetspeed

Any ideas?

Thanks
Amin

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




Applet within Velocity Portlet & POST questions.

2002-09-17 Thread John Wubbel

Hello,

While I am not sure this is the best implementation, we have a 
Velocity portlet with an Applet we are starting from the template. In 

the applet we have done the usual coding to facilitate a POST method 
in order to send some user input back to the server whereby our 
ultimate action is to save it to the database. Consequently, we have 
been trying to simulate the eventSubmit_doUpdate as supported by the 
Turbine by rolling the action, name, value pairs into the stream.

The applet runs fine, the jetspeed.log looks normal in terms of 
buildNormalContext code path using Log.debug statements. When we do 
the actual POST we get back the response that we can read within the 
applet and dump it to the Java Console. For now we are not 
customizing the response in any way. However, the output to the 
jetspeed.log file is showing that our doUpdate is not executing our 
action. It is the same output that we saw when the portlet was 
instanciated. It is doing a buildNormalContext. 

Thus, I am wondering if the reason for this is that I am not doing a 
POST to the same session. Perhaps I have to pass a cookie to the 
applet when it is invoked. If this is true, I would appreciate any 
comments regarding how to do this via . Once 

we get the parameter in the applet for the cookie, how is it put into 

the POST? Is it a setRequestProperty call? Also, if I am going about 
this wrongly, I would like to hear other ideas for incorporating an 
applet as a portlet. Thanks ever so much for the help.

Sincerely,
John Wubbel
John Wubbel Consulting

 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: session validator and velocity portlet buildnormalcontext interaction

2002-09-12 Thread Pat Ryan


Well if no one else will answer my question, I guess I will ;)

I was getting the response.sendRedirect and I should have been setting this through
the RunData.

// this is the proper way to redirect in Turbine
   data.setRedirectURI(defaultLoginURL);

//  --> dont do this because your portlets will still get executed, then you are
redirected   response.sendRedirect(defaultLoginURL);

Pat

Pat Ryan wrote:

> We experienced what looks like some strange behaviour.  We have written
> a Session validator that will do a response.sendRedirect when the
> validation fails.  It looks like however, that our velocityportlet
> action's 'buildnormalcontext' is still be called, even though we asked
> for a redirect.
>
> I would have thought that if the session validator requested a redirect,
> that none of the portlets would called.
>
> Can anyone comment on whether this is expected behavior?
>
> Thanks
> Pat
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




session validator and velocity portlet buildnormalcontext interaction

2002-09-12 Thread Pat Ryan


We experienced what looks like some strange behaviour.  We have written
a Session validator that will do a response.sendRedirect when the
validation fails.  It looks like however, that our velocityportlet
action's 'buildnormalcontext' is still be called, even though we asked
for a redirect.

I would have thought that if the session validator requested a redirect,
that none of the portlets would called.

Can anyone comment on whether this is expected behavior?

Thanks
Pat





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity portlet with database connection: Where to store the connection?

2002-04-22 Thread gus

gus schrieb:
> James Wang schrieb:
> > very ease:) ,look my example: [...]
> >  public void doSearch(RunData data, Context context) {
> > DBConnection dbConn = null;
> > try {
> > dbConn = TurbineDB.getConnection();
> 
> I'd like to use Jetspeed with Hypersonic - but my portlet should connect to
> another database (MSSQL). How can this be done with the TurbineDB approach?

Is that where the TurbineDB.registerPool and TurbineDB.getConnection(pool)
methods are for?

Regards
   gus

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity portlet with database connection: Where to store the connection?

2002-04-22 Thread gus

James Wang schrieb:
> very ease:) ,look my example: [...] 
>  public void doSearch(RunData data, Context context) {
> DBConnection dbConn = null;
> try {
> dbConn = TurbineDB.getConnection();

Thanks for your answer.
I'm sure this works well if your using the same database for jetspeed and your
portlet. 
I'd like to use Jetspeed with Hypersonic - but my portlet should connect to
another database (MSSQL). How can this be done with the TurbineDB approach?

Regards
  gus

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Velocity portlet with database connection: Where to store the connection?

2002-04-22 Thread James Wang

very ease:) ,look my example ,or you can refer api
douments of the class
'org.apache.turbine.services.db.TurbineDB';

_

import org.apache.turbine.services.db.TurbineDB;
import org.apache.turbine.util.db.pool.DBConnection;
.
 public void doSearch(RunData data, Context context) {

DBConnection dbConn = null;


try {
dbConn = TurbineDB.getConnection();
java.sql.Statement st =
dbConn.createStatement();
java.sql.ResultSet rs =
st.executeQuery("select LOGIN_NAME
from TURBINE_USER");

while (rs.next())
userName = rs.getString(1);
context.put("userame", userName);

rs.close();
st.close();

}
catch (Exception e) {
// Either from obtaining the connection or
from your application code.
}
finally {
try {

   
TurbineDB.releaseConnection(dbConn);

}
catch (Exception e) {
// Error releasing database connection
back to pool.
}
}
}


__
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Réf. : Velocity portlet with database connection: Where to store the connection?

2002-04-22 Thread PierreBESSON


hello,

I ve made this in the portlet :
host, login and pwd are parameters of portlet and saved in the psml
SaisieTempsConnection have a constructor which call Class.forName, and
DriverManager.getConnection..

I ve made this , it works, but better solutions may exist

my code:
public class SaisieTempsPortlet extends CustomizerVelocityPortlet
{
  private SaisieTempsConnection con = null;

  public void init( ) throws PortletException
{
setCacheable( true );
}

  public SaisieTempsConnection getConnection ()
{
if (con == null)
{
  Log.debug("--saisie temps etablissement de la
connexion");
  con = new SaisieTempsConnection(
   getPortletConfig().getInitParameter("host"),
   getPortletConfig().getInitParameter("login"),
   getPortletConfig().getInitParameter("pwd"));
}
return con;
}

  public void invalidateConnection ()
  {
con = null;
  }

and in the portletAction

public class MyDBAction extends VelocityPortletAction
{
  protected abstract void buildNormalContext( VelocityPortlet portlet,
Context context,
RunData rundata )
  {
connection = portlet.getConnection();
  }

  [...]
}



Hi!

I'd like to create a Velocity portlet that pulls information out of a
database.
I know how to create a VelocityPortletAction and how to create a database
connection - what's missing is where do I store the connection.

Can I make it a static variable in the VelocityPortletAction?
Or should I use a ConnectionPool as static variable instead?
Or is the "static" approach totally the wrong way?

Any help greatly appreciated.

public class MyDBAction extends VelocityPortletAction
{
  private static DBConnection connection = null;  // like this?
  private static ConnectionPool connpool = null;  // or better this?

  protected abstract void buildNormalContext( VelocityPortlet portlet,
Context context,
RunData rundata )
  {
if (connection==null)
{
Class.forName(driverName);
connection = DriverManager.getConnection(dbUrl, dbUser, dbPw);
}
  }

  [...]
}


Regards
  gus

--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Velocity portlet with database connection: Where to store the connection?

2002-04-22 Thread gus

Hi!

I'd like to create a Velocity portlet that pulls information out of a database.
I know how to create a VelocityPortletAction and how to create a database
connection - what's missing is where do I store the connection.

Can I make it a static variable in the VelocityPortletAction?
Or should I use a ConnectionPool as static variable instead?
Or is the "static" approach totally the wrong way?

Any help greatly appreciated.

public class MyDBAction extends VelocityPortletAction
{
  private static DBConnection connection = null;  // like this?
  private static ConnectionPool connpool = null;  // or better this?

  protected abstract void buildNormalContext( VelocityPortlet portlet, 
Context context,
RunData rundata )
  {
if (connection==null)
{
Class.forName(driverName);
connection = DriverManager.getConnection(dbUrl, dbUser, dbPw);
}
  }

  [...]
}


Regards
  gus

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: interaction between velocity portlet. (ERRATA)

2002-03-21 Thread Saddest OfAllKeys


Previous message should read: 

2) The RunData object contains a user, which has a
hashmap.  I use the hash map to store data for each
template, hashed by the name of the **PORTLET**.


--- Saddest OfAllKeys <[EMAIL PROTECTED]> wrote:
> 
> I'm new at this so caveat emptor.
> 
> But I have made progress for what I want to do.
> 
> I looked at StockQuoteAction and wanted my own
> action
> (because it seems as though "actions" respond to the
> minimize, maximize, customize buttons).
> 
> I am now at a place where I have two different
> portlet-entries which have different customization
> templates and different default values for
> parameters.
> 
> My action, "MyAction", derives from
> VelocityPortletAction and exploits the following
> nuggets that I discovered:
> 
> 1) It seems that a new MyAction object is created
> each
> time. So member variables won't work.
> 
> 2) The RunData object contains a user, which has a
> hashmap.  I use the hash map to store data for each
> template, hashed by the name of the template.
> 
> So, the first time buildNormalContext() is called, I
> do this: 
> 
> String pName = 
> portlet.getPortletConfig().getName();
> 
> and this:
> 
> String myParam =
>
portlet.getPortletConfig().getInitParameter(MYPARAM);
> 
> Then, I create an object that stores all my
> parameters, and I do a:
> 
> myHashMap.put(pName, myParamObject);
> rundata.getUser().setTemp("hashmap", myHashMap);
> 
> Later, I can fish out the hash map and look for the
> portlet name.
> 
> The basic idea is that you can save state in the
> RunData and Context objects, and fish them out when
> you need them.
> 
> The real trick is to call them from a Velocity page:
> to do this, I use a callback mechanism.  So, I put
> the
> hashMap and the portletName into the Context and the
> 
> Velocity page is something like:
> 
> $myObject.myPublicMethod( $hashMap, $portletName);
> 
> In this way, myPublicMethod() can figure out what
> state it should be using.
> 
> Again, it seems to work for me, but I have no idea
> if
> there is a better way. I would love comments.
> 
> Mike
> [EMAIL PROTECTED]
> 
> 
> --- Pierre BESNARD <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > I have 2 velocity portlet A & B on the same
> screen.
> > The first one, A, uses 2 different templates T1 &
> > T2.
> > The default template (defined in the registry
> file)
> > is T1.
> > The current diplayed template is T2.
> > When I play with the portlet B, the Template T1 of
> > the portlet A comes back !
> > So the question is: how can i modify my portlet A,
> > so that it keeps its current template displayed
> when
> > i use another portlet?
> > I know that the buildNormalContext(p,c,r) method
> of
> > AAction is called but i don't know how to use it!
> > 
> > thanks in advance
> > --
> > Pierre
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> >
>
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
> http://movies.yahoo.com/
> 
> --
> To unsubscribe, e-mail:  
>
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: interaction between velocity portlet.

2002-03-21 Thread Saddest OfAllKeys


I'm new at this so caveat emptor.

But I have made progress for what I want to do.

I looked at StockQuoteAction and wanted my own action
(because it seems as though "actions" respond to the
minimize, maximize, customize buttons).

I am now at a place where I have two different
portlet-entries which have different customization
templates and different default values for parameters.

My action, "MyAction", derives from
VelocityPortletAction and exploits the following
nuggets that I discovered:

1) It seems that a new MyAction object is created each
time. So member variables won't work.

2) The RunData object contains a user, which has a
hashmap.  I use the hash map to store data for each
template, hashed by the name of the template.

So, the first time buildNormalContext() is called, I
do this: 

String pName =  portlet.getPortletConfig().getName();

and this:

String myParam =
portlet.getPortletConfig().getInitParameter(MYPARAM);

Then, I create an object that stores all my
parameters, and I do a:

myHashMap.put(pName, myParamObject);
rundata.getUser().setTemp("hashmap", myHashMap);

Later, I can fish out the hash map and look for the
portlet name.

The basic idea is that you can save state in the
RunData and Context objects, and fish them out when
you need them.

The real trick is to call them from a Velocity page:
to do this, I use a callback mechanism.  So, I put the
hashMap and the portletName into the Context and the 
Velocity page is something like:

$myObject.myPublicMethod( $hashMap, $portletName);

In this way, myPublicMethod() can figure out what
state it should be using.

Again, it seems to work for me, but I have no idea if
there is a better way. I would love comments.

Mike
[EMAIL PROTECTED]


--- Pierre BESNARD <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have 2 velocity portlet A & B on the same screen.
> The first one, A, uses 2 different templates T1 &
> T2.
> The default template (defined in the registry file)
> is T1.
> The current diplayed template is T2.
> When I play with the portlet B, the Template T1 of
> the portlet A comes back !
> So the question is: how can i modify my portlet A,
> so that it keeps its current template displayed when
> i use another portlet?
> I know that the buildNormalContext(p,c,r) method of
> AAction is called but i don't know how to use it!
> 
> thanks in advance
> --
> Pierre
> 
> 
> --
> To unsubscribe, e-mail:  
>
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




interaction between velocity portlet.

2002-03-21 Thread Pierre BESNARD

Hi,

I have 2 velocity portlet A & B on the same screen.
The first one, A, uses 2 different templates T1 & T2.
The default template (defined in the registry file) is T1.
The current diplayed template is T2.
When I play with the portlet B, the Template T1 of the portlet A comes back !
So the question is: how can i modify my portlet A, so that it keeps its current 
template displayed when i use another portlet?
I know that the buildNormalContext(p,c,r) method of AAction is called but i don't know 
how to use it!

thanks in advance
--
Pierre


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




problem with javascript in velocity portlet

2002-03-21 Thread PierreBESSON

Hello,


I have tried to use javascript in a VelocityPortlet, here is the code



when I click on the up image, the value in the text input is increased but
just a few seconds after the browser refresh the page and the initial value
appears
Here are the first lines in the jetspeed.log
[Thu Mar 21 14:40:21 CET 2002] -- DEBUG -- Profiler fallback called with:
BaseProfile[:{},null,null,html,,fr,default.psml]
[Thu Mar 21 14:40:21 CET 2002] -- INFO -- PSML-Man: calculated
resource:user\pirbd\html\fr\\default.psml. Base: D:
\appli-portail\jakarta-tomcat-3.3a\webapps\jetspeed\WEB-INF\psml
[Thu Mar 21 14:40:21 CET 2002] -- INFO -- CastorPsmlManager: about to
return null doc:
[Thu Mar 21 14:40:21 CET 2002] -- INFO -- PSML-Man: calculated
resource:user\pirbd\html\fr\default.psml. Base: D:
\appli-portail\jakarta-tomcat-3.3a\webapps\jetspeed\WEB-INF\psml
[Thu Mar 21 14:40:21 CET 2002] -- INFO -- CastorPsmlManager: about to
return null doc:
[Thu Mar 21 14:40:21 CET 2002] -- INFO -- PSML-Man: calculated
resource:user\pirbd\html\default.psml. Base: D:
\appli-portail\jakarta-tomcat-3.3a\webapps\jetspeed\WEB-INF\psml
[Thu Mar 21 14:40:21 CET 2002] -- DEBUG -- JetspeedTemplatePage: requested
template = Home.vm


Does anybody know why and how can I deal with it.


Pierre Besson-Deblon


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: strange behavior when refreshing velocity portlet.

2002-03-21 Thread raphael . luta

Chris Kimpton wrote:

> Hi,
> 
> --- Pierre BESNARD <[EMAIL PROTECTED]> wrote:
> 
>>Secondly, it will be kind of you to excuse my poor English.
>>
> 
> Don't worry - it is definitely better than my pathetic french  :-(
> 
> 
>>I have observed that when an action method ( doSomething() ) behave
>>2 upper-case letters (i.e.: doSomeThing() ), the action is not
>>called as it should be!
>>
> 
> This is due to the way the ActionEvent class in Turbine finds your
> method - it (or the http processing) seems to lose the upper and
> lower case information, so all it gets to process is dosomething - it
> then guesses that you may want doSomething - but it does not do any
> further guessing - It could do more - have a look at the turbine code
> - there maybe comments/reasons as to why it doesn't.
> 


I guess that basically it's because the event is actually coded in an HTML
page, and you can't expect HTML designer to actually care about something
as trivial as case in field values, so to make the event work whatever the
case mix used as the HTML input field, the event is forced to lowercase except
the first letter which is forced to uppercase.

Matching

-- 
Raphael Luta - [EMAIL PROTECTED]
Professional Services Manager
Vivendi Universal Networks - Paris


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: strange behavior when refreshing velocity portlet.

2002-03-21 Thread Chris Kimpton

Hi,

--- Pierre BESNARD <[EMAIL PROTECTED]> wrote:
> Secondly, it will be kind of you to excuse my poor English.

Don't worry - it is definitely better than my pathetic french  :-(

> I have observed that when an action method ( doSomething() ) behave
> 2 upper-case letters (i.e.: doSomeThing() ), the action is not
> called as it should be!

This is due to the way the ActionEvent class in Turbine finds your
method - it (or the http processing) seems to lose the upper and
lower case information, so all it gets to process is dosomething - it
then guesses that you may want doSomething - but it does not do any
further guessing - It could do more - have a look at the turbine code
- there maybe comments/reasons as to why it doesn't.

HTH,
Chris

=
http://www.soccer2002.org.uk - join in and win CA$H!

__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: strange behavior when refreshing velocity portlet.

2002-03-21 Thread Pierre BESNARD

Hi,
First of all, thanks for all your answers about "other mean to post changes in 
velocity portlet".
Secondly, it will be kind of you to excuse my poor English.
And finally, I found the solution of the problem described below.
In fact, I know how to make work my portlet, but I don't know why it wasn't working.
I have observed that when an action method ( doSomething() ) behave 2 upper-case 
letters (i.e.: doSomeThing() ), the action is not called as it should be!
If I have a method doNewPost(r,c) called in a template 
(<..name="eventSubmit_doNewPost"..>), it doesn't work.
but, a method doNewp(r,c) called with <..name="eventSubmit_doNewp"..> works very well.

If someone could explain that to me, thank you in advance.

For the moment,  I succeeded in transform the "forumDemo" of velocity into a portlet! 
(not bad for a first work with velocity and jetspeed).

have a good day,( or night, I don't know! :) )
--
Pierre

-Message d'origine-
De : Pierre BESNARD 
Envoyé : mercredi 20 mars 2002 14:54
À : Jetspeed Users List
Objet : strange behaviour when refreshing velocity portlet.


hi,

when I try to change a template in velocity portlet, i saw strange results:

my registry file :


org.apache.jetspeed.portal.portlets.CustomizerVelocityPortlet

TestTiti
titi test






template titi.vm :




and finaly method of TitiAction.java :
public void doToto(RunData rundata, Context ctx){
setTemplate(rundata, "toto");
}

When I run that portlet, i can see 3 diferent results when i click on the "toto" 
button:

1) Sometime it works good and the "toto.vm" template is used.

2) Sometime the "titi.vm" is steel used.

3) Or a message, like the following, is displayed in full screen :
$jetspeed.getCustomizer($data.Customized).getContent($data)  

can someone help me before i fall crazy!

thank you.

--
pierre

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: other mean to post changes in velocity portlet

2002-03-20 Thread Xavier Michel

Salut,

If you want just execute your action (no submit the form), you cant use
the $jlink in your velocity template

ex:
href="$jlink.addPathInfo("eventSubmit_doSomething","")"

Xa.


-Message d'origine-
De : Chris Kimpton [mailto:[EMAIL PROTECTED]]
Envoye : mardi 19 mars 2002 23:57
A : Jetspeed Users List
Objet : Re: other mean to post changes in velocity portlet


Hi,

--- Pierre BESNARD <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am a new french user of jetspeed and I'm trying to build my first
> velocity porlet.

Welcome to the fun.

> I would like to know if it is possible to change a "submit button"
> with a simple link or an image with the same behaviour.
>
> for the moment, I have something like :
>
> 
>
> I just would like to change that with :
>
> 
>

To do textual href links that submit forms, I think you will need to
use javascript - ie the link calls a javascript function and that
does a form submit.

If you want an image link, then you can use http://www.soccer2002.org.uk - join in and win CA$H!

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




strange behaviour when refreshing velocity portlet.

2002-03-20 Thread Pierre BESNARD

hi,

when I try to change a template in velocity portlet, i saw strange results:

my registry file :


org.apache.jetspeed.portal.portlets.CustomizerVelocityPortlet

TestTiti
titi test






template titi.vm :




and finaly method of TitiAction.java :
public void doToto(RunData rundata, Context ctx){
setTemplate(rundata, "toto");
}

When I run that portlet, i can see 3 diferent results when i click on the "toto" 
button:

1) Sometime it works good and the "toto.vm" template is used.

2) Sometime the "titi.vm" is steel used.

3) Or a message, like the following, is displayed in full screen :
$jetspeed.getCustomizer($data.Customized).getContent($data)  

can someone help me before i fall crazy!

thank you.

--
pierre

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: other mean to post changes in velocity portlet

2002-03-20 Thread Paul Spencer

The simple answer is yes, but realize the  
generates a HTTP request with parameters using the method defined in the 
and a URL defined in the .

If the goal is to use an image for the submit button, see 

Paul Spencer

Pierre BESNARD wrote:

> Hello,
> 
> I am a new french user of jetspeed and I'm trying to build my first velocity porlet.
> I would like to know if it is possible to change a "submit button" with a simple 
>link or an image with the same behaviour.
> 
> for the moment, I have something like :
> 
> 
> 
> I just would like to change that with :
> 
> 
> 
> thanks fou your answer.
> 
> --
> Pierre
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: other mean to post changes in velocity portlet

2002-03-20 Thread Chris Kimpton

Hi,

--- Pierre BESNARD <[EMAIL PROTECTED]> wrote:
> 
> Hello,
> 
> I am a new french user of jetspeed and I'm trying to build my first
> velocity porlet.

Welcome to the fun.

> I would like to know if it is possible to change a "submit button"
> with a simple link or an image with the same behaviour.
> 
> for the moment, I have something like :
> 
> 
> 
> I just would like to change that with :
> 
> 
> 

To do textual href links that submit forms, I think you will need to
use javascript - ie the link calls a javascript function and that
does a form submit.

If you want an image link, then you can use http://www.soccer2002.org.uk - join in and win CA$H!

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




other mean to post changes in velocity portlet

2002-03-20 Thread Pierre BESNARD


Hello,

I am a new french user of jetspeed and I'm trying to build my first velocity porlet.
I would like to know if it is possible to change a "submit button" with a simple link 
or an image with the same behaviour.

for the moment, I have something like :



I just would like to change that with :



thanks fou your answer.

--
Pierre


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Weaver, Scott

Paul,

Well here is something weird.  I just checked out jetspeed from the anon
cvs.  Tried to do a "build javadocs" and it failed.  So for kicks I tried
"ant javadocs" which also failed.  However, I tried "build javadocs" again
after running "ant javadocs" and it worked fine!  Go figure.

Scott

-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 4:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Velocity Portlet stuff not available in 1.3a1


Scott,
Although I am using Jetspeed from the CVS updated this morning, I can
build the javadocs with 70 warnings using "build javadocs".  The
javadocs are place in docs/api in the source directory tree.

Paul Spencer

"Weaver, Scott" wrote:
> 
> Understood, but I would really like to build a local copy of the javadocs,
> however build javadocs throws the same error.
> 
> -Original Message-
> From: Paul Spencer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 10:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Velocity Portlet stuff not available in 1.3a1
> 
> Scott,
> Contained in the download is a WAR file.  Thus you do NOT need to
> build.  Just copy the war file to the webapps directory and restart
> tomcat.  Tomcat will do the rest.
> 
> >
>
C:\Java\jakarta-jetspeed\src\java\org\apache\jetspeed\xml\api\portletmarkup
> > not found."
> 
> This is normal.
> 
> Paul Spencer
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Paul Spencer

Scott,
Although I am using Jetspeed from the CVS updated this morning, I can
build the javadocs with 70 warnings using "build javadocs".  The
javadocs are place in docs/api in the source directory tree.

Paul Spencer

"Weaver, Scott" wrote:
> 
> Understood, but I would really like to build a local copy of the javadocs,
> however build javadocs throws the same error.
> 
> -Original Message-
> From: Paul Spencer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 10:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Velocity Portlet stuff not available in 1.3a1
> 
> Scott,
> Contained in the download is a WAR file.  Thus you do NOT need to
> build.  Just copy the war file to the webapps directory and restart
> tomcat.  Tomcat will do the rest.
> 
> >
> C:\Java\jakarta-jetspeed\src\java\org\apache\jetspeed\xml\api\portletmarkup
> > not found."
> 
> This is normal.
> 
> Paul Spencer
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Paul Spencer

Scott,
The source is not included in that download.  Download the appropriate
-src file from
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-21/

Paul Spencer

"Weaver, Scott" wrote:
> 
> Understood, but I would really like to build a local copy of the javadocs,
> however build javadocs throws the same error.
> 
> -Original Message-
> From: Paul Spencer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 10:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Velocity Portlet stuff not available in 1.3a1
> 
> Scott,
> Contained in the download is a WAR file.  Thus you do NOT need to
> build.  Just copy the war file to the webapps directory and restart
> tomcat.  Tomcat will do the rest.
> 
> >
> C:\Java\jakarta-jetspeed\src\java\org\apache\jetspeed\xml\api\portletmarkup
> > not found."
> 
> This is normal.
> 
> Paul Spencer
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Weaver, Scott

Understood, but I would really like to build a local copy of the javadocs,
however build javadocs throws the same error.

-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 10:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Velocity Portlet stuff not available in 1.3a1


Scott,
Contained in the download is a WAR file.  Thus you do NOT need to
build.  Just copy the war file to the webapps directory and restart
tomcat.  Tomcat will do the rest.

>
C:\Java\jakarta-jetspeed\src\java\org\apache\jetspeed\xml\api\portletmarkup
> not found."

This is normal.

Paul Spencer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Paul Spencer

Scott,
Contained in the download is a WAR file.  Thus you do NOT need to
build.  Just copy the war file to the webapps directory and restart
tomcat.  Tomcat will do the rest.

> C:\Java\jakarta-jetspeed\src\java\org\apache\jetspeed\xml\api\portletmarkup
> not found."

This is normal.

Paul Spencer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Weaver, Scott

Thanks Paul, I downloaded the source and the war.  However, when I try to
build the source I get this error:

"C:\Java\jakarta-jetspeed\build\build.xml:363:
C:\Java\jakarta-jetspeed\src\java\org\apache\jetspeed\xml\api\portletmarkup
not found."

I checked and that directory has no source in it.  I noticed there are two
other xml build files besides build.xml.  Do these need to run instead
of/before the regular build.xml?

Thanks,
Scott

-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 10:27 AM
To: [EMAIL PROTECTED]
Subject: Re: Velocity Portlet stuff not available in 1.3a1


Scott,
Only the last seven nightly builds are maintained.  In this case the
link was more then 7 days old.  Their was a successful build last night.
Try
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-21/jetspee
d-1.3a2-dev-war.zip

"Weaver, Scott" wrote:
> 
> Paul,
> 
>
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-14/jetspee
> d-1.3a2-dev-war.zip is a bad link.  Do have any suggestions on which of
the
> nightly build's source I should build from?
> 
> Thanks,
> Scott
> 
> -Original Message-
> From: Paul Spencer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Velocity Portlet stuff not available in 1.3a1
> 
> Scott,
> Their is HelloWorld Velocity portlet in 1.3a2-dev. You can download the
> latest war file from
> http://jakarta.apache.org/builds/jakarta-jetspeed/nightly  Due to some
> changes in other jakarta projects the last successful build is at
>
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-14/jetspee
> d-1.3a2-dev-war.zip
> 
> "Weaver, Scott" wrote:
> >
> > Is there any other way to get the Velocity portlet classes other than
> > building from the cvs.  From what I've seen, 1.3a1 does not contain
them.
> >
> > Thanks,
> > Scott
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Paul Spencer

Scott,
Only the last seven nightly builds are maintained.  In this case the
link was more then 7 days old.  Their was a successful build last night.
Try
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-21/jetspeed-1.3a2-dev-war.zip

"Weaver, Scott" wrote:
> 
> Paul,
> 
> http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-14/jetspee
> d-1.3a2-dev-war.zip is a bad link.  Do have any suggestions on which of the
> nightly build's source I should build from?
> 
> Thanks,
> Scott
> 
> -Original Message-
> From: Paul Spencer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Velocity Portlet stuff not available in 1.3a1
> 
> Scott,
> Their is HelloWorld Velocity portlet in 1.3a2-dev. You can download the
> latest war file from
> http://jakarta.apache.org/builds/jakarta-jetspeed/nightly  Due to some
> changes in other jakarta projects the last successful build is at
> http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-14/jetspee
> d-1.3a2-dev-war.zip
> 
> "Weaver, Scott" wrote:
> >
> > Is there any other way to get the Velocity portlet classes other than
> > building from the cvs.  From what I've seen, 1.3a1 does not contain them.
> >
> > Thanks,
> > Scott
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Velocity Portlet stuff not available in 1.3a1

2001-09-21 Thread Weaver, Scott

Paul,

http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-14/jetspee
d-1.3a2-dev-war.zip is a bad link.  Do have any suggestions on which of the
nightly build's source I should build from?

Thanks,
Scott

-Original Message-
From: Paul Spencer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 4:42 PM
To: [EMAIL PROTECTED]
Subject: Re: Velocity Portlet stuff not available in 1.3a1


Scott,
Their is HelloWorld Velocity portlet in 1.3a2-dev. You can download the
latest war file from
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly  Due to some
changes in other jakarta projects the last successful build is at 
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-14/jetspee
d-1.3a2-dev-war.zip

"Weaver, Scott" wrote:
> 
> Is there any other way to get the Velocity portlet classes other than
> building from the cvs.  From what I've seen, 1.3a1 does not contain them.
> 
> Thanks,
> Scott
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Velocity Portlet stuff not available in 1.3a1

2001-09-20 Thread Paul Spencer

Scott,
Their is HelloWorld Velocity portlet in 1.3a2-dev. You can download the
latest war file from
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly  Due to some
changes in other jakarta projects the last successful build is at 
http://jakarta.apache.org/builds/jakarta-jetspeed/nightly/2001-09-14/jetspeed-1.3a2-dev-war.zip

"Weaver, Scott" wrote:
> 
> Is there any other way to get the Velocity portlet classes other than
> building from the cvs.  From what I've seen, 1.3a1 does not contain them.
> 
> Thanks,
> Scott
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Velocity Portlet stuff not available in 1.3a1

2001-09-20 Thread Weaver, Scott

Is there any other way to get the Velocity portlet classes other than
building from the cvs.  From what I've seen, 1.3a1 does not contain them.

Thanks,
Scott

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]