[xwiki-users] Display current date on page
Hi all, Is there a date property I can use to automatically display the current date on a page? I would do it in javascript but you can't embed <script> tags in {{html}} so is there a way of doing it in velocity? I can't seem to find any info on this. Thanks, Lockie -- View this message in context: http://xwiki.475771.n2.nabble.com/Display-current-date-on-page-tp5681412p568... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Lockie ! You can use $xwiki.getDate() inside your velocity code in order to display the current date. Stefan On 10/28/2010 09:06 AM, Lockie wrote:
Hi all,
Is there a date property I can use to automatically display the current date on a page? I would do it in javascript but you can't embed<script> tags in {{html}} so is there a way of doing it in velocity? I can't seem to find any info on this.
Thanks,
Lockie
Ah thats just what I was after, thanks! Lockie -- View this message in context: http://xwiki.475771.n2.nabble.com/Display-current-date-on-page-tp5681412p568... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi! Lockie wrote:
Hi all,
Is there a date property I can use to automatically display the current date on a page? I would do it in javascript but you can't embed <script> tags in {{html}} so is there a way of doing it in velocity? I can't seem to find any info on this.
Thanks,
Lockie
I think it is worth to keep an eye on this: http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting#HVelocitySpecifi... Check "Comparison Date Tool" methods. HTH, Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems
Hi Stefan, On Oct 28, 2010, at 8:15 AM, Stefan abageru wrote:
Hi Lockie !
You can use $xwiki.getDate() inside your velocity code in order to display the current date.
This is really deprecated stuff and shouldn't be used. Instead you should use $datetool. http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/to... Thanks -Vincent
Stefan
On 10/28/2010 09:06 AM, Lockie wrote:
Hi all,
Is there a date property I can use to automatically display the current date on a page? I would do it in javascript but you can't embed<script> tags in {{html}} so is there a way of doing it in velocity? I can't seem to find any info on this.
Thanks,
Lockie
$date, in velocity context, doesn't return any value. It just prints "$date". What am I doing wrong? I want date in the format: yyyyMMdd, but $date.get('yyyyMd')doesn't work here either. 2010/10/28 Vincent Massol <[email protected]>
Hi Stefan,
On Oct 28, 2010, at 8:15 AM, Stefan abageru wrote:
Hi Lockie !
You can use $xwiki.getDate() inside your velocity code in order to display the current date.
This is really deprecated stuff and shouldn't be used.
Instead you should use $datetool.
http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/to...
Thanks -Vincent
Stefan
On 10/28/2010 09:06 AM, Lockie wrote:
Hi all,
Is there a date property I can use to automatically display the current date on a page? I would do it in javascript but you can't embed<script> tags in {{html}} so is there a way of doing it in velocity? I can't seem to find any info on this.
Thanks,
Lockie
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Atenciosamente, Erica Usui.
Erica Usui wrote:
$date, in velocity context, doesn't return any value. It just prints "$date".
What am I doing wrong?
I want date in the format: yyyyMMdd, but $date.get('yyyyMd')doesn't work here either.
Use (XWiki 2.0 Syntax) {{velocity}} $datetool.get('yyyyMd') {{/velocity}} Also, see http://jira.xwiki.org/jira/browse/XWIKI-5610 HTH!
2010/10/28 Vincent Massol <[email protected]>
Hi Stefan,
On Oct 28, 2010, at 8:15 AM, Stefan abageru wrote:
Hi Lockie !
You can use $xwiki.getDate() inside your velocity code in order to display the current date.
This is really deprecated stuff and shouldn't be used.
Instead you should use $datetool.
http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/to...
Thanks -Vincent
Stefan
On 10/28/2010 09:06 AM, Lockie wrote:
Hi all,
Is there a date property I can use to automatically display the current
date
on a page? I would do it in javascript but you can't embed<script> tags
in
{{html}} so is there a way of doing it in velocity? I can't seem to find
any
info on this.
Thanks,
Lockie
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems
OK! Thanks! :) 2010/11/29 Ricardo Rodriguez [eBioTIC.] <[email protected]>
Erica Usui wrote:
$date, in velocity context, doesn't return any value. It just prints "$date".
What am I doing wrong?
I want date in the format: yyyyMMdd, but $date.get('yyyyMd')doesn't work here either.
Use (XWiki 2.0 Syntax)
{{velocity}} $datetool.get('yyyyMd') {{/velocity}}
Also, see http://jira.xwiki.org/jira/browse/XWIKI-5610
HTH!
2010/10/28 Vincent Massol <[email protected]>
Hi Stefan,
On Oct 28, 2010, at 8:15 AM, Stefan abageru wrote:
Hi Lockie !
You can use $xwiki.getDate() inside your velocity code in order to display the current date.
This is really deprecated stuff and shouldn't be used.
Instead you should use $datetool.
http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/to...
Thanks -Vincent
Stefan
On 10/28/2010 09:06 AM, Lockie wrote:
Hi all,
Is there a date property I can use to automatically display the
current
date
on a page? I would do it in javascript but you can't embed<script> tags
in
{{html}} so is there a way of doing it in velocity? I can't seem to find
any
info on this.
Thanks,
Lockie
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Atenciosamente, Erica Usui.
Le 29 nov. 2010 à 07:50, Ricardo Rodriguez [eBioTIC.] a écrit :
Use (XWiki 2.0 Syntax) {{velocity}} $datetool.get('yyyyMd') {{/velocity}}
This has always shocked me as being inefficient since it reparses and re-allocates. I planned to write a little plugin where that would be cared for but never found the time. Isn't there a standard (cached) date-format? paul
I'm using #set($data=$datetool.get('yyyyMd')) successfully, but i can't compare dates with $data, because it is not a date, i think it is a string. How can i convert it to a date? 2010/11/29 Paul Libbrecht <[email protected]>
Le 29 nov. 2010 à 07:50, Ricardo Rodriguez [eBioTIC.] a écrit :
Use (XWiki 2.0 Syntax) {{velocity}} $datetool.get('yyyyMd') {{/velocity}}
This has always shocked me as being inefficient since it reparses and re-allocates. I planned to write a little plugin where that would be cared for but never found the time.
Isn't there a standard (cached) date-format?
paul
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Atenciosamente, Erica Usui.
Erica, Google: "datetool velocity". First results: http://velocity.apache.org/tools/releases/1.3/javadoc/org/apache/velocity/to... Gives you all the luxury (date objects, calendars, longs....). And make sure the IDE you use remember the class of date-tool for the next time you use it! paul Le 9 déc. 2010 à 19:19, Erica Usui a écrit :
I'm using #set($data=$datetool.get('yyyyMd')) successfully, but i can't compare dates with $data, because it is not a date, i think it is a string.
How can i convert it to a date?
2010/11/29 Paul Libbrecht <[email protected]>
Le 29 nov. 2010 à 07:50, Ricardo Rodriguez [eBioTIC.] a écrit :
Use (XWiki 2.0 Syntax) {{velocity}} $datetool.get('yyyyMd') {{/velocity}}
This has always shocked me as being inefficient since it reparses and re-allocates. I planned to write a little plugin where that would be cared for but never found the time.
Isn't there a standard (cached) date-format?
paul
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Atenciosamente, Erica Usui. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
I have a new instance of XWiki running on Tomcat 5.5 / Mysql Server 5.1. The wiki appears to be running fine, no errors being shown to the user. However, in the tomcat log I'm getting a bunch of java.sql.SQLExceptions like the following: java.sql.SQLException: org.apache.commons.dbcp.PoolablePreparedStatement with address: "com.mysql.jdbc.PreparedStatement@1f07f48: insert into activitystream_events (ase_requestid, ase_stream, ase_date, ase_priority, ase_type, ase_application, ase_user, ase_wiki, ase_space, ase_page, ase_url, ase_title, ase_body, ase_version, ase_param1, ase_param2, ase_param3, ase_param4, ase_param5, ase_eventid) values (** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **)" is closed. and : java.sql.SQLException: org.apache.commons.dbcp.PoolablePreparedStatement with address: "com.mysql.jdbc.PreparedStatement@cbe525: update xwikiproperties set XWP_CLASSTYPE=** NOT SPECIFIED ** where XWP_ID=** NOT SPECIFIED ** and XWP_NAME=** NOT SPECIFIED **" is closed. I looked around the archive and didn't see anything. I'm concerned that this is important even though it doesn't seem to be affecting the usability of the XWiki. Can anyone tell me what the deal is? Thanks, Lenny
Doing a bump if you will. Does anyone know why I'm getting the below? Lenny -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Scardino,Leonard R Jr ERDC-ITL-MS Contractor Sent: Thursday, December 09, 2010 5:05 PM To: XWiki Users Subject: [xwiki-users] java.sql.SQLException PoolablePreparedStatment I have a new instance of XWiki running on Tomcat 5.5 / Mysql Server 5.1. The wiki appears to be running fine, no errors being shown to the user. However, in the tomcat log I'm getting a bunch of java.sql.SQLExceptions like the following: java.sql.SQLException: org.apache.commons.dbcp.PoolablePreparedStatement with address: "com.mysql.jdbc.PreparedStatement@1f07f48: insert into activitystream_events (ase_requestid, ase_stream, ase_date, ase_priority, ase_type, ase_application, ase_user, ase_wiki, ase_space, ase_page, ase_url, ase_title, ase_body, ase_version, ase_param1, ase_param2, ase_param3, ase_param4, ase_param5, ase_eventid) values (** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **)" is closed. and : java.sql.SQLException: org.apache.commons.dbcp.PoolablePreparedStatement with address: "com.mysql.jdbc.PreparedStatement@cbe525: update xwikiproperties set XWP_CLASSTYPE=** NOT SPECIFIED ** where XWP_ID=** NOT SPECIFIED ** and XWP_NAME=** NOT SPECIFIED **" is closed. I looked around the archive and didn't see anything. I'm concerned that this is important even though it doesn't seem to be affecting the usability of the XWiki. Can anyone tell me what the deal is? Thanks, Lenny _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi! Scardino, Leonard R Jr ERDC-ITL-MS Contractor wrote:
Doing a bump if you will. Does anyone know why I'm getting the below?
Lenny
First of all: this message appears in my Thunderbird email client threaded with "[xwiki-users] Display current date on page" message. Have you use this message to post your first one on this topic? If yes, it must be avoided in the shake of clarity and to ease people willing to help you, and XWiki Community in general!, to follow independently each thread. Thanks! About the logged error. Both activitystream_events and xwikiproperties are XWiki tables, thus it seems something is going wrong when inserting in activitystream_events and when updating xwikiproperties. Well, nothing fancy to say this! :-) I do think that it is worth to create a Jira Issue (http://jira.xwiki.org) detailing what XE release are you using. The suitable place would be: http://jira.xwiki.org/jira/browse/XPAS
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Scardino,Leonard R Jr ERDC-ITL-MS Contractor Sent: Thursday, December 09, 2010 5:05 PM To: XWiki Users Subject: [xwiki-users] java.sql.SQLException PoolablePreparedStatment
I have a new instance of XWiki running on Tomcat 5.5 / Mysql Server 5.1.
The wiki appears to be running fine, no errors being shown to the user. However, in the tomcat log I'm getting a bunch of java.sql.SQLExceptions like the following:
java.sql.SQLException: org.apache.commons.dbcp.PoolablePreparedStatement with address: "com.mysql.jdbc.PreparedStatement@1f07f48: insert into activitystream_events (ase_requestid, ase_stream, ase_date, ase_priority, ase_type, ase_application, ase_user, ase_wiki, ase_space, ase_page, ase_url, ase_title, ase_body, ase_version, ase_param1, ase_param2, ase_param3, ase_param4, ase_param5, ase_eventid) values (** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **, ** NOT SPECIFIED **)" is closed.
and :
java.sql.SQLException: org.apache.commons.dbcp.PoolablePreparedStatement with address: "com.mysql.jdbc.PreparedStatement@cbe525: update xwikiproperties set XWP_CLASSTYPE=** NOT SPECIFIED ** where XWP_ID=** NOT SPECIFIED ** and XWP_NAME=** NOT SPECIFIED **" is closed.
I looked around the archive and didn't see anything. I'm concerned that this is important even though it doesn't seem to be affecting the usability of the XWiki.
Can anyone tell me what the deal is?
Thanks,
Lenny _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
HTH! Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems
participants (8)
-
[Ricardo Rodriguez] eBioTIC. -
Erica Usui -
Lockie -
Paul Libbrecht -
Ricardo Rodriguez [eBioTIC.] -
Scardino, Leonard R Jr ERDC-ITL-MS Contractor -
Stefan abageru -
Vincent Massol