absolute path with fileresourceloader

2005-01-06 Thread Will Glass-Husain
Hi, I made a commit this morning, then backed it out regarding FileResourceLoaderPath. http://issues.apache.org/bugzilla/show_bug.cgi?id=17379 With a empty template path, any file on the hard drive can be accessed as a template. I thought this was appealing, as "Why can't my file resource load

svn commit: r124470 - in jakarta/velocity/trunk: build src/java/org/apache/velocity/runtime/resource/loader src/java/org/apache/velocity/test test/absolute

2005-01-06 Thread wglass
Author: wglass Date: Thu Jan 6 17:27:10 2005 New Revision: 124470 URL: http://svn.apache.org/viewcvs?view=rev&rev=124470 Log: backed out absolute file name use (r124382) to due security concern Removed: jakarta/velocity/trunk/src/java/org/apache/velocity/test/AbsoluteFileResourceLoaderTest.ja

Re: Just a thought...foreach else ?

2005-01-06 Thread Will Glass-Husain
I go back and forth. Sometimes I put the "no results found" outside of the table. But often it's nice to do it inside (and keep the header) like specialist33. Depends on the layout. Incidentally, I think I'd prefer an alternatate directive, to avoid confusion. Maybe #empty? #foreach ($a in $l

Re: Just a thought...foreach else ?

2005-01-06 Thread specialist33
Tim Colson wrote: Exactly. The thing is trivial to read and understand Trivial, eh? Heh heh, well so trivial that you then present a null versus empty case... and dismiss it because it's probably "less common". ;-) It is "trivial to read and understand" *AS PRESENTED*. In the null vs. empty case,

Re: Just a thought...foreach else ?

2005-01-06 Thread specialist33
Tim Colson wrote: Your example: template engine makes the decision on what means True/False. My example: template engine just tests a Boolean for true/false. Less magic in mine than yours. No. V already has this concept that "null = false; notnull == true". That's where the "if( $result ..." com

DO NOT REPLY [Bug 17379] - Allow absolute filename with FileResourceLoader

2005-01-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

svn commit: r124382 - in jakarta/velocity/trunk: build src/java/org/apache/velocity/runtime/resource/loader src/java/org/apache/velocity/test test/absolute test/absolute/compare

2005-01-06 Thread wglass
Author: wglass Date: Thu Jan 6 06:42:07 2005 New Revision: 124382 URL: http://svn.apache.org/viewcvs?view=rev&rev=124382 Log: Allow absolute paths with FileResourceLoader http://issues.apache.org/bugzilla/show_bug.cgi?id=17379 Added: jakarta/velocity/trunk/src/java/org/apache/velocity/test/A

RE: Just a thought...foreach else ?

2005-01-06 Thread Tim Colson
> Exactly. The thing is trivial to read and understand Trivial, eh? Heh heh, well so trivial that you then present a null versus empty case... and dismiss it because it's probably "less common". ;-) > May I introduce you to "intelligent" views: they tell you > when they were fed invalid data.

Re: Just a thought...foreach else ?

2005-01-06 Thread Mike Kienenberger
Tim Colson <[EMAIL PROTECTED]> wrote: > Hmm... didn't you once argue that null isn't the same as "no results"? Or > was that me? ;-) Actually, it was me :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re: Just a thought...foreach else ?

2005-01-06 Thread ceo
Nathan Bubna wrote: On Thu, 6 Jan 2005 15:37:18 -0700, Tim Colson <[EMAIL PROTECTED]> wrote: That's a clever idea for a shortcut. Agree it's interesting, but I'm unsure it will be easy to agree on what constitutes "true/false" to trigger the #else. Plus, well, the paradigm is a bit wacky. I mean,

RE: Just a thought...foreach else ?

2005-01-06 Thread Tim Colson
> Which means we get something better than Perl? :) :-) I meant that "even perl isn't that wacky... and believe me, perl IS wacky" ;-) Honestly curious -- has anybody seen this paradigm in -any- other lang? Cheers, Timo - To

RE: Just a thought...foreach else ?

2005-01-06 Thread Tim Colson
> ;-) hah. bet you never thought that would be used in favor of adding > a feature! Indeed. ;-) > the #else statement is rendered anytime the #foreach doesn't render > its innards for whatever reason. i think we can all very easily agree > on that! Hmm... didn't you once argue that null isn't t

Re: Just a thought...foreach else ?

2005-01-06 Thread Shinobu Kawai
Hi, > > > That's a clever idea for a shortcut. > > Agree it's interesting, but I'm unsure it will be easy to agree on what > > constitutes "true/false" to trigger the #else. Plus, well, the paradigm is a > > bit wacky. I mean, even perl doesn't have an 'else' clause for a loop > > construct. > >

Re: Just a thought...foreach else ?

