You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by James Turner <tu...@blackbear.com> on 2003/07/01 19:54:36 UTC

Validwhen returns, need some pixie dust on the nightly build machine

Ok, now that the dust is settling on 1.1, I've re-checked-in the
validwhen validator, but in order for the nightlies not to break, the
antlr.jar file (available from http://www.antlr.org/download/) needs to
be put on the build machine and the antlr.jar property in
build.properties needs to point to it.

James



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


RE: Validwhen returns, need some pixie dust on the nightly build machine

Posted by James Turner <tu...@blackbear.com>.
Never mind on the first point, it's jakarta-gump...

However, how do I add a dependency to a jar file that is sourced outside
the Jakarta/Apache project space?

James

> -----Original Message-----
> From: James Turner [mailto:turner@blackbear.com] 
> Sent: Tuesday, July 01, 2003 6:51 PM
> To: 'Struts Developers List'
> Cc: rleland@apache.org
> Subject: RE: Validwhen returns, need some pixie dust on the 
> nightly build machine
> 
> 
> Am I missing something here?
> 
> [turner@linux jakarta]$ cvs -d turner@cvs.apache.org:/home/cvs co gump
> 
> Password:
> cvs server: cannot find module `gump' - ignored
> 
> > From: Rob Leland [mailto:rleland@apache.org]
> >
> > Check out gump from cvs.apache.org and add a dependancy to the
> > jakarta-struts.xml.
> > 
> > -Rob
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 
> 



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


RE: Validwhen returns, need some pixie dust on the nightly build machine

Posted by James Turner <tu...@blackbear.com>.
Never mind again, someone already created an antlr project.

James

> -----Original Message-----
> From: James Turner [mailto:turner@blackbear.com] 
> Sent: Tuesday, July 01, 2003 6:51 PM
> To: 'Struts Developers List'
> Cc: rleland@apache.org
> Subject: RE: Validwhen returns, need some pixie dust on the 
> nightly build machine
> 
> 
> Am I missing something here?
> 
> [turner@linux jakarta]$ cvs -d turner@cvs.apache.org:/home/cvs co gump
> 
> Password:
> cvs server: cannot find module `gump' - ignored
> 
> > From: Rob Leland [mailto:rleland@apache.org]
> >
> > Check out gump from cvs.apache.org and add a dependancy to the
> > jakarta-struts.xml.
> > 
> > -Rob
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 
> 



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


RE: Validwhen returns, need some pixie dust on the nightly build machine

Posted by James Turner <tu...@blackbear.com>.
Am I missing something here?

[turner@linux jakarta]$ cvs -d turner@cvs.apache.org:/home/cvs co gump

Password:
cvs server: cannot find module `gump' - ignored

> From: Rob Leland [mailto:rleland@apache.org] 
>
> Check out gump from cvs.apache.org and add a dependancy to the 
> jakarta-struts.xml.
> 
> -Rob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 



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


Re: Validwhen returns, need some pixie dust on the nightly build machine

Posted by Rob Leland <rl...@apache.org>.
James Turner wrote:

>Ummm, ok... Where does it live?
>
>James
>
>  
>
>>-----Original Message-----
>>From: news [mailto:news@main.gmane.org] On Behalf Of Martin Cooper
>>Sent: Tuesday, July 01, 2003 3:31 PM
>>To: struts-dev@jakarta.apache.org
>>Subject: Re: Validwhen returns, need some pixie dust on the 
>>nightly build machine
>>
>>
>>James, you'll need to update the Gump descriptor too, 
>>otherwise we're going to start seeing Gump failure messages again. ;-(
>>
>>--
>>Martin Cooper
>>
Check out gump from cvs.apache.org and add a dependancy to the 
jakarta-struts.xml.

-Rob


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


RE: Validwhen returns, need some pixie dust on the nightly build machine

Posted by James Turner <tu...@blackbear.com>.
Ummm, ok... Where does it live?

James

> -----Original Message-----
> From: news [mailto:news@main.gmane.org] On Behalf Of Martin Cooper
> Sent: Tuesday, July 01, 2003 3:31 PM
> To: struts-dev@jakarta.apache.org
> Subject: Re: Validwhen returns, need some pixie dust on the 
> nightly build machine
> 
> 
> James, you'll need to update the Gump descriptor too, 
> otherwise we're going to start seeing Gump failure messages again. ;-(
> 
> --
> Martin Cooper
> 
> 
> "James Turner" <tu...@blackbear.com> wrote in message 
news:014601c33ff9$d9af5960$124f3e18@blackbear...
Ok, now that the dust is settling on 1.1, I've re-checked-in the
validwhen validator, but in order for the nightlies not to break, the
antlr.jar file (available from http://www.antlr.org/download/) needs to
be put on the build machine and the antlr.jar property in
build.properties needs to point to it.

James




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



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


Re: Validwhen returns, need some pixie dust on the nightly build machine

Posted by Martin Cooper <ma...@apache.org>.
James, you'll need to update the Gump descriptor too, otherwise we're going
to start seeing Gump failure messages again. ;-(

--
Martin Cooper


"James Turner" <tu...@blackbear.com> wrote in message
news:014601c33ff9$d9af5960$124f3e18@blackbear...
Ok, now that the dust is settling on 1.1, I've re-checked-in the
validwhen validator, but in order for the nightlies not to break, the
antlr.jar file (available from http://www.antlr.org/download/) needs to
be put on the build machine and the antlr.jar property in
build.properties needs to point to it.

James




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


Re: Validwhen returns, need some pixie dust on the nightly build machine

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
I forwarded our thread on to my friend, Drew (the creator of OGNL), and 
he replied with this:

> Begin forwarded message:
>
>> Well, I used ANTLR because I'm familiar with LALR(1) parsers, and I 
>> knew
>> I could make it work.  Also, I don't think (from a quick look at the
>> documentation) that you can do the Foo[] syntax (which I use to drop 
>> in
>> the index count of the current indexed property) using OGNL.  On the
>> other hand, I'm not at all wedded to ANTLR, if someone wants to take a
>> shot at implementing the grammer using another tool, that's great.
>
OGNL used to use ANTLR but moved away some time ago to use JavaCC.  It 
allowed OGNL to be deployed as a standalone unit without having to 
carry around another jar file.  Plus complaints were heard because some 
people used ANTLR for other parts of the project and the version that 
OGNL required was not compatible.  So JavaCC is a Good Thing in this 
regard.

I'm willing to bet that just about anything you want to do with an 
expression language is doable with OGNL.  It really gives you all the 
power of Java within the language plus lots of niceties for working 
with collections (projection and selection), provides "lambda 
expressions" for encapsulated functions that can be called within OGNL.

I'm not sure what the Foo[] syntax is but OGNL has powerful indexing 
facilities, both JavaBeans indexed properties (i.e. getFoo(int 
i)/setFoo(int i, Object o)) and "object indexed properties", which is 
new to 2.6.0.  Object indexed properties allow you do access things 
that look like indexed properties (getAttribute(String 
name)/setAttribute(String name, Object value)) as indexed properties 
(i.e. request.attributes["foo"]) without having to call a method.  Is 
any of this what he means?

>> On a side note, one of the things I'm unhappy with is that I have to 
>> use
>> AND and OR rather than && and ||, because when I used &&, it blows up
>> the XML parsing of validation.xml.  Is there a way to get around this?
>
Well...as far as the && syntax goes XML is not forgiving unless you use 
CDATA segments.  For expressions that are part of attribute values you 
don't have any way around it.

So instead of :

    <expression>this &amp;&amp; that</expression>

you have:

    <expression><![CDATA[ this && that ]]></expression>

or:

    <expression>
    <![CDATA[
            this && that
      ]]>
      </expression>

It's up to you to decide which is more readable.  _I_ think it's 
gobbledygook any way you slice it.

The issue here is really only the &, && and < operators because it 
interferes with the XML reserved characters.  Everything else works 
fine.  It's a real bummer.

- Drew

-- 
+---------------------------------+
< Drew Davidson | OGNL Technology >
<     Professional Open Source    >
+---------------------------------+
|  Email: drew@ognl.org          /
|    Web: http://www.ognl.org   /
|    Vox: (520) 531-1966       <
|    Fax: (520) 531-1965        \
| Mobile: (520) 405-2967         \
+---------------------------------+


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


RE: Validwhen returns, need some pixie dust on the nightly build machine

Posted by James Turner <tu...@blackbear.com>.
Well, I used ANTLR because I'm familiar with LALR(1) parsers, and I knew
I could make it work.  Also, I don't think (from a quick look at the
documentation) that you can do the Foo[] syntax (which I use to drop in
the index count of the current indexed property) using OGNL.  On the
other hand, I'm not at all wedded to ANTLR, if someone wants to take a
shot at implementing the grammer using another tool, that's great.

On a side note, one of the things I'm unhappy with is that I have to use
AND and OR rather than && and ||, because when I used &&, it blows up
the XML parsing of validation.xml.  Is there a way to get around this?

James

> -----Original Message-----
> From: Erik Hatcher [mailto:jakarta-struts@ehatchersolutions.com] 
> Sent: Tuesday, July 01, 2003 3:10 PM
> To: Struts Developers List
> Subject: Re: Validwhen returns, need some pixie dust on the 
> nightly build machine
> 
> 
> Could we revisit why OGNL was not used for this?
> 
> Both WebWork2 and Tapestry use OGNL extensively.  OGNL is extremely 
> powerful and practically a defacto expression language these days.
> 
> 	Erik
> 
> On Tuesday, July 1, 2003, at 01:54  PM, James Turner wrote:
> > Ok, now that the dust is settling on 1.1, I've re-checked-in the 
> > validwhen validator, but in order for the nightlies not to 
> break, the 
> > antlr.jar file (available from 
> http://www.antlr.org/download/) > needs 
> > to be put on the 
> build machine and the antlr.jar property in 
> > build.properties needs to point to it.
> >
> > James
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 



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


Re: Validwhen returns, need some pixie dust on the nightly build machine

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Could we revisit why OGNL was not used for this?

Both WebWork2 and Tapestry use OGNL extensively.  OGNL is extremely 
powerful and practically a defacto expression language these days.

	Erik

On Tuesday, July 1, 2003, at 01:54  PM, James Turner wrote:
> Ok, now that the dust is settling on 1.1, I've re-checked-in the
> validwhen validator, but in order for the nightlies not to break, the
> antlr.jar file (available from http://www.antlr.org/download/) needs to
> be put on the build machine and the antlr.jar property in
> build.properties needs to point to it.
>
> James
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>


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