You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gregg D Bolinger <gt...@gmail.com> on 2005/05/10 17:37:32 UTC

4.0: listeners

I have a page with a form binding like so:

<component id="form" type="Form">
   <binding name="delegate" value="beans.delegate"/>
   <binding name="listener" value="listeners.formSubmitted"/>
</component>

My java file has a method:

public void formSubmitted(IRequestCycle cycle) {
   //code for listener in here
}

HTML form declaration:

<form jwcid="form">...</form>

When I click the button on the web page I get the following error:

Object $Login_2@1d1fc02[Login] does not implement a listener method
named 'listeners.formSubmitted'.

This worked in 3.0.3. I read the new docs on listeners and it would
appear that it should work.

Gregg Bolinger

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


Re: 4.0: listeners

Posted by Geoff Longman <gl...@gmail.com>.
Unless I'm wrong the following are all valid:

<binding name="listener" value="ognl:listeners.formSubmitted"/>

<binding name="listener" value="listener:formSubmitted"/>

<binding name="listener" value="formSubmitted"/>

sorry to stir up the pot here but I think this is a good example of
how default binding types are going to cause more confusion than it's
worth.

Geoff

On 5/10/05, Gregg D Bolinger <gt...@gmail.com> wrote:
> I have a page with a form binding like so:
> 
> <component id="form" type="Form">
>    <binding name="delegate" value="beans.delegate"/>
>    <binding name="listener" value="listeners.formSubmitted"/>
> </component>
> 
> My java file has a method:
> 
> public void formSubmitted(IRequestCycle cycle) {
>    //code for listener in here
> }
> 
> HTML form declaration:
> 
> <form jwcid="form">...</form>
> 
> When I click the button on the web page I get the following error:
> 
> Object $Login_2@1d1fc02[Login] does not implement a listener method
> named 'listeners.formSubmitted'.
> 
> This worked in 3.0.3. I read the new docs on listeners and it would
> appear that it should work.
> 
> Gregg Bolinger
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org 
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org 
> 
>

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


Re: 4.0: listeners

Posted by Howard Lewis Ship <hl...@gmail.com>.
On 5/10/05, Patrick Casey <pa...@adelphia.net> wrote:
> 
>         How about a 3.0 compatibility flag (off by default) that would let
> you use old 3.0 DTDs (or at least most of them). That way new users would
> start out in the new file structure, but current users would have a crutch
> to transition them into the 4.0 world without having to rewrite lots of XML?

The 3.0 DTDs *still* work in 4.0.  There's tiny gotchas concerning
<parameter direction="custom"> and <service>. Everything else works
perfectly.

-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


RE: 4.0: listeners

Posted by Patrick Casey <pa...@adelphia.net>.
	How about a 3.0 compatibility flag (off by default) that would let
you use old 3.0 DTDs (or at least most of them). That way new users would
start out in the new file structure, but current users would have a crutch
to transition them into the 4.0 world without having to rewrite lots of XML?

	It's not worth worrying about if you're the developer and know
what's going on, but 4 or 5 of these little "not worth worrying about it"
changes can make a user who upgrades from 3.0 to 4.0 pull his hair out and
kick the dog in frustration. 

	It's like when Sun decided they were going to change the way
timezone formats were stored between 1.4.2 and 1.4.3 (if memory serves) and
broke a bunch of my code. Sure, it was easy to fix, but first there was the
three hours of disbelief that upgrading my JVM would cause my code to light
up like a Christmas tree, then the hour spend on the change notes to find
what the heck they'd done, then the ten minutes to fix it.

	--- Pat

> -----Original Message-----
> From: Gregg D Bolinger [mailto:gthought@gmail.com]
> Sent: Tuesday, May 10, 2005 9:22 AM
> To: Tapestry users
> Subject: Re: 4.0: listeners
> 
> I think that there is a trade off between making things easier for 3.0 app
> transition and making things easier for new 4.0 development. It's probably
> a
> catch 22. Just typing the actual listener method name is much shorter and
> less likely prone to fat fingering than the 3.0 way.
> 
> I'd say it's really not that big of a deal either way and definately not
> worth worrying about. ;)
> 
> Gregg
<snip>



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


Re: 4.0: listeners

Posted by Gregg D Bolinger <gt...@gmail.com>.
I think that there is a trade off between making things easier for 3.0 app 
transition and making things easier for new 4.0 development. It's probably a 
catch 22. Just typing the actual listener method name is much shorter and 
less likely prone to fat fingering than the 3.0 way. 

I'd say it's really not that big of a deal either way and definately not 
worth worrying about. ;)

Gregg

On 5/10/05, Konstantin Iignatyev <kg...@yahoo.com> wrote:
> 
> Then I would say that compatibility with 3.0 is unnecessary broken. It
> is very easy to put something like this inside of T4
> if( expression.startsWith( "listeners"){
> expression = expression.substr( 9 );
> }
> 
> and that will make migration path easier for many.
> 
> Gregg D Bolinger wrote:
> 
> >Yes, that is corrrect. Using must formSubmitted works. Any of the methods
> >Geoff stated work.
> >
> >Gregg
> >
> >On 5/10/05, Robert Zeigler <ro...@scazdl.org> wrote:
> >
> >
> >>I'll confess to not following many of the 4.0 changes extremely closely,
> >>but...
> >>have you tried:
> >><binding name="listener" value="formSubmitted"/> ?
> >>I seem to recall the listener change needing only the method name
> >>now...? (Someone correct me if I'm wrong... I'm in a hurry and "shooting
> >>from the hip" on this one)
> >>
> >>Robert
> >>
> >>
> >>
> 
> --
> Thanks,
> 
> Konstantin Ignatyev
> 
> http://www.kgionline.com
> 
> PS: If this is a typical day on planet earth, humans will add fifteen 
> million tons of carbon to the atmosphere, destroy 115 square miles of 
> tropical rainforest, create seventy-two miles of desert, eliminate between 
> forty to one hundred species, erode seventy-one million tons of topsoil, add 
> 2.700 tons of CFCs to the stratosphere, and increase their population by 
> 263.000
> 
> Bowers, C.A. The Culture of Denial:
> Why the Environmental Movement Needs a Strategy for Reforming Universities 
> and Public Schools.
> New York: State University of New York Press, 1997: (4) (5) (p.206)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

Re: 4.0: listeners

Posted by Konstantin Iignatyev <kg...@yahoo.com>.
I have impression that people reported that syntax:
  <component id="reportCriteriaForm" type="Form">
    <binding name="listener"  expression="listeners.onSubmit"/>
  </component>
does NOT work in T4.

If that is the case then T4 breaks compatibility.

Did I miss something?

Howard Lewis Ship wrote:

>On 5/10/05, Konstantin Iignatyev <kg...@yahoo.com> wrote:
>  
>
>>Then I would say that compatibility with 3.0 is unnecessary broken. It
>>is very easy to put something like this inside of T4
>>    
>>
>
>No, backards compatibility  is NOT broken.
>
>The syntax ognl:listeners.method is what a 3.0 app would use, and that
>still works.
>
>For 4.0, there's the listener: prefix, so listener:method is equivalent.
>
>Since the listener parameter specifies "listener" as its default
>prefix, you can just specify the method name, "method".  Again, all of
>the following are equivalent (for the Form's or DirectLink's listener
>parameter):
>
>ognl:listeners.myMethod
>listener:myMethod
>myMethod
>
>I prefer the last version.  The latter two are marginally more
>efficient than the OGNL version (though invoking a listener method
>does use some amount of reflection).
>
>
>  
>


-- 
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000

Bowers, C.A.  The Culture of Denial:  
Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools.  
New York:  State University of New York Press, 1997: (4) (5) (p.206)


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


Re: 4.0: listeners

Posted by Mind Bridge <mi...@yahoo.com>.
One possible way to resolve the issue: if the DTD used is earlier than 4.0,
then use the 'ognl' prefix as a default for 'binding'. Otherwise default to
the one that the component provides.


----- Original Message ----- 
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, May 10, 2005 7:40 PM
Subject: Re: 4.0: listeners


On 5/10/05, Konstantin Iignatyev <kg...@yahoo.com> wrote:
> Then I would say that compatibility with 3.0 is unnecessary broken. It
> is very easy to put something like this inside of T4

No, backards compatibility  is NOT broken.

The syntax ognl:listeners.method is what a 3.0 app would use, and that
still works.

For 4.0, there's the listener: prefix, so listener:method is equivalent.

Since the listener parameter specifies "listener" as its default
prefix, you can just specify the method name, "method".  Again, all of
the following are equivalent (for the Form's or DirectLink's listener
parameter):

ognl:listeners.myMethod
listener:myMethod
myMethod

I prefer the last version.  The latter two are marginally more
efficient than the OGNL version (though invoking a listener method
does use some amount of reflection).


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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




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


Re: 4.0: listeners

Posted by Howard Lewis Ship <hl...@gmail.com>.
On 5/10/05, Konstantin Iignatyev <kg...@yahoo.com> wrote:
> Then I would say that compatibility with 3.0 is unnecessary broken. It
> is very easy to put something like this inside of T4

No, backards compatibility  is NOT broken.

The syntax ognl:listeners.method is what a 3.0 app would use, and that
still works.

For 4.0, there's the listener: prefix, so listener:method is equivalent.

Since the listener parameter specifies "listener" as its default
prefix, you can just specify the method name, "method".  Again, all of
the following are equivalent (for the Form's or DirectLink's listener
parameter):

ognl:listeners.myMethod
listener:myMethod
myMethod

I prefer the last version.  The latter two are marginally more
efficient than the OGNL version (though invoking a listener method
does use some amount of reflection).


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Message, format and single quotes

Posted by Oscar Picasso <os...@yahoo.com>.
Hi

I have a problem with formatting text and single quotes.

Lets's say I have the following property file:

username = nom d'utilisateur
required = Le champ {0} est requis

In my validator bean specification I have: 
<set-property name="requiredMessage" 
              expression="format('required', getMessage('username'))"/>

In the html file:
<label for="username"><span jwcid="@FieldLabel"
field="ognl:components.username"/></label>
<input jwcid="username@ValidField" displayName="message:username" 
       validator="ognl:beans.usernameValidator" value="ognl:user.username"/>

The error message is then:
Le champ nom dutilisateur est requis
[single quote removed]

and the label:
nom d'utilisateur
[correct]

Any idea ?

I have tried to add a single quote:
username = nom d''utilisateur

I then get:

error message -> Le champ nom d'utilisateur est requis
label -> nom d''utilisateur


Thanks


Oscar


	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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


Re: Default binding recap [WAS: 4.0: listeners]

Posted by Vjeran Marcinko <vj...@tis.hr>.
----- Original Message ----- 
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, May 11, 2005 1:23 PM
Subject: Re: Default binding recap [WAS: 4.0: listeners]


> I see this as like the split between implicit and declared components.
> Implicit components open up the possiblity of a lot of absuses and
> people were initially worried. Once they started building apps with
> implicit components, they set individual standards and practices for
> when to use implicit vs. when to use declared.

Yes Howard, I thought about the same thing. That's my hope about default
parameter types, that my hunch will turn out wrong.
Because, if I was subscribed to mailing list when implicit components were
being discussed about, I would probably be against it, because it really
looks much more dirty then declared components. When using declared
components, you are not confused with informal parameters, and since
.page/.jwc file often already contains some meta about page/component, why
make possibility to users for defining components outside of it. So I guess
I would definetly be against that.

BUT, in practice, it turned out that implicit components saved plenty of
switching between .html and .page, that I really consider other way only in
rare cases. Shame on me :-(

-Vjeran



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10.5.2005


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


Re: Default binding recap [WAS: 4.0: listeners]

Posted by Howard Lewis Ship <hl...@gmail.com>.
I see this as like the split between implicit and declared components.
 Implicit components open up the possiblity of a lot of absuses and
people were initially worried. Once they started building apps with
implicit components, they set individual standards and practices for
when to use implicit vs. when to use declared.

The practice for default bindings will be the same.

Basically, there has to be a compelling reason *not* to use ognl as
the default binding. In fact, there has to be a compelling reason to
specify a default binding.

In only a few cases, the default binding should not be ognl (or
unspecified).  Listener parameters, validator parameters, asset
parameters. I think those will tend to be obvious and your nightmare
scenario won't happen.

On 5/11/05, Patrick Casey <pa...@adelphia.net> wrote:
> 
>         I don't have quite as much to say on the subject, but I will chime
> in to say I'm not a big fan of default binding either. I know what I was
> learning tapestry it was very confusing to figure out whether I should be
> typing "ognl:foo" or just plain "foo" and whether just plain foo was going
> to be parsed or a literal.
> 
>         I don't really mind typing an extra five characters if it makes my
> code more consistent and readable, so I at least would rather that ognl
> always meant ognl, and a literal always be a literal. For me, having these
> sorts of context specific behaviors just makes the product harder to learn
> and harder to debug later for no real benefit (does skipping 5 characters
> while typing *really* make much of a difference in the grand scheme of
> things? If so, shouldn't we all use single character variable names
> exclusively?)
> 
>         I guess I did have something to say on the topic after all ...
> 
>         --- Pat
> 
> > -----Original Message-----
> > From: Vjeran Marcinko [mailto:vjeran@tis.hr]
> > Sent: Tuesday, May 10, 2005 9:21 PM
> > To: Tapestry users; Howard Lewis Ship
> > Subject: Default binding recap [WAS: 4.0: listeners]
> >
> > Hi all.
> >
> > I posted about this recently on dev list, but I think I know how to
> > express
> > myself better now...
> >
> > Anyway, in 4.0 we now have multiple choices :
> > 1. listener="ognl:listeners.formSubmit"
> > 2. listener="listeners:formSubmit"
> > 3. listener="formSubmit"
> >
> > First one is 3.0 compatibile, second and third have apeared in 4.0, and
> > beside being shorter, they also use reflection less, thus are probably a
> > bit
> > faster.
> > IMHO, although the shortest, problematic is third one.
> > Why? Because it is the only one that is not self-descriptive. I requires
> > you
> > to switch to .jwc file to know what type of value that is. True, nobody
> > forces me to use that style, but thing is that I won't be looking only at
> > things developed by myself, but also at other's stuff, and that will force
> > me to switch files.
> >
> > And I think that "listener" example isn't a good one, because whenever we
> > see parameter called "listener", it's a kinda standardized name, and we
> > all
> > know it's a listener parameter, thus default binding has much more sense
> > for
> > that than normally.
> > Let's say you have stumbled upon some .html developed by your co-worker
> > who
> > loves default bindings, and all you see is:
> > <span jwcid="@AttributePresenter" attribute="shortVersion" />
> > <span jwcid="@Shotter" character="simple" value="parent" />
> >
> > And although you remember these AttributePresenter and Shotter components
> > because you worked with them 3 weeks ago, you cannot exactly remember now
> > what types of parameters these attribute/character/value are, and you
> > forced
> > to look at their .jwc files :-(
> >
> > Regards,
> > Vjeran
> >
> <snip>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


RE: Default binding recap [WAS: 4.0: listeners]

Posted by Patrick Casey <pa...@adelphia.net>.
	I don't have quite as much to say on the subject, but I will chime
in to say I'm not a big fan of default binding either. I know what I was
learning tapestry it was very confusing to figure out whether I should be
typing "ognl:foo" or just plain "foo" and whether just plain foo was going
to be parsed or a literal.

	I don't really mind typing an extra five characters if it makes my
code more consistent and readable, so I at least would rather that ognl
always meant ognl, and a literal always be a literal. For me, having these
sorts of context specific behaviors just makes the product harder to learn
and harder to debug later for no real benefit (does skipping 5 characters
while typing *really* make much of a difference in the grand scheme of
things? If so, shouldn't we all use single character variable names
exclusively?)
	
	I guess I did have something to say on the topic after all ...

	--- Pat

> -----Original Message-----
> From: Vjeran Marcinko [mailto:vjeran@tis.hr]
> Sent: Tuesday, May 10, 2005 9:21 PM
> To: Tapestry users; Howard Lewis Ship
> Subject: Default binding recap [WAS: 4.0: listeners]
> 
> Hi all.
> 
> I posted about this recently on dev list, but I think I know how to
> express
> myself better now...
> 
> Anyway, in 4.0 we now have multiple choices :
> 1. listener="ognl:listeners.formSubmit"
> 2. listener="listeners:formSubmit"
> 3. listener="formSubmit"
> 
> First one is 3.0 compatibile, second and third have apeared in 4.0, and
> beside being shorter, they also use reflection less, thus are probably a
> bit
> faster.
> IMHO, although the shortest, problematic is third one.
> Why? Because it is the only one that is not self-descriptive. I requires
> you
> to switch to .jwc file to know what type of value that is. True, nobody
> forces me to use that style, but thing is that I won't be looking only at
> things developed by myself, but also at other's stuff, and that will force
> me to switch files.
> 
> And I think that "listener" example isn't a good one, because whenever we
> see parameter called "listener", it's a kinda standardized name, and we
> all
> know it's a listener parameter, thus default binding has much more sense
> for
> that than normally.
> Let's say you have stumbled upon some .html developed by your co-worker
> who
> loves default bindings, and all you see is:
> <span jwcid="@AttributePresenter" attribute="shortVersion" />
> <span jwcid="@Shotter" character="simple" value="parent" />
> 
> And although you remember these AttributePresenter and Shotter components
> because you worked with them 3 weeks ago, you cannot exactly remember now
> what types of parameters these attribute/character/value are, and you
> forced
> to look at their .jwc files :-(
> 
> Regards,
> Vjeran
> 
<snip>



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


Default binding recap [WAS: 4.0: listeners]

Posted by Vjeran Marcinko <vj...@tis.hr>.
Hi all.

I posted about this recently on dev list, but I think I know how to express
myself better now...

Anyway, in 4.0 we now have multiple choices :
1. listener="ognl:listeners.formSubmit"
2. listener="listeners:formSubmit"
3. listener="formSubmit"

First one is 3.0 compatibile, second and third have apeared in 4.0, and
beside being shorter, they also use reflection less, thus are probably a bit
faster.
IMHO, although the shortest, problematic is third one.
Why? Because it is the only one that is not self-descriptive. I requires you
to switch to .jwc file to know what type of value that is. True, nobody
forces me to use that style, but thing is that I won't be looking only at
things developed by myself, but also at other's stuff, and that will force
me to switch files.

And I think that "listener" example isn't a good one, because whenever we
see parameter called "listener", it's a kinda standardized name, and we all
know it's a listener parameter, thus default binding has much more sense for
that than normally.
Let's say you have stumbled upon some .html developed by your co-worker who
loves default bindings, and all you see is:
<span jwcid="@AttributePresenter" attribute="shortVersion" />
<span jwcid="@Shotter" character="simple" value="parent" />

And although you remember these AttributePresenter and Shotter components
because you worked with them 3 weeks ago, you cannot exactly remember now
what types of parameters these attribute/character/value are, and you forced
to look at their .jwc files :-(

Regards,
Vjeran

----- Original Message ----- 
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, May 10, 2005 11:15 PM
Subject: Re: 4.0: listeners


In the old DTD, there was <binding name="..." expression="..."/>

If you are updating the DTDs, you'll have to change <binding>,
<static-binding>, <message-binding>, <inherited-binding> to the new,
simple <binding>

You get to use the same prefixing in the XML file that is used in the
HTML.  Consistency!

But if you go to the trouble of changing your XML files and using the
4.0 DTDs, you have to be aware that the <binding> value attribute is
interpreted differently than the 3.0 <binding> expression attribute.

On 5/10/05, Patrick Casey <pa...@adelphia.net> wrote:
>
>         Didn't "listeners.formSubmitted" work in 3.0 though?
>
>         So in 3.0:
>
>         <binding name="listener" value="listeners.formSubmitted"/>
>         <binding name="listener" value="ognl:listeners.formSubmitted"/>
>
>         Both worked.
>
>         In 4.0:
>
>         <binding name="listener" value="formSubmitted"/>
>         <binding name="listener" value="ognl:listeners.formSubmitted"/>
>
>         So unless I'm misunderstanding this change, we deprecated one of
two
> 3.0 formats, and introduced one new one. So if you happened to use the old
> format (listneres.formSubmitted) and upgraded to 4.0 it'd stop working,
> wouldn't it?



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10.5.2005


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


Re: 4.0: listeners

Posted by Howard Lewis Ship <hl...@gmail.com>.
In the old DTD, there was <binding name="..." expression="..."/>

If you are updating the DTDs, you'll have to change <binding>,
<static-binding>, <message-binding>, <inherited-binding> to the new,
simple <binding>

You get to use the same prefixing in the XML file that is used in the
HTML.  Consistency!

But if you go to the trouble of changing your XML files and using the
4.0 DTDs, you have to be aware that the <binding> value attribute is
interpreted differently than the 3.0 <binding> expression attribute.

On 5/10/05, Patrick Casey <pa...@adelphia.net> wrote:
> 
>         Didn't "listeners.formSubmitted" work in 3.0 though?
> 
>         So in 3.0:
> 
>         <binding name="listener" value="listeners.formSubmitted"/>
>         <binding name="listener" value="ognl:listeners.formSubmitted"/>
> 
>         Both worked.
> 
>         In 4.0:
> 
>         <binding name="listener" value="formSubmitted"/>
>         <binding name="listener" value="ognl:listeners.formSubmitted"/>
> 
>         So unless I'm misunderstanding this change, we deprecated one of two
> 3.0 formats, and introduced one new one. So if you happened to use the old
> format (listneres.formSubmitted) and upgraded to 4.0 it'd stop working,
> wouldn't it?
> 
>         Or did I miss something in the explanation?
> 
>         --- Pat
> 
> > -----Original Message-----
> > From: Geoff Longman [mailto:glongman@gmail.com]
> > Sent: Tuesday, May 10, 2005 9:29 AM
> > To: Tapestry users
> > Subject: Re: 4.0: listeners
> >
> > compatibility with 3.0 is not broken since
> >
> > ognl:listeners.formSubmitted
> >
> > still works.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


RE: 4.0: listeners

Posted by Patrick Casey <pa...@adelphia.net>.
	Didn't "listeners.formSubmitted" work in 3.0 though? 

	So in 3.0:

	<binding name="listener" value="listeners.formSubmitted"/>
	<binding name="listener" value="ognl:listeners.formSubmitted"/>

	Both worked.

	In 4.0:

	<binding name="listener" value="formSubmitted"/>
	<binding name="listener" value="ognl:listeners.formSubmitted"/>

	So unless I'm misunderstanding this change, we deprecated one of two
3.0 formats, and introduced one new one. So if you happened to use the old
format (listneres.formSubmitted) and upgraded to 4.0 it'd stop working,
wouldn't it?

	Or did I miss something in the explanation?

	--- Pat

> -----Original Message-----
> From: Geoff Longman [mailto:glongman@gmail.com]
> Sent: Tuesday, May 10, 2005 9:29 AM
> To: Tapestry users
> Subject: Re: 4.0: listeners
> 
> compatibility with 3.0 is not broken since
> 
> ognl:listeners.formSubmitted
> 
> still works.




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


Re: 4.0: listeners

Posted by Geoff Longman <gl...@gmail.com>.
compatibility with 3.0 is not broken since

ognl:listeners.formSubmitted

still works.

On 5/10/05, Konstantin Iignatyev <kg...@yahoo.com> wrote:
> Then I would say that compatibility with 3.0 is unnecessary broken. It
> is very easy to put something like this inside of T4
> if( expression.startsWith( "listeners"){
>   expression = expression.substr( 9 );
> }
> 
> and that will make migration path easier for many.
> 
> Gregg D Bolinger wrote:
> 
> >Yes, that is corrrect. Using must formSubmitted works. Any of the methods
> >Geoff stated work.
> >
> >Gregg
> >
> >On 5/10/05, Robert Zeigler <robertz@scazdl.org > wrote:
> >
> >
> >>I'll confess to not following many of the 4.0 changes extremely closely,
> >>but...
> >>have you tried:
> >><binding name="listener" value="formSubmitted"/> ?
> >>I seem to recall the listener change needing only the method name
> >>now...? (Someone correct me if I'm wrong... I'm in a hurry and "shooting
> >>from the hip" on this one)
> >>
> >>Robert
> >>
> >>
> >>
> 
> --
> Thanks,
> 
> Konstantin Ignatyev
> 
> http://www.kgionline.com 
> 
> PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000
> 
> Bowers, C.A.  The Culture of Denial:
> Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools.
> New York:  State University of New York Press, 1997: (4) (5) (p.206)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org 
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org 
> 
>

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


Re: 4.0: listeners

Posted by Konstantin Iignatyev <kg...@yahoo.com>.
Then I would say that compatibility with 3.0 is unnecessary broken. It 
is very easy to put something like this inside of T4
if( expression.startsWith( "listeners"){
  expression = expression.substr( 9 );
}

and that will make migration path easier for many.

Gregg D Bolinger wrote:

>Yes, that is corrrect. Using must formSubmitted works. Any of the methods 
>Geoff stated work.
>
>Gregg
>
>On 5/10/05, Robert Zeigler <ro...@scazdl.org> wrote:
>  
>
>>I'll confess to not following many of the 4.0 changes extremely closely,
>>but...
>>have you tried:
>><binding name="listener" value="formSubmitted"/> ?
>>I seem to recall the listener change needing only the method name
>>now...? (Someone correct me if I'm wrong... I'm in a hurry and "shooting
>>from the hip" on this one)
>>
>>Robert
>>
>>    
>>

-- 
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000

Bowers, C.A.  The Culture of Denial:  
Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools.  
New York:  State University of New York Press, 1997: (4) (5) (p.206)


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


Re: 4.0: listeners

Posted by Gregg D Bolinger <gt...@gmail.com>.
Yes, that is corrrect. Using must formSubmitted works. Any of the methods 
Geoff stated work.

Gregg

On 5/10/05, Robert Zeigler <ro...@scazdl.org> wrote:
> 
> I'll confess to not following many of the 4.0 changes extremely closely,
> but...
> have you tried:
> <binding name="listener" value="formSubmitted"/> ?
> I seem to recall the listener change needing only the method name
> now...? (Someone correct me if I'm wrong... I'm in a hurry and "shooting
> from the hip" on this one)
> 
> Robert
> 
> Gregg D Bolinger wrote:
> > I have a page with a form binding like so:
> >
> > <component id="form" type="Form">
> > <binding name="delegate" value="beans.delegate"/>
> > <binding name="listener" value="listeners.formSubmitted"/>
> > </component>
> >
> > My java file has a method:
> >
> > public void formSubmitted(IRequestCycle cycle) {
> > //code for listener in here
> > }
> >
> > HTML form declaration:
> >
> > <form jwcid="form">...</form>
> >
> > When I click the button on the web page I get the following error:
> >
> > Object $Login_2@1d1fc02[Login] does not implement a listener method
> > named 'listeners.formSubmitted'.
> >
> > This worked in 3.0.3. I read the new docs on listeners and it would
> > appear that it should work.
> >
> > Gregg Bolinger
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

Re: 4.0: listeners

Posted by Robert Zeigler <ro...@scazdl.org>.
I'll confess to not following many of the 4.0 changes extremely closely,
but...
have you tried:
<binding name="listener" value="formSubmitted"/> ?
I seem to recall the listener change needing only the method name
now...? (Someone correct me if I'm wrong... I'm in a hurry and "shooting
from the hip" on this one)

Robert

Gregg D Bolinger wrote:
> I have a page with a form binding like so:
> 
> <component id="form" type="Form">
>    <binding name="delegate" value="beans.delegate"/>
>    <binding name="listener" value="listeners.formSubmitted"/>
> </component>
> 
> My java file has a method:
> 
> public void formSubmitted(IRequestCycle cycle) {
>    //code for listener in here
> }
> 
> HTML form declaration:
> 
> <form jwcid="form">...</form>
> 
> When I click the button on the web page I get the following error:
> 
> Object $Login_2@1d1fc02[Login] does not implement a listener method
> named 'listeners.formSubmitted'.
> 
> This worked in 3.0.3. I read the new docs on listeners and it would
> appear that it should work.
> 
> Gregg Bolinger
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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