glad, I could be of help! bonne chance! rob
----- Original Message ----- From: "FARINE Arnaud - SOP" <[EMAIL PROTECTED]> To: "'Jetspeed Users List'" <[EMAIL PROTECTED]> Sent: Monday, March 29, 2004 11:30 AM Subject: RE: How to use java code in a vm file ? Thx, I think to use the pull tool solution...It isn't simple date on a vm file !! ;-) Best Regards Arnaud FARINE Ing�nieur d'�tudes Atos Origin System Int�gration 150, All�e Pierre Ziller 06905 Sophia-Antipolis France Phone +33 (0)49 715 7918 Fax +33 (0)49 715 7901 [EMAIL PROTECTED] www.atosorigin.fr <http://www.atosorigin.fr/> -----Message d'origine----- De : Robert Gombotz [mailto:[EMAIL PROTECTED] Envoy� : lundi 29 mars 2004 11:14 � : Jetspeed Users List Objet : Re: How to use java code in a vm file ? well, what I meant is to create a velocityPortlet. you register it in e.g. local-portlets.xreg as parent=VelocityPortlet. you have to specify 2 elements, the action and the template. the template is your vm-file (in templates/vm/portlets/html), the action is your java action class, part of the portlets.actions package. Once the portlet works, you add it to the psml of "anon"-user, then it would be displayed, when a new user arrives at the site. If you only want the date in a raw vm-file, that is not connected to an action, you could create a so called Pull-Tool. you can see them in some of the original templates, for example the $l10n (localization) is a pull tool, also the $jslink for links. pull tools you would have to register in TurbineRessources and they have to extend a certain java-class. check in the jetspeed source for one of the 2 above mentioned pull-tools (or for any others in TR.props), you should then be able to create your own $date-pull tool, which you can then use in any vm-template of your app. regards rob ----- Original Message ----- From: "FARINE Arnaud - SOP" <[EMAIL PROTECTED]> To: "'Jetspeed Users List'" <[EMAIL PROTECTED]> Sent: Monday, March 29, 2004 11:07 AM Subject: RE: How to use java code in a vm file ? ok, If I would like to use your solution what action-class in called at first to display the homepage ? (when user arrives at the site), to change it and put the date in the context ? Regards Arnaud FARINE Ing�nieur d'�tudes Atos Origin System Int�gration 150, All�e Pierre Ziller 06905 Sophia-Antipolis France Phone +33 (0)49 715 7918 Fax +33 (0)49 715 7901 [EMAIL PROTECTED] www.atosorigin.fr <http://www.atosorigin.fr/> -----Message d'origine----- De : Robert Gombotz [mailto:[EMAIL PROTECTED] Envoy� : lundi 29 mars 2004 10:28 � : Jetspeed Users List Objet : Re: How to use java code in a vm file ? I believe, you can't use Java in a vm file at all. It's only interpeted by the VT Engine. To get the date, you would have to get it in your action-class (I guess you are talking about a velocity-portlet...) and put it into the context. in the action class: //get the date context.put.("date", dateVariable); in the vm-template <br> Today's date is : $date <br> <br> hope, I could be of any help rob ----- Original Message ----- From: "FARINE Arnaud - SOP" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 29, 2004 9:35 AM Subject: How to use java code in a vm file ? Hi, I want to use a java code in a vm file (top.vm) to obtain the system date. In a VM file I don't success to use java code...Or if I can only use the velocity language, how can I obtain the date ? Regards Arnaud FARINE Ing�nieur d'�tudes Atos Origin System Int�gration 150, All�e Pierre Ziller 06905 Sophia-Antipolis France Phone +33 (0)49 715 7918 Fax +33 (0)49 715 7901 [EMAIL PROTECTED] www.atosorigin.fr <http://www.atosorigin.fr/> --------------------------------------------------------------------- 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]