2005-01-06 Thread Incze Lajos
> > #if ($SHOW_RESULTS) > > #foreach ($result in $list_of_results) > > $result > > #end > > #else > > No results to show! > > #end > > i don't see how doing > > #foreach( $result in $list_of_results ) > $result > #else > No results to show! > #end Maybe one can invent a more appropria

Re: Just a thought...foreach else ?

2005-01-06 Thread Nathan Bubna
On Thu, 6 Jan 2005 15:37:18 -0700, Tim Colson <[EMAIL PROTECTED]> wrote: > > That's a clever idea for a shortcut. > Agree it's interesting, but I'm unsure it will be easy to agree on what > constitutes "true/false" to trigger the #else. Plus, well, the paradigm is a > bit wacky. I mean, even perl

Re: Just a thought...foreach else ?

2005-01-06 Thread Mike Kienenberger
#foreach #else #end would have saved me a bit of work the last couple of days. And helped me avoid the problem of leaving out the "$result &&" part of the #if statement, which I did earlier today. -Mike - To unsubscribe, e-mai

RE: Just a thought...foreach else ?

2005-01-06 Thread Tim Colson
Nathan wrote: > i've thought about suggesting this in the past as well. it > would be very cool. Heh heh... 3 in favor, so far only one against. Have fun implementing. ;-) Timo - To unsubscribe, e-mail: [EMAIL PROTECTED] For a

RE: Just a thought...foreach else ?

2005-01-06 Thread Tim Colson
> That's a clever idea for a shortcut. Agree it's interesting, but I'm unsure it will be easy to agree on what constitutes "true/false" to trigger the #else. Plus, well, the paradigm is a bit wacky. I mean, even perl doesn't have an 'else' clause for a loop construct. The rule for true/false sm

Re: Just a thought...foreach else ?

2005-01-06 Thread Nathan Bubna
i've thought about suggesting this in the past as well. it would be very cool. On Thu, 6 Jan 2005 13:21:27 -0800, Will Glass-Husain <[EMAIL PROTECTED]> wrote: > That's a clever idea for a shortcut. I use the #if / #foreach combination > all the time. It's not a big deal, but the multiple #end c

Re: Just a thought...foreach else ?

2005-01-06 Thread Will Glass-Husain
That's a clever idea for a shortcut. I use the #if / #foreach combination all the time. It's not a big deal, but the multiple #end can be confusing. WILL - Original Message - From: "specialist33" <[EMAIL PROTECTED]> To: "Velocity Developers List" Sent: Thursday, January 06, 2005 12:32

Just a thought...foreach else ?

2005-01-06 Thread specialist33
Looking through our templteas written over the last few months, we have a LOT of cases of guarding on an empty foreach - empty means either something went wrong OR we need an explicit "no results returned" message. One of the problmes with the previous engine we used was that you couldn't easil

Re: Context availability during method invocation / ReferenceInsertionEventHandler

2005-01-06 Thread Will Glass-Husain
Hi Vincent, I'd make a ReferenceInsertionEventHandler. You can make the context available by passing into the constructor and storing it as an instance variable in the handler. Just initialize a new ReferenceInsertionEventHandler for each page merge. As a side note, maybe we should create some ex

Context availability during method invocation / ReferenceInsertionEventHandler

2005-01-06 Thread Vincent van Beveren
Hi everyone, I've searched through the JavaDocs' and source code to find a solution for the following problem, but I don't think there are any facilities for it, but maybe someone has an idea. I would like to simplify the following piece Velocity code: $locale = ... user defined locale ...

[Jakarta-Velocity Wiki] Updated: IssuePriorities

2005-01-06 Thread velocity-cvs
Date: 2005-01-06T06:45:22 Editor: WillGlassHusain Wiki: Jakarta-Velocity Wiki Page: IssuePriorities URL: http://wiki.apache.org/jakarta-velocity/IssuePriorities Acted on issue 31871 Change Log: -- @@ -

[Jakarta-Velocity Wiki] Updated: IssuePriorities

2005-01-06 Thread velocity-cvs
Date: 2005-01-06T06:44:46 Editor: WillGlassHusain Wiki: Jakarta-Velocity Wiki Page: IssuePriorities URL: http://wiki.apache.org/jakarta-velocity/IssuePriorities Acted on issues 17379, 31703, 28611 Change Log:

DO NOT REPLY [Bug 17379] - Allow absolute filename with FileResourceLoader

2005-01-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

DO NOT REPLY [Bug 28611] - Create a DataSourceResourceLoader that can be wired to the datasource with IoC

2005-01-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

DO NOT REPLY [Bug 31871] - Building Velocity with Maven

2005-01-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

DO NOT REPLY [Bug 31703] - VelocityViewServlet+ClasspathResourceLoader doesn't work with jars+Tomcat

2005-01-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

DO NOT REPLY [Bug 31871] - Building Velocity with Maven

2005-01-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu