Re: [Wicket-user] replace ognl.

2005-11-09 Thread Alexandru Popescu
After rechecking the whole thread, I couldn't find out if this change got into the 1.1 release. Can 
somebdoy put some light onto this?


thanks a lot,

./alex
--
.w( the_mindstorm )p.

#: Johan Compagner changed the world a bit at a time by saying on  10/27/2005 
1:41 AM :#

Hi

I have written a replacement of OGNL when i test it with a very simple test
(The FormInput example)
then i see quite some improvements in cpu speedups and mem improvements

Around 40% speed increase for a submitting the forminput example page 20
times
and only 1/5 of the memory garbage is generated (50MB against 10MB)

The question is what do you guys use of ognl? Can i completely drop it or
must i make it an option so
that you can switch in youre application for all using ognl or the homebrew
wicket impl.
Or make seperate classes (like AbstractPropertyModel) but this is not really
doable because then all the
sub classes must also be copied...(Like CompoundXX)

What i do support now is this:

person.name http://person.name (plain properties)
person.addresses.0.street (addresses is a list and i take the first element)
person.addresses.homeaddress.street (addresses is map and i take the address
with the key 'homeaddress' out of it)

so maps and list are seen and the next part of the expression is then the
key or the index you can also put values in a map
or append/set to a list:

person.addresses.homeaddress = new Address()
person.addresses.10 = new Address()

if the list size is smaller then 10 then it will appends null to make it
that size.

addresses can also be an Array but then it won't be able to grow.

Ofcourse the person.address.street will just be null if address is null, no
exception will be thrown
if you try to set something on a null object a exception is still thrown,
Maybe we could make some null handlers for that somehow that are easy
useable.

So can people live with this? Does anybody uses something different of ognl?

johan





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-11-09 Thread Johan Compagner
no this is 1.2On 11/10/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
After rechecking the whole thread, I couldn't find out if this change got into the 1.1
 release. Cansomebdoy put some light onto this?thanks a lot,./alex--.w( the_mindstorm )p.#: Johan Compagner changed the world a bit at a time by saying on10/27/2005 1:41 AM :# Hi
 I have written a replacement of OGNL when i test it with a very simple test (The FormInput example) then i see quite some improvements in cpu speedups and mem improvements Around 40% speed increase for a submitting the forminput example page 20
 times and only 1/5 of the memory garbage is generated (50MB against 10MB) The question is what do you guys use of ognl? Can i completely drop it or must i make it an option so that you can switch in youre application for all using ognl or the homebrew
 wicket impl. Or make seperate classes (like AbstractPropertyModel) but this is not really doable because then all the sub classes must also be copied...(Like CompoundXX) What i do support now is this:
 person.name http://person.name (plain properties) person.addresses.0.street (addresses is a list and i take the first element)
 person.addresses.homeaddress.street (addresses is map and i take the address with the key 'homeaddress' out of it) so maps and list are seen and the next part of the _expression_ is then the
 key or the index you can also put values in a map or append/set to a list: person.addresses.homeaddress = new Address() person.addresses.10 = new Address() if the list size is smaller then 10 then it will appends null to make it
 that size. addresses can also be an Array but then it won't be able to grow. Ofcourse the person.address.street will just be null if address is null, no exception will be thrown
 if you try to set something on a null object a exception is still thrown, Maybe we could make some null handlers for that somehow that are easy useable. So can people live with this? Does anybody uses something different of ognl?
 johan---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-11-09 Thread Alexandru Popescu

#: Johan Compagner changed the world a bit at a time by saying on  11/10/2005 
2:05 AM :#

no this is 1.2



Thanks Johan.

./alex
--
.w( the_mindstorm )p.


On 11/10/05, Alexandru Popescu [EMAIL PROTECTED] wrote:


After rechecking the whole thread, I couldn't find out if this change got
into the 1.1 release. Can
somebdoy put some light onto this?

thanks a lot,

./alex
--
.w( the_mindstorm )p.

#: Johan Compagner changed the world a bit at a time by saying on
10/27/2005 1:41 AM :#
 Hi

 I have written a replacement of OGNL when i test it with a very simple
test
 (The FormInput example)
 then i see quite some improvements in cpu speedups and mem improvements

 Around 40% speed increase for a submitting the forminput example page 20
 times
 and only 1/5 of the memory garbage is generated (50MB against 10MB)

 The question is what do you guys use of ognl? Can i completely drop it
or
 must i make it an option so
 that you can switch in youre application for all using ognl or the
homebrew
 wicket impl.
 Or make seperate classes (like AbstractPropertyModel) but this is not
really
 doable because then all the
 sub classes must also be copied...(Like CompoundXX)

 What i do support now is this:

 person.name http://person.name http://person.name (plain properties)
 person.addresses.0.street (addresses is a list and i take the first
element)
 person.addresses.homeaddress.street (addresses is map and i take the
address
 with the key 'homeaddress' out of it)

 so maps and list are seen and the next part of the expression is then
the
 key or the index you can also put values in a map
 or append/set to a list:

 person.addresses.homeaddress = new Address()
 person.addresses.10 = new Address()

 if the list size is smaller then 10 then it will appends null to make it
 that size.

 addresses can also be an Array but then it won't be able to grow.

 Ofcourse the person.address.street will just be null if address is null,
no
 exception will be thrown
 if you try to set something on a null object a exception is still
thrown,
 Maybe we could make some null handlers for that somehow that are easy
 useable.

 So can people live with this? Does anybody uses something different of
ognl?

 johan




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-11-02 Thread Johan Compagner
Conversion is first done in Wicket itself.

So if you have a Field that gets its value from a map then you just have to type youre field first:

TextField datePropertyTextField = new TextField(map.property, Date.class);

I already thought about looking at the current key/index and then convert it to that one.
But type conversion should be done at front. And this will be handled by wicket before the object is set.

johan

On 11/1/05, Laurent PETIT [EMAIL PROTECTED]
 wrote:
Hello,some thoughts:property: This can can then be a bean property with get and set method. Or if a map is given as an object it will be lookup with the property as a key when there is not get method for that property.
If the model is a Map, how is the property converted ?Could it be possible to check the type of the property by doing aget() first on the old value of the property, and this old value (ifnot null) could give the type of the property ?
property1.property2: Both properties are lookup as written above. If property1 evaluates to null then if there is a setMethod (or if it is a map) and the Class of the property has a default constructor then the object will
 be constructed and set on the object.in the case of the map, how will you guess the correct type forproperty1 ? (without strongly typed setter ? !)Thanks in advance,--laurent

---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user




Re: [Wicket-user] replace ognl.

2005-10-31 Thread Ingram Chen
I have tried CVS HEAD, but my old codes which based on ognl is broken since I use foo.bar.baz syntax to access public field.

I hope that we are not restricted to only getter/setter:

 private String myProperty
 public String getMyProperty()
 public void setMyProperty()

but also support :
 public String myProperty

On 10/31/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
I agree with Matej.EelcoOn 10/30/05, Matej Knopp [EMAIL PROTECTED] wrote: In my opinion, there's no need for another indirection. From what I've seen, new users are already confused about models, making them even more
 complicated isn't imho the way to go. I think that Ognl models should be separated from the core and put to extensions. That would also get rid of ognl as a dependecy. Just my 2c.
 -Matej Johan Compagner wrote:  Ok now we released 1.1 i have committed the ognl replacement  It is not yet plugable yet we first need to see what we will or can
  support to bring back ognl for specific things.  (plugable or in wicket extentions as its own model?)This is the current javadoc it explains what is possible now:
   This class parses expressions to lookup or set a value on the object  that is given.  The supported expressions are:   property: This can can then be a bean property with get and set
  method. Or if a map is given as an object it will be lookup with the  property as a key when there is not get method for that property.   property1.property2: Both properties are lookup as written above. If
  property1 evaluates to null then if there is a setMethod (or if it is a  map) and the Class of the property has a default constructor then the  object will be constructed and set on the object.
   property.index: If the property is a List or Array then the second  property can be a index on that list like: 'mylist.0' this _expression_  will also map on a getProperty(index) or setProperty(index,value)
  methods. If the object is a List then the list will grow automaticaly if  the index is greater then the size   Index or map properties can also be written as: property[index] or
  property[key]   On 10/28/05, *Phil Kulak* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  wrote:   I like the idea of being able to plug in OGNL if you really need it.  Now that I think about it, I've got a couple ChoiceRenderers that call  functions using OGNL. Although, it probably would be very easy to
  rewrite these by just implementing the interface myself, and much more  efficient.---  This 
SF.Net email is sponsored by the JBoss Inc.  Get Certified Today * Register for a JBoss Training Course  Free Certification Exam for All Training Attendees Through End of 2005  Visit 
http://www.jboss.com/services/certification for more information  ___  Wicket-user mailing list
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED].net  
https://lists.sourceforge.net/lists/listinfo/wicket-user   --- This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification
 for more information ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005Visit http://www.jboss.com/services/certification for more information___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] replace ognl.

2005-10-31 Thread Martijn Dashorst
This is being fixed (as I read on the dev list).

Martijn


On 11/1/05, Ingram Chen [EMAIL PROTECTED] wrote:
 I have tried CVS HEAD, but my old codes which based on ognl is broken since
 I use foo.bar.baz syntax to access public field.

  I hope that we are not restricted to only getter/setter:

   private String myProperty
   public String getMyProperty()
   public void setMyProperty()

  but also support :

  public String myProperty



 On 10/31/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  I agree with Matej.
 
  Eelco
 
  On 10/30/05, Matej Knopp [EMAIL PROTECTED] wrote:
   In my opinion, there's no need for another indirection. From what I've
   seen, new users are already confused about models, making them even more
   complicated isn't imho the way to go.
  
   I think that Ognl models should be separated from the core and put to
   extensions. That would also get rid of ognl as a dependecy.
  
   Just my 2c.
  
   -Matej
  
   Johan Compagner wrote:
Ok now we released 1.1 i have committed the ognl replacement
It is not yet plugable yet we first need to see what we will or can
support to bring back ognl for specific things.
(plugable or in wicket extentions as its own model?)
   
   
This is the current javadoc it explains what is possible now:
   
This class parses expressions to lookup or set a value on the object
that is given.
The supported expressions are:
   
property: This can can then be a bean property with get and set
method. Or if a map is given as an object it will be lookup with the
property as a key when there is not get method for that property.
   
property1.property2: Both properties are lookup as written above. If
property1 evaluates to null then if there is a setMethod (or if it is
 a
map) and the Class of the property has a default constructor then the
object will be constructed and set on the object.
   
property.index: If the property is a List or Array then the second
property can be a index on that list like: 'mylist.0' this expression
will also map on a getProperty(index) or setProperty(index,value)
methods. If the object is a List then the list will grow automaticaly
 if
the index is greater then the size
   
Index or map properties can also be written as: property[index] or
property[key]
   
On 10/28/05, *Phil Kulak* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
   
I like the idea of being able to plug in OGNL if you really need
 it.
Now that I think about it, I've got a couple ChoiceRenderers that
 call
functions using OGNL. Although, it probably would be very easy to
rewrite these by just implementing the interface myself, and much
 more
efficient.
   
   
   
 ---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of
 2005
Visit http://www.jboss.com/services/certification
 for more information
___
Wicket-user mailing list
[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED].net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.
   Get Certified Today * Register for a JBoss Training Course
   Free Certification Exam for All Training Attendees Through End of 2005
   Visit http://www.jboss.com/services/certification for
 more information
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for
 more information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



 --
 Ingram Chen
 Java [EMAIL PROTECTED]
 Institue of BioMedical Sciences Academia Sinica Taiwan
 blog: http://www.javaworld.com.tw/roller/page/ingramchen


--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information

Re: [Wicket-user] replace ognl.

2005-10-30 Thread Matej Knopp
In my opinion, there's no need for another indirection. From what I've 
seen, new users are already confused about models, making them even more 
complicated isn't imho the way to go.


I think that Ognl models should be separated from the core and put to 
extensions. That would also get rid of ognl as a dependecy.


Just my 2c.

-Matej

Johan Compagner wrote:

Ok now we released 1.1 i have committed the ognl replacement
It is not yet plugable yet we first need to see what we will or can 
support to bring back ognl for specific things.

(plugable or in wicket extentions as its own model?)


This is the current javadoc it explains what is possible now:

This class parses expressions to lookup or set a value on the object 
that is given.

The supported expressions are:

property: This can can then be a bean property with get and set 
method. Or if a map is given as an object it will be lookup with the 
property as a key when there is not get method for that property.


property1.property2: Both properties are lookup as written above. If 
property1 evaluates to null then if there is a setMethod (or if it is a 
map) and the Class of the property has a default constructor then the 
object will be constructed and set on the object.


property.index: If the property is a List or Array then the second 
property can be a index on that list like: 'mylist.0' this expression 
will also map on a getProperty(index) or setProperty(index,value) 
methods. If the object is a List then the list will grow automaticaly if 
the index is greater then the size


Index or map properties can also be written as: property[index] or 
property[key]


On 10/28/05, *Phil Kulak* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:


I like the idea of being able to plug in OGNL if you really need it.
Now that I think about it, I've got a couple ChoiceRenderers that call
functions using OGNL. Although, it probably would be very easy to
rewrite these by just implementing the interface myself, and much more
efficient.


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED].net
https://lists.sourceforge.net/lists/listinfo/wicket-user






---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-30 Thread Eelco Hillenius
I agree with Matej.

Eelco

On 10/30/05, Matej Knopp [EMAIL PROTECTED] wrote:
 In my opinion, there's no need for another indirection. From what I've
 seen, new users are already confused about models, making them even more
 complicated isn't imho the way to go.

 I think that Ognl models should be separated from the core and put to
 extensions. That would also get rid of ognl as a dependecy.

 Just my 2c.

 -Matej

 Johan Compagner wrote:
  Ok now we released 1.1 i have committed the ognl replacement
  It is not yet plugable yet we first need to see what we will or can
  support to bring back ognl for specific things.
  (plugable or in wicket extentions as its own model?)
 
 
  This is the current javadoc it explains what is possible now:
 
  This class parses expressions to lookup or set a value on the object
  that is given.
  The supported expressions are:
 
  property: This can can then be a bean property with get and set
  method. Or if a map is given as an object it will be lookup with the
  property as a key when there is not get method for that property.
 
  property1.property2: Both properties are lookup as written above. If
  property1 evaluates to null then if there is a setMethod (or if it is a
  map) and the Class of the property has a default constructor then the
  object will be constructed and set on the object.
 
  property.index: If the property is a List or Array then the second
  property can be a index on that list like: 'mylist.0' this expression
  will also map on a getProperty(index) or setProperty(index,value)
  methods. If the object is a List then the list will grow automaticaly if
  the index is greater then the size
 
  Index or map properties can also be written as: property[index] or
  property[key]
 
  On 10/28/05, *Phil Kulak* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  wrote:
 
  I like the idea of being able to plug in OGNL if you really need it.
  Now that I think about it, I've got a couple ChoiceRenderers that call
  functions using OGNL. Although, it probably would be very easy to
  rewrite these by just implementing the interface myself, and much more
  efficient.
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for more information
  ___
  Wicket-user mailing list
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED].net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 



 ---
 This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course
 Free Certification Exam for All Training Attendees Through End of 2005
 Visit http://www.jboss.com/services/certification for more information
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-28 Thread Johan Compagner
yes i think having a switch globally is not a good use case.
I think you just have to choose it at model level. The only problem is that i have changed
AbstractPropertyModel. And that one is the base class for X numbmer of classes (like compound)

So the only real solution (besides always have at least 4 classes copied) is that the 
Ognl.getValue or Objects.getValue() is abstracted a way. And by default we use our own.
and you can if you want give in the constructor of the AbstractPropertyModel which one you want to use.

so:

new CompoundModel(user, new OgnlResolver());

that would mean that all AbstractPropertyModel implementations must have an extra field (default null)
And we need an interface that that can handle all types so we have to give them a method like:
getValue(_expression_, component) or something
and
setValue(_expression_,value,component)

Then we can move Ognl to extentions or to another project and only give that Resolver that can be used by any sub class
of AbstractPropertyModel.

johan
On 10/27/05, Laurent PETIT [EMAIL PROTECTED] wrote:
Hello,On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote: AbstractPropertyModel could work with something like a propertyresolver/ delegate (one more indirection :)) for getting and
 setting values based on a _expression_, and it might even be a good idea to have the option of having the default delegate as a application setting or something. Would be real easy to implement too.
I like the idea of one more indirection :-) to allow more than asingle implementation.But I can see a problem arise if you do so: having manyimplementations that eventually will not share the same syntax for
accessing properties.This could presumably be a risk for Components Reusability, if somepackaged components embark their own models and rely on a certainsyntax for specifying access to model properties ?
---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training CourseFree Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-28 Thread Johan Compagner

Does Wicket also check for direct public property of the same name ?

not yet, but that is easy to build.

Same remark concerning maps vs beans.If find it great if we don't know if the property is contained in the
Map or is a property of the Model.
i am alos still in favor the current impl by just doing dots nothing more.
The only thing is that for maps that are also a bean is a bit difficult. 
But i find that a bad idea anyway.(a map that is also a bean)



if the object is an instance of a Map: first try to interpret prop as a Map key


that will never fails (if it is a setter) (mymap.xxx = yyy)
So i think it must be the other way around.
First try to do a setter and then if that fails use it as a map.

johan



Re: [Wicket-user] replace ognl.

2005-10-28 Thread Laurent PETIT
On 10/28/05, Johan Compagner [EMAIL PROTECTED] wrote:
  Does Wicket also check for direct public property of the same name ?

 not yet, but that is easy to build.

That would be great.

  Same remark concerning maps vs beans.
 
  If find it great if we don't know if the property is contained in the
  Map or is a property of the Model.
 i am alos still in favor the current impl by just doing dots nothing more.
 The only thing is that for maps that are also a bean is a bit difficult.
 But i find that a bad idea anyway.(a map that is also a bean)

Yes, I agree, and for the following reason: the use case I thought of
was that, during refactoring, the model is first implemented using a
Map, and when it is needed to have an object instead (in order to do
some logic in the getter/setter, or for whatever reason), the Model is
replaced by an object.

And then only the creation/injection of the model has to change, not
all the references to getter/setter.

  if the object is an instance of a Map:
 first try to interpret prop as a Map key

 that will never fails (if it is a setter) (mymap.xxx = yyy)
 So i think it must be the other way around.
 First try to do a setter and then if that fails use it as a map.

Yes it's true, I only thought of the get() part of the problem, shame on me.
But, as we are in the semantics of accessing an existing property,
what about doing a get() before the set.
And if the get() returns null, deduce that this is not a Map property
we want to bind to, and search javabean properties, then public
properties ?

This does not seem to weird to me, since the absence of the key would
be as bad as the absence of a getter in this use case ?


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-28 Thread Johan Compagner
don't know if that is weird (that the key is not there)
it can be completely valid.
What happens if i do this:

map.xxx = yyy

First i try to get xxx key?
Not there then i try to get xxx as a property
still not there the back to the map?

i still think that i can first check for the _expression_ as a property then if not found it is map value
(doesn't matter if the key isn't there or not)

johan

On 10/28/05, Laurent PETIT [EMAIL PROTECTED] wrote:
On 10/28/05, Johan Compagner [EMAIL PROTECTED] wrote:  Does Wicket also check for direct public property of the same name ? not yet, but that is easy to build.
That would be great.  Same remark concerning maps vs beans.   If find it great if we don't know if the property is contained in the  Map or is a property of the Model.
 i am alos still in favor the current impl by just doing dots nothing more. The only thing is that for maps that are also a bean is a bit difficult. But i find that a bad idea anyway.(a map that is also a bean)
Yes, I agree, and for the following reason: the use case I thought ofwas that, during refactoring, the model is first implemented using aMap, and when it is needed to have an object instead (in order to do
some logic in the getter/setter, or for whatever reason), the Model isreplaced by an object.And then only the creation/injection of the model has to change, notall the references to getter/setter.
  if the object is an instance of a Map: first try to interpret prop as a Map key that will never fails (if it is a setter) (mymap.xxx = yyy) So i think it must be the other way around.
 First try to do a setter and then if that fails use it as a map.Yes it's true, I only thought of the get() part of the problem, shame on me.But, as we are in the semantics of accessing an existing property,
what about doing a get() before the set.And if the get() returns null, deduce that this is not a Map propertywe want to bind to, and search javabean properties, then publicproperties ?This does not seem to weird to me, since the absence of the key would
be as bad as the absence of a getter in this use case ?---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005Visit http://www.jboss.com/services/certification for more information___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] replace ognl.

2005-10-28 Thread Laurent PETIT
Well, yes,

in fact, I think we can guess that it would be dangereous an error
prone for the developer to have a key of the map with the same name as
the property.

So, indeed, it is not a problem if you first check for the property,
then the map value.

+1 for that,

--
Laurent

On 10/28/05, Johan Compagner [EMAIL PROTECTED] wrote:
 don't know if that is weird (that the key is not there)
 it can be completely valid.
 What happens if i do this:

 map.xxx = yyy

 First i try to get xxx key?
 Not there then i try to get xxx as a property
 still not there the back to the map?

 i still think that i can first check for the expression as a property then
 if not found it is map value
 (doesn't matter if the key isn't there or not)

 johan




 On 10/28/05, Laurent PETIT [EMAIL PROTECTED] wrote:
 
  On 10/28/05, Johan Compagner [EMAIL PROTECTED] wrote:
Does Wicket also check for direct public property of the same name ?
  
   not yet, but that is easy to build.
 
  That would be great.
 
Same remark concerning maps vs beans.
   
If find it great if we don't know if the property is contained in the
Map or is a property of the Model.
   i am alos still in favor the current impl by just doing dots nothing
 more.
   The only thing is that for maps that are also a bean is a bit difficult.
   But i find that a bad idea anyway.(a map that is also a bean)
 
  Yes, I agree, and for the following reason: the use case I thought of
  was that, during refactoring, the model is first implemented using a
  Map, and when it is needed to have an object instead (in order to do
  some logic in the getter/setter, or for whatever reason), the Model is
  replaced by an object.
 
  And then only the creation/injection of the model has to change, not
  all the references to getter/setter.
 
if the object is an instance of a Map:
   first try to interpret prop as a Map key
 
   that will never fails (if it is a setter) (mymap.xxx = yyy)
   So i think it must be the other way around.
   First try to do a setter and then if that fails use it as a map.
 
  Yes it's true, I only thought of the get() part of the problem, shame on
 me.
  But, as we are in the semantics of accessing an existing property,
  what about doing a get() before the set.
  And if the get() returns null, deduce that this is not a Map property
  we want to bind to, and search javabean properties, then public
  properties ?
 
  This does not seem to weird to me, since the absence of the key would
  be as bad as the absence of a getter in this use case ?
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for
 more information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-28 Thread Davide Savazzi
On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
 That NPE  is already handled.
  When you do a get a and somewhere in the line a null is encountered then
 null is returned

Great!!!

  I still am thinking of a way to create the null object then this can be
 automatic if the object
  i have to create has a default constructor and a setMethod is there for
 that object on its parent.

Wow, that's exactly what I need!!! So I don't have to create empty
objects in my model anymore!

  For example the parent object could implement an interface called
 INullHandler with one method createObject(property)
  Then the parent object is responsable for making the missing field that it
 has.
  But don't know about this because such an interface is wicket specific (so
 ui specific) and the objects are or can be database things
  Those worlds should be seperate.

The interface could be optional: if the parent implements this
interface, Wicket uses it, otherwise it tries the default child object
constructor.

--
Davide Savazzi


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-28 Thread Phil Kulak
I like the idea of being able to plug in OGNL if you really need it.
Now that I think about it, I've got a couple ChoiceRenderers that call
functions using OGNL. Although, it probably would be very easy to
rewrite these by just implementing the interface myself, and much more
efficient.


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Alexandru Popescu

#: Martijn Dashorst changed the world a bit at a time by saying on  10/27/2005 
7:28 AM :#

+1 on moving OGNL into extensions.

I think the OGNL thing is good, it provides a nice base
implementation. I'd like to see the current implementation still being
available for those 1% that need the full OGNL expression evaluator
(though I think I share the same sentiment Phil voiced).



This is exactly the way I would put my +1 :-).


Do we also support things like

person.getChildren().get(0).getName()?

Martijn




I guess this is: person.children.[0].name and Johan already mentioned it.

./alex
--
.w( the_mindstorm )p.


On 10/27/05, Phil Kulak [EMAIL PROTECTED] wrote:

I'm very +1 on this. OGNL has turned into it's own scripting language
over the years. If you want to use any of those features, then you're
missing the point of Wicket.


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Juergen Donnerstag
I'm also +1 on moving OGNL into extension

 I guess this is: person.children.[0].name and Johan already mentioned it.

I think Johan mentioned, it'll be person.children.0.name

Juergen

On 10/27/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
 #: Martijn Dashorst changed the world a bit at a time by saying on  
 10/27/2005 7:28 AM :#
  +1 on moving OGNL into extensions.
 
  I think the OGNL thing is good, it provides a nice base
  implementation. I'd like to see the current implementation still being
  available for those 1% that need the full OGNL expression evaluator
  (though I think I share the same sentiment Phil voiced).
 

 This is exactly the way I would put my +1 :-).

  Do we also support things like
 
  person.getChildren().get(0).getName()?
 
  Martijn
 
 

 I guess this is: person.children.[0].name and Johan already mentioned it.

 ./alex
 --
 .w( the_mindstorm )p.

  On 10/27/05, Phil Kulak [EMAIL PROTECTED] wrote:
  I'm very +1 on this. OGNL has turned into it's own scripting language
  over the years. If you want to use any of those features, then you're
  missing the point of Wicket.
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for more information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for more information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



 ---
 This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course
 Free Certification Exam for All Training Attendees Through End of 2005
 Visit http://www.jboss.com/services/certification for more information
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] replace ognl.

2005-10-27 Thread Maurice Marrink
Also +1
Actually our project is what triggerd this change and will bring some
new features we need. Nothing fancy though.

What I have gathered from johan it will be possible to get elements from
maps / lists / arrays etc.
The expression would be something like person.children.0.name It is very
similar if not the same syntax ognl uses. If children was a map
containing a key jack you could use person.children.jack.name



Maurice Marrink 
www.topicus.nl  

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED] 
Sent: donderdag 27 oktober 2005 7:28
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] replace ognl.

+1 on moving OGNL into extensions.

I think the OGNL thing is good, it provides a nice base
implementation. I'd like to see the current implementation still being
available for those 1% that need the full OGNL expression evaluator
(though I think I share the same sentiment Phil voiced).

Do we also support things like

person.getChildren().get(0).getName()?

Martijn


On 10/27/05, Phil Kulak [EMAIL PROTECTED] wrote:
 I'm very +1 on this. OGNL has turned into it's own scripting language
 over the years. If you want to use any of those features, then you're
 missing the point of Wicket.


 ---
 This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course
 Free Certification Exam for All Training Attendees Through End of 2005
 Visit http://www.jboss.com/services/certification for more information
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Johan Compagner
yes i currently don't have support for { or [ or things like that.
Just plain text with dots. This makes it very easy and fast to parse.
but if people really want this:

person.children[0].name

does ognl has a special map _expression_? something like person.childeren{child1}.name ?
i know that it also works for just strings like Ognl.getValue(child1 , myHashMap);
so it all depends on what we really would like to see for array/list:

person.children.0.name
person.children.[0].name
person.children[0].name

and maps?

if we want [] in it then i just have to use a bit more logic like a tokenizer instead of just doing a plain indexOf loop

I like the simple approache i have now. .
On 10/27/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
I'm also +1 on moving OGNL into extension I guess this is: person.children.[0].name and Johan already mentioned it.I think Johan mentioned, it'll be person.children.0.name
JuergenOn 10/27/05, Alexandru Popescu [EMAIL PROTECTED] wrote: #: Martijn Dashorst changed the world a bit at a time by saying on10/27/2005 7:28 AM :#
  +1 on moving OGNL into extensions.   I think the OGNL thing is good, it provides a nice base  implementation. I'd like to see the current implementation still being  available for those 1% that need the full OGNL _expression_ evaluator
  (though I think I share the same sentiment Phil voiced).  This is exactly the way I would put my +1 :-).  Do we also support things like   
person.getChildren().get(0).getName()?   Martijn   I guess this is: person.children.[0].name and Johan already mentioned it. ./alex --
 .w( the_mindstorm )p.  On 10/27/05, Phil Kulak [EMAIL PROTECTED] wrote:  I'm very +1 on this. OGNL has turned into it's own scripting language
  over the years. If you want to use any of those features, then you're  missing the point of Wicket.---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today * Register for a JBoss Training Course  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for more information  ___  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user
 ---  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005  Visit http://www.jboss.com/services/certification for more information
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user  --- This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification
 for more information ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005Visit http://www.jboss.com/services/certification for more information___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] replace ognl.

2005-10-27 Thread Juergen Donnerstag
Yes, I agree. Keep it simple. Doesn't Groovy do it the same way, you
proposed it, Johan?

Juergen

On 10/27/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
 #: Johan Compagner changed the world a bit at a time by saying on  10/27/2005 
 10:06 AM :#
  yes i currently don't have support for { or [ or things like that.
  Just plain text with dots. This makes it very easy and fast to parse.
  but if people really want this:
 
  person.children[0].name
 
  does ognl has a special map expression? something like
  person.childeren{child1}.name ?
  i know that it also works for just strings like Ognl.getValue(child1 ,
  myHashMap);
 
  so it all depends on what we really would like to see for array/list:
 
  person.children.0.name http://person.children.0.name
  person.children.[0].name
  person.children[0].name
 
  and maps?
 
  if we want [] in it then i just have to use a bit more logic like a
  tokenizer instead of just doing a plain indexOf loop
 
  I like the simple approache i have now. .
 

 If you start this to keep it simple, than we should keep it that way. IMO 
 person.children.0.name is
 same good as person.children[0].name and as person.children.[0].name, once it 
 is clearly described
 somewhere ;-).

 ./alex
 --
 .w( the_mindstorm )p.

  On 10/27/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 
  I'm also +1 on moving OGNL into extension
 
   I guess this is: person.children.[0].name and Johan already mentioned
  it.
 
  I think Johan mentioned, it'll be 
  person.children.0.namehttp://person.children.0.name
 
  Juergen
 
  On 10/27/05, Alexandru Popescu [EMAIL PROTECTED]
  wrote:
   #: Martijn Dashorst changed the world a bit at a time by saying on
  10/27/2005 7:28 AM :#
+1 on moving OGNL into extensions.
   
I think the OGNL thing is good, it provides a nice base
implementation. I'd like to see the current implementation still being
available for those 1% that need the full OGNL expression evaluator
(though I think I share the same sentiment Phil voiced).
   
  
   This is exactly the way I would put my +1 :-).
  
Do we also support things like
   
person.getChildren().get(0).getName()?
   
Martijn
   
   
  
   I guess this is: person.children.[0].name and Johan already mentioned
  it.
  
   ./alex
   --
   .w( the_mindstorm )p.
  
On 10/27/05, Phil Kulak [EMAIL PROTECTED] wrote:
I'm very +1 on this. OGNL has turned into it's own scripting language
over the years. If you want to use any of those features, then you're
missing the point of Wicket.
   
   
---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of
  2005
Visit http://www.jboss.com/services/certification for more
  information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.
   Get Certified Today * Register for a JBoss Training Course
   Free Certification Exam for All Training Attendees Through End of 2005
   Visit http://www.jboss.com/services/certification for more information
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for more information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 



 ---
 This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course
 Free Certification Exam for All Training Attendees Through End of 2005
 Visit http://www.jboss.com/services/certification for more information
 ___
 Wicket-user mailing list
 

Re: [Wicket-user] replace ognl.

2005-10-27 Thread Felix von Delius
I strongly support replacing OGNL with something more performant, as
long as it is not yet another new syntax for accessing properties (we
already have OGNL, Spring property access syntax, some expression
languages from the JSP/Taglib world and probably some others). At
least it sould be OGNL compatible for 90% of the cases. Perhaps using
the Spring implementation is possible? It is widely tested and I
suppose it doesn't have the OGNL performance issues.

Further I remember an issue in this mailinglist that in OGNL adressing
a not existing subtree results in a NullPointerException
(customer.address.city.zip throws NPE if address is null). Maybe a
new implementation could handle this issue without NPE? (There was the
suggestion for a syntax like customer.address?.city.zip, but I'm not
sure it this is a good idea).

Cheers,
Felix


On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
 Hi

  I have written a replacement of OGNL when i test it with a very simple test
 (The FormInput example)
  then i see quite some improvements in cpu speedups and mem improvements

  Around 40% speed increase for a submitting the forminput example page 20
 times
  and only 1/5 of the memory garbage is generated (50MB against 10MB)

  The question is what do you guys use of ognl? Can i completely drop it or
 must i make it an option so
  that you can switch in youre application for all using ognl or the homebrew
 wicket impl.
  Or make seperate classes (like AbstractPropertyModel) but this is not
 really doable because then all the
  sub classes must also be copied...(Like CompoundXX)

  What i do support now is this:

  person.name (plain properties)
  person.addresses.0.street (addresses is a list and i take the first
 element)
  person.addresses.homeaddress.street (addresses is map and i take the
 address with the key 'homeaddress' out of it)

  so maps and list are seen and the next part of the expression is then the
 key or the index you can also put values in a map
  or append/set to a list:

  person.addresses.homeaddress = new Address()
  person.addresses.10 = new Address()

  if the list size is smaller then 10 then it will appends null to make it
 that size.

  addresses can also be an Array but then it won't be able to grow.

  Ofcourse the person.address.street will just be null if address is null, no
 exception will be thrown
  if you try to set something on a null object a exception is still thrown,
 Maybe we could make some null handlers for that somehow that are easy
 useable.

  So can people live with this? Does anybody uses something different of
 ognl?

  johan



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Johan Compagner
That NPE is already handled.
When you do a get a and somewhere in the line a null is encountered then null is returned

With a set a NPE is thrown currently because if that is not handled you loose data (which is bad)
I still am thinking of a way to create the null object then this can be automatic if the object
i have to create has a default constructor and a setMethod is there for that object on its parent.

So that are 2 big ifs... Also thinking about a NullHandler but where does that come from how do we specify that?
For example the parent object could implement an interface called INullHandler with one method createObject(property)
Then the parent object is responsable for making the missing field that it has.
But don't know about this because such an interface is wicket specific
(so ui specific) and the objects are or can be database things
Those worlds should be seperate.

johan


On 10/27/05, Felix von Delius [EMAIL PROTECTED] wrote:
I strongly support replacing OGNL with something more performant, aslong as it is not yet another new syntax for accessing properties (wealready have OGNL, Spring property access syntax, some _expression_languages from the JSP/Taglib world and probably some others). At
least it sould be OGNL compatible for 90% of the cases. Perhaps usingthe Spring implementation is possible? It is widely tested and Isuppose it doesn't have the OGNL performance issues.Further I remember an issue in this mailinglist that in OGNL adressing
a not existing subtree results in a NullPointerException(customer.address.city.zip throws NPE if address is null). Maybe anew implementation could handle this issue without NPE? (There was thesuggestion for a syntax like 
customer.address?.city.zip, but I'm notsure it this is a good idea).Cheers,FelixOn 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
 HiI have written a replacement of OGNL when i test it with a very simple test (The FormInput example)then i see quite some improvements in cpu speedups and mem improvements
Around 40% speed increase for a submitting the forminput example page 20 timesand only 1/5 of the memory garbage is generated (50MB against 10MB)The question is what do you guys use of ognl? Can i completely drop it or
 must i make it an option sothat you can switch in youre application for all using ognl or the homebrew wicket impl.Or make seperate classes (like AbstractPropertyModel) but this is not
 really doable because then all thesub classes must also be copied...(Like CompoundXX)What i do support now is this:person.name (plain properties)
person.addresses.0.street (addresses is a list and i take the first element)person.addresses.homeaddress.street (addresses is map and i take the address with the key 'homeaddress' out of it)
so maps and list are seen and the next part of the _expression_ is then the key or the index you can also put values in a mapor append/set to a list:person.addresses.homeaddress
 = new Address()person.addresses.10 = new Address()if the list size is smaller then 10 then it will appends null to make it that size.addresses can also be an Array but then it won't be able to grow.
Ofcourse the person.address.street will just be null if address is null, no exception will be thrownif you try to set something on a null object a exception is still thrown, Maybe we could make some null handlers for that somehow that are easy
 useable.So can people live with this? Does anybody uses something different of ognl?johan---
This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training CourseFree Certification Exam for All Training Attendees Through End of 2005Visit 
http://www.jboss.com/services/certification for more information___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Alexandru Popescu

#: Maurice Marrink changed the world a bit at a time by saying on  10/27/2005 
11:16 AM :#

That nullpointer is our problem too and one of the reasons it is being
changed right now.
Don't think johan has put in the syntax you just suggested though.
Afaik it just returns null.



IMO evaluating the expression should stop immediately it reaches a null, but without throwing an 
exception (probably just some smart logging). Take a look at FreeMarker for example and its annoying 
default behavior regarding null handling.


Another solution would be to provide a way to specify a NullPropertyHandler.

./alex
--
.w( the_mindstorm )p.




Maurice Marrink 
www.topicus.nl  

-Original Message-
From: Felix von Delius [mailto:[EMAIL PROTECTED] 
Sent: donderdag 27 oktober 2005 11:10

To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] replace ognl.

I strongly support replacing OGNL with something more performant, as
long as it is not yet another new syntax for accessing properties (we
already have OGNL, Spring property access syntax, some expression
languages from the JSP/Taglib world and probably some others). At
least it sould be OGNL compatible for 90% of the cases. Perhaps using
the Spring implementation is possible? It is widely tested and I
suppose it doesn't have the OGNL performance issues.

Further I remember an issue in this mailinglist that in OGNL adressing
a not existing subtree results in a NullPointerException
(customer.address.city.zip throws NPE if address is null). Maybe a
new implementation could handle this issue without NPE? (There was the
suggestion for a syntax like customer.address?.city.zip, but I'm not
sure it this is a good idea).

Cheers,
Felix


On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:

Hi

 I have written a replacement of OGNL when i test it with a very

simple test

(The FormInput example)
 then i see quite some improvements in cpu speedups and mem

improvements


 Around 40% speed increase for a submitting the forminput example page

20

times
 and only 1/5 of the memory garbage is generated (50MB against 10MB)

 The question is what do you guys use of ognl? Can i completely drop

it or

must i make it an option so
 that you can switch in youre application for all using ognl or the

homebrew

wicket impl.
 Or make seperate classes (like AbstractPropertyModel) but this is not
really doable because then all the
 sub classes must also be copied...(Like CompoundXX)

 What i do support now is this:

 person.name (plain properties)
 person.addresses.0.street (addresses is a list and i take the first
element)
 person.addresses.homeaddress.street (addresses is map and i take the
address with the key 'homeaddress' out of it)

 so maps and list are seen and the next part of the expression is then

the

key or the index you can also put values in a map
 or append/set to a list:

 person.addresses.homeaddress = new Address()
 person.addresses.10 = new Address()

 if the list size is smaller then 10 then it will appends null to make

it

that size.

 addresses can also be an Array but then it won't be able to grow.

 Ofcourse the person.address.street will just be null if address is

null, no

exception will be thrown
 if you try to set something on a null object a exception is still

thrown,

Maybe we could make some null handlers for that somehow that are easy
useable.

 So can people live with this? Does anybody uses something different

of

ognl?

 johan




---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Johan Compagner
yes it directly returns null.
i my eyes a nullpropertyhanlder only applies to when you want to set something not when you want to get something.On 10/27/05, Alexandru Popescu 
[EMAIL PROTECTED] wrote:
#: Maurice Marrink changed the world a bit at a time by saying on10/27/2005 11:16 AM :# That nullpointer is our problem too and one of the reasons it is being changed right now. Don't think johan has put in the syntax you just suggested though.
 Afaik it just returns null.IMO evaluating the _expression_ should stop immediately it reaches a null, but without throwing anexception (probably just some smart logging). Take a look at FreeMarker for example and its annoying
default behavior regarding null handling.Another solution would be to provide a way to specify a NullPropertyHandler../alex--.w( the_mindstorm )p. 
 Maurice Marrink www.topicus.nl -Original Message- From: Felix von Delius [mailto:[EMAIL PROTECTED]
] Sent: donderdag 27 oktober 2005 11:10 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] replace ognl. I strongly support replacing OGNL with something more performant, as
 long as it is not yet another new syntax for accessing properties (we already have OGNL, Spring property access syntax, some _expression_ languages from the JSP/Taglib world and probably some others). At
 least it sould be OGNL compatible for 90% of the cases. Perhaps using the Spring implementation is possible? It is widely tested and I suppose it doesn't have the OGNL performance issues.
 Further I remember an issue in this mailinglist that in OGNL adressing a not existing subtree results in a NullPointerException (customer.address.city.zip throws NPE if address is null). Maybe a
 new implementation could handle this issue without NPE? (There was the suggestion for a syntax like customer.address?.city.zip, but I'm not sure it this is a good idea). Cheers,
 Felix On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote: HiI have written a replacement of OGNL when i test it with a very
 simple test (The FormInput example)then i see quite some improvements in cpu speedups and mem improvementsAround 40% speed increase for a submitting the forminput example page
 20 timesand only 1/5 of the memory garbage is generated (50MB against 10MB)The question is what do you guys use of ognl? Can i completely drop it or
 must i make it an option sothat you can switch in youre application for all using ognl or the homebrew wicket impl.Or make seperate classes (like AbstractPropertyModel) but this is not
 really doable because then all thesub classes must also be copied...(Like CompoundXX)What i do support now is this:
person.name (plain properties)person.addresses.0.street (addresses is a list and i take the first element)person.addresses.homeaddress.street (addresses is map and i take the
 address with the key 'homeaddress' out of it)so maps and list are seen and the next part of the _expression_ is then the key or the index you can also put values in a map
or append/set to a list:person.addresses.homeaddress = new Address()person.addresses.10 = new Address()if the list size is smaller then 10 then it will appends null to make
 it that size.addresses can also be an Array but then it won't be able to grow.Ofcourse the person.address.street will just be null if address is
 null, no exception will be thrownif you try to set something on a null object a exception is still thrown, Maybe we could make some null handlers for that somehow that are easy
 useable.So can people live with this? Does anybody uses something different of ognl?johan ---
 This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit 
http://www.jboss.com/services/certification for more information ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user ---
 This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit 
http://www.jboss.com/services/certification for more information ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user---
This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training CourseFree Certification Exam for All Training Attendees Through End of 2005Visit 
http://www.jboss.com/services/certification for more information___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists

Re: [Wicket-user] replace ognl.

2005-10-27 Thread Johannes Fahrenkrug

I'm also +1 for replacing ognl.
I'm not trying to say that Wicket is slow, not at all, but any speed 
improvement is .an improvement :)!


- Johannes

Johan Compagner wrote:


Hi

I have written a replacement of OGNL when i test it with a very simple 
test (The FormInput example)

then i see quite some improvements in cpu speedups and mem improvements

Around 40% speed increase for a submitting the forminput example page 
20 times

and only 1/5 of the memory garbage is generated (50MB against 10MB)

The question is what do you guys use of ognl? Can i completely drop it 
or must i make it an option so
that you can switch in youre application for all using ognl or the 
homebrew wicket impl.
Or make seperate classes (like AbstractPropertyModel) but this is not 
really doable because then all the

sub classes must also be copied...(Like CompoundXX)

What i do support now is this:

person.name http://person.name (plain properties)
person.addresses.0.street (addresses is a list and i take the first 
element)
person.addresses.homeaddress.street (addresses is map and i take the 
address with the key 'homeaddress' out of it)


so maps and list are seen and the next part of the expression is then 
the key or the index you can also put values in a map

or append/set to a list:

person.addresses.homeaddress = new Address()
person.addresses.10 = new Address()

if the list size is smaller then 10 then it will appends null to make 
it that size.


addresses can also be an Array but then it won't be able to grow.

Ofcourse the person.address.street will just be null if address is 
null, no exception will be thrown
if you try to set something on a null object a exception is still 
thrown, Maybe we could make some null handlers for that somehow that 
are easy useable.


So can people live with this? Does anybody uses something different of 
ognl?


johan





---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Timo Stamm

Johan Compagner wrote:

yes i currently don't have support for { or [ or things like that.
Just plain text with dots. This makes it very easy and fast to parse.
but if people really want this:

person.children[0].name


I can think of two reasons why an access operator [] could be useful:

- It might make the expression more readable, because you know that you 
are operating on an array, List or Map by looking at the expression.


- The content of the access operator could be an expression itself. Example:
person.children[person.selectedChildIndex].name


But I think this is already too much functionality. I would prefer the 
most simple approach with only the most basic support for arrays, Lists 
and Maps using only dot-syntax.



There is one issue that's very important to me. I have run into this 
using the Expression Language of JSP 2.0:


If you have a class that implements Map, you can not access a bean 
property on the instance.


Let's say we have the following class:

class Bar extends HashMap {
public String getFoo() ...
}

Now create an instance and populate it:

Bar b = new Bar();
b.put(yadda, value);


The JSP EL Evaluator would return null for the following expression:

b.foo


I think the Evaluator should look for a value in the map using 
containsKey() and look for a bean property if nothing was found. On a 
list, you could check if the key is numeric.


This would not be a performance hit, and you are still able to use the 
instance like any other object.




Timo


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Johan Compagner

I can think of two reasons why an access operator [] could be useful:- It might make the _expression_ more readable, because you know that you
are operating on an array, List or Map by looking at the _expression_.- The content of the access operator could be an _expression_ itself. Example:person.children[person.selectedChildIndex].name

If i you want to this then use ognl.
I will not support this by the basic stuff.

If you have a class that implements Map, you can not access a beanproperty on the instance.
Let's say we have the following class:class Bar extends HashMap {public String getFoo() ...}Now create an instance and populate it:Bar b = new Bar();
b.put(yadda, value);The JSP EL Evaluator would return null for the following _expression_:b.fooI think the Evaluator should look for a value in the map using
containsKey() and look for a bean property if nothing was found. On alist, you could check if the key is numeric.

I though about this (List and Maps being beans)
For a list this is not that hard because if the next expresion can be converted to an int then it is just an int for the index.
(get1() is then not supported)
And if it can't be converted then we could check if a method is there.

For maps this is different.
Currently i see List/Maps are not beans. If i always use them as a List or Map.

First check if something is there (in the map) looks strange to me.
Because what happens if you do this:

mymap.value = x

and there is a setValue() but not a map entry?
Should i use setValue or do a map update. (or both?)

I still like the current simple way of notation that i have now. And i
think that we will say: do you want more use the ognl models.

johan




Re: [Wicket-user] replace ognl.

2005-10-27 Thread Timo Stamm

Johan Compagner wrote:

I can think of two reasons why an access operator [] could be useful:

- It might make the expression more readable, because you know that you
are operating on an array, List or Map by looking at the expression.

- The content of the access operator could be an expression itself.
Example:
person.children[person.selectedChildIndex].name




If i you want to this then use ognl.
I will not support this by the basic stuff.


No, I don't want to do this.

My point is: Brackets can be useful for the two reasons I mentioned. If 
you do not intend to support these features, there is no reason to use 
brackets in the syntax.




I though about this (List and Maps being beans)
For a list this is not that hard because if the next expresion can be
converted to an int then it is just an int for the index.
(get1() is then not supported)
And if it can't be converted then we could check if a method is there.

For maps this is different.
Currently i see List/Maps are not beans. If i always use them as a List or
Map.

First check if something is there (in the map) looks strange to me.


It gives better performance.



Because what happens if you do this:

mymap.value = x

and there is a setValue() but not a map entry?
Should i use setValue or do a map update. (or both?)


That's true, I didn't think of this situation. So it is necessary to 
check for getters/setters before doing map stuff. This would be the 
following accessor precedence:


1 getter/setter
2 List
3 Map


I don't know if the performance hit is too high to allow getter/setter 
access on Maps and Lists, but I would certainly like this feature 
because it is an requirement of a framework I am using.



Anyways, kudos for replacing OGNL with something more simple and efficient.


Timo


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Eelco Hillenius
I'm not too sure about using dots for index/ map references. It
differs from OGNL:
http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html.
And personally, I think it is usefull to be able to distinct single
from indexed properties just by looking at the expression. Is it
/that/ more expensive? I mean, optimizing is good, but we don't have
to over-do it.

Eelco


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Johan Compagner
ognl can do map lookup with just a _expression_
(that was the first thing i had to do because that did go wrong when i started testing it)
this was used: Ognl.getValue(string, anHashmap);

so the need to do [sd] even with  juk why is that needed ...?

On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
I'm not too sure about using dots for index/ map references. Itdiffers from OGNL:http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html
.And personally, I think it is usefull to be able to distinct singlefrom indexed properties just by looking at the _expression_. Is it/that/ more expensive? I mean, optimizing is good, but we don't haveto over-do it.
Eelco---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training CourseFree Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Eelco Hillenius
If it equals at least one of the OGNL uses, then I'm fine with it.

Eelco

On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
 ognl can do map lookup with just a expression
  (that was the first thing i had to do because that did go wrong when i
 started testing it)
  this was used: Ognl.getValue(string, anHashmap);

  so the need to do [sd]  even with  juk why is that needed ...?




 On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 
  I'm not too sure about using dots for index/ map references. It
  differs from OGNL:
 
 http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html
 .
  And personally, I think it is usefull to be able to distinct single
  from indexed properties just by looking at the expression. Is it
  /that/ more expensive? I mean, optimizing is good, but we don't have
  to over-do it.
 
  Eelco
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of 2005
  Visit http://www.jboss.com/services/certification for
 more information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Johan Compagner
The only thing for me to use [] for an index and { } for a map (for example)
would be that this:

mymap.property would mean that you really want to have a getProperty on a map
(same goes for list)

so i will change it to use with [] (without quotes that i find totally not needed)

foo.list[0].bar 
foo.map[key].bar
foo.list.bar (this is a get property of the list)
foo.map.bar (this is a get property of the map)

But i am affraid that when i do the last thing (it needs to be a property of map) that wicket fails currently
so i think i fall back to that that i will also look it up as a key if the property is not found.

This will result in more mem en cpu usage.
(i don't create any garbage currently)On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
ognl can do map lookup with just a _expression_
(that was the first thing i had to do because that did go wrong when i started testing it)
this was used: Ognl.getValue(string, anHashmap);

so the need to do [sd] even with  juk why is that needed ...?

On 10/27/05, Eelco Hillenius [EMAIL PROTECTED]
 wrote:
I'm not too sure about using dots for index/ map references. Itdiffers from OGNL:
http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html
.And personally, I think it is usefull to be able to distinct singlefrom indexed properties just by looking at the _expression_. Is it/that/ more expensive? I mean, optimizing is good, but we don't have
to over-do it.
Eelco---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training CourseFree Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information___
Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user





Re: [Wicket-user] replace ognl.

2005-10-27 Thread Jonathan Carlson
I'd prefer if it used a groovy-like syntax (or actual groovy behind the
curtain) as much as possible.


 [EMAIL PROTECTED] 2005-10-27 11:15:05 AM 
The only thing for me to use [] for an index and { } for a map (for
example)
would be that this:

mymap.property would mean that you really want to have a getProperty on
a
map
(same goes for list)

so i will change it to use with [] (without quotes that i find totally
not
needed)

foo.list[0].bar
foo.map[key].bar
foo.list.bar (this is a get property of the list)
foo.map.bar (this is a get property of the map)

But i am affraid that when i do the last thing (it needs to be a
property of
map) that wicket fails currently
so i think i fall back to that that i will also look it up as a key if
the
property is not found.

This will result in more mem en cpu usage.
(i don't create any garbage currently)

On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:

 ognl can do map lookup with just a expression
 (that was the first thing i had to do because that did go wrong when
i
 started testing it)
 this was used: Ognl.getValue(string, anHashmap);

 so the need to do [sd] even with  juk why is that needed ...?



 On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 
  I'm not too sure about using dots for index/ map references. It
  differs from OGNL:
 
http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html

  .
  And personally, I think it is usefull to be able to distinct
single
  from indexed properties just by looking at the expression. Is it
  /that/ more expensive? I mean, optimizing is good, but we don't
have
  to over-do it.
 
  Eelco
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of
2005
  Visit http://www.jboss.com/services/certification for more
information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net 
  https://lists.sourceforge.net/lists/listinfo/wicket-user 
 



__
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com 
_


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Timo Stamm

Johan Compagner wrote:

The only thing for me to use [] for an index and { } for a map (for example)
would be that this:

mymap.property would mean that you really want to have a getProperty on 
a map

(same goes for list)

so i will change it to use with [] (without quotes that i find totally 
not needed)


foo.list[0].bar
foo.map[key].bar
foo.list.bar (this is a get property of the list)
foo.map.bar (this is a get property of the map)


Great. This looks very nice.


Timo


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Jonathan Carlson
 and that is?

 Very similar to what you are proposing:
http://groovy.codehaus.org/Collections 

and 

bean?.property  (allows bean to be null)   
(see http://groovy.codehaus.org/Migration+From+Classic+to+JSR+syntax )

I really appreciate how OGNL is very flexible with allowing me to do
things like concatenate two properties into one without having to write
a new getter.  Having a groovy-based property model would give similar
advantages.  And Groovy allows for compact iterating over collections
like OGNL does (although I haven't had a need for it yet).  If you got
rid of that kind of functionality altogether, I think Wicket would be
poorer for it.

My 2 cents worth,

- Jonathan


 [EMAIL PROTECTED] 2005-10-27 1:23:03 PM 
and that is?


On 10/27/05, Jonathan Carlson [EMAIL PROTECTED] wrote:

 I'd prefer if it used a groovy-like syntax (or actual groovy behind
the
 curtain) as much as possible.


  [EMAIL PROTECTED] 2005-10-27 11:15:05 AM 
 The only thing for me to use [] for an index and { } for a map (for
 example)
 would be that this:

 mymap.property would mean that you really want to have a getProperty
on
 a
 map
 (same goes for list)

 so i will change it to use with [] (without quotes that i find
totally
 not
 needed)

 foo.list[0].bar
 foo.map[key].bar
 foo.list.bar (this is a get property of the list)
 foo.map.bar (this is a get property of the map)

 But i am affraid that when i do the last thing (it needs to be a
 property of
 map) that wicket fails currently
 so i think i fall back to that that i will also look it up as a key
if
 the
 property is not found.

 This will result in more mem en cpu usage.
 (i don't create any garbage currently)

 On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
 
  ognl can do map lookup with just a expression
  (that was the first thing i had to do because that did go wrong
when
 i
  started testing it)
  this was used: Ognl.getValue(string, anHashmap);
 
  so the need to do [sd] even with  juk why is that needed ...?
 
 
 
  On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  
   I'm not too sure about using dots for index/ map references. It
   differs from OGNL:
  

http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html


   .
   And personally, I think it is usefull to be able to distinct
 single
   from indexed properties just by looking at the expression. Is it
   /that/ more expensive? I mean, optimizing is good, but we don't
 have
   to over-do it.
  
   Eelco
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.
   Get Certified Today * Register for a JBoss Training Course
   Free Certification Exam for All Training Attendees Through End
of
 2005
   Visit http://www.jboss.com/services/certification for more
 information
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net 
   https://lists.sourceforge.net/lists/listinfo/wicket-user 
  
 
 


__
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please
notify
 the system manager.

 Katun Corporation -- www.katun.com http://www.katun.com

_


 ---
 This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course
 Free Certification Exam for All Training Attendees Through End of
2005
 Visit http://www.jboss.com/services/certification for more
information
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/wicket-user 


__
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com 
_


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] replace ognl.

2005-10-27 Thread Igor Vaynberg
Why not keep wicket simple? I really like the simplicity of the dot notation
johan created. I think we should use [] only as a hint. By default wicket
tries to find a getter and then checks if the object is a list/set/map and
contains the key. The [] hint would tell wicket to skip the getter and go
straight for the contains check. I also like that any null link in the chain
results in a null.

If you really want the complete groovy syntax why not build a groovy
property model using groovy expression evaluator? Same goes for ognl.

My 2 cents.
-Igor

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Jonathan Carlson
 Sent: Thursday, October 27, 2005 11:40 AM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] replace ognl.
 
  and that is?
 
  Very similar to what you are proposing:
 http://groovy.codehaus.org/Collections 
 
 and 
 
 bean?.property  (allows bean to be null)   
 (see http://groovy.codehaus.org/Migration+From+Classic+to+JSR+syntax )
 
 I really appreciate how OGNL is very flexible with allowing 
 me to do things like concatenate two properties into one 
 without having to write a new getter.  Having a groovy-based 
 property model would give similar advantages.  And Groovy 
 allows for compact iterating over collections like OGNL does 
 (although I haven't had a need for it yet).  If you got rid 
 of that kind of functionality altogether, I think Wicket 
 would be poorer for it.
 
 My 2 cents worth,
 
 - Jonathan
 
 
  [EMAIL PROTECTED] 2005-10-27 1:23:03 PM 
 and that is?
 
 
 On 10/27/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
 
  I'd prefer if it used a groovy-like syntax (or actual groovy behind
 the
  curtain) as much as possible.
 
 
   [EMAIL PROTECTED] 2005-10-27 11:15:05 AM 
  The only thing for me to use [] for an index and { } for a map (for
  example)
  would be that this:
 
  mymap.property would mean that you really want to have a getProperty
 on
  a
  map
  (same goes for list)
 
  so i will change it to use with [] (without quotes that i find
 totally
  not
  needed)
 
  foo.list[0].bar
  foo.map[key].bar
  foo.list.bar (this is a get property of the list) 
 foo.map.bar (this is 
  a get property of the map)
 
  But i am affraid that when i do the last thing (it needs to be a 
  property of
  map) that wicket fails currently
  so i think i fall back to that that i will also look it up as a key
 if
  the
  property is not found.
 
  This will result in more mem en cpu usage.
  (i don't create any garbage currently)
 
  On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
  
   ognl can do map lookup with just a expression (that was the first 
   thing i had to do because that did go wrong
 when
  i
   started testing it)
   this was used: Ognl.getValue(string, anHashmap);
  
   so the need to do [sd] even with  juk why is that needed ...?
  
  
  
   On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
   
I'm not too sure about using dots for index/ map references. It 
differs from OGNL:
   
 
 http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/ind
 exing.html
 
 
.
And personally, I think it is usefull to be able to distinct
  single
from indexed properties just by looking at the 
 expression. Is it 
/that/ more expensive? I mean, optimizing is good, but we don't
  have
to over-do it.
   
Eelco
   
   
---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free 
Certification Exam for All Training Attendees Through End
 of
  2005
Visit http://www.jboss.com/services/certification for more
  information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
 
 
 __
  This email and any files transmitted with it are confidential and 
  intended solely for the use of the individual or entity to 
 whom they 
  are addressed. If you have received this email in error please
 notify
  the system manager.
 
  Katun Corporation -- www.katun.com http://www.katun.com
 
 _
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course Free 
  Certification Exam for All Training Attendees Through End of
 2005
  Visit http://www.jboss.com/services/certification for more
 information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 __
 This email and any files transmitted

Re: [Wicket-user] replace ognl.

2005-10-27 Thread Eelco Hillenius
It's all about choice of course. I agree with most proponents of
getting rid of OGNL: it's way too heavy for 95% (or more) of the usual
cases, and less dependencies == good. But, I think it would be really
good not only to keep alternatives in e.g. the extensions project, or
with a seperate project (for the sake of keeping the number of
dependencies needed for extensions small too), but also make sure our
compound property models can work with the different options there are
(you could write a Groovy implementation if you want to, and put it in
the groovy wicket-stuff project).

AbstractPropertyModel could work with something like a
propertyresolver/ delegate (one more indirection :)) for getting and
setting values based on a expression, and it might even be a good idea
to have the option of having the default delegate as a application
setting or something. Would be real easy to implement too.

Eelco


On 10/27/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
  and that is?

  Very similar to what you are proposing:
 http://groovy.codehaus.org/Collections

 and

 bean?.property  (allows bean to be null)
 (see http://groovy.codehaus.org/Migration+From+Classic+to+JSR+syntax )

 I really appreciate how OGNL is very flexible with allowing me to do
 things like concatenate two properties into one without having to write
 a new getter.  Having a groovy-based property model would give similar
 advantages.  And Groovy allows for compact iterating over collections
 like OGNL does (although I haven't had a need for it yet).  If you got
 rid of that kind of functionality altogether, I think Wicket would be
 poorer for it.

 My 2 cents worth,

 - Jonathan


  [EMAIL PROTECTED] 2005-10-27 1:23:03 PM 
 and that is?


 On 10/27/05, Jonathan Carlson [EMAIL PROTECTED] wrote:
 
  I'd prefer if it used a groovy-like syntax (or actual groovy behind
 the
  curtain) as much as possible.
 
 
   [EMAIL PROTECTED] 2005-10-27 11:15:05 AM 
  The only thing for me to use [] for an index and { } for a map (for
  example)
  would be that this:
 
  mymap.property would mean that you really want to have a getProperty
 on
  a
  map
  (same goes for list)
 
  so i will change it to use with [] (without quotes that i find
 totally
  not
  needed)
 
  foo.list[0].bar
  foo.map[key].bar
  foo.list.bar (this is a get property of the list)
  foo.map.bar (this is a get property of the map)
 
  But i am affraid that when i do the last thing (it needs to be a
  property of
  map) that wicket fails currently
  so i think i fall back to that that i will also look it up as a key
 if
  the
  property is not found.
 
  This will result in more mem en cpu usage.
  (i don't create any garbage currently)
 
  On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
  
   ognl can do map lookup with just a expression
   (that was the first thing i had to do because that did go wrong
 when
  i
   started testing it)
   this was used: Ognl.getValue(string, anHashmap);
  
   so the need to do [sd] even with  juk why is that needed ...?
  
  
  
   On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
   
I'm not too sure about using dots for index/ map references. It
differs from OGNL:
   
 
 http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html

 
.
And personally, I think it is usefull to be able to distinct
  single
from indexed properties just by looking at the expression. Is it
/that/ more expensive? I mean, optimizing is good, but we don't
  have
to over-do it.
   
Eelco
   
   
---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End
 of
  2005
Visit http://www.jboss.com/services/certification for more
  information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
 
 
 __
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error please
 notify
  the system manager.
 
  Katun Corporation -- www.katun.com http://www.katun.com
 
 _
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.
  Get Certified Today * Register for a JBoss Training Course
  Free Certification Exam for All Training Attendees Through End of
 2005
  Visit http://www.jboss.com/services/certification for more
 information
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 

Re: [Wicket-user] replace ognl.

2005-10-27 Thread Eelco Hillenius
Oh, and of course AbstractPropertyModel.ognlExpression should be
replaced by e.g. .expression or something similar.

Eelco


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Laurent PETIT
Hello all,

This is my very first post on this list. Glad to being able to
exchange ideas with you.

On 10/27/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
 Why not keep wicket simple? I really like the simplicity of the dot notation
 johan created. I think we should use [] only as a hint.

 By default wicket tries to find a getter and then checks if the object is a 
 list/set/map and
 contains the key.

Does Wicket also check for direct public property of the same name ?

I mean, this way, we can keep things simple as long as no extra logic
is done in the getter/setter  ( almost 95 to 99% of the time with GUI
Models ? ), but also later on add getters/setters at will, without
breaking anything ...

Same remark concerning maps vs beans.

If find it great if we don't know if the property is contained in the
Map or is a property of the Model.

Thus, a simple Map at the beginning of the project, whose properties
are accessed like
myObjectThatMayBeAMapOrBean.myPropertyName

can later on evolve to a plain JavaBean without breaking all the
String references to the properties :
myObjectThatMayBeAMapOrBean.myPropertyName

I can see that distinguishing maps/beans properties can be a performance hint:
obj[prop]
obj.prop

but for me it's a shame to sacrifice such power.

I can also see that adding [ ] can help identify a map.

In my opinion, obj[prop] and obj.prop should be the same operation
under the covers :
if the object is an instance of a Map:
   first try to interpret prop as a Map key
   second try to access prop via getter/setter
   third try to access prop as a public property of the object
if the object is not an instance of a Map:
first try to access prop via getter/setter
secon try to access prop as a public property of the object

My apologizes if such ideas have already been thrown by somebody.

My 0.02 EUROS :-)

--
Laurent Petit


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Laurent PETIT
Hello,

On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 AbstractPropertyModel could work with something like a
 propertyresolver/ delegate (one more indirection :)) for getting and
 setting values based on a expression, and it might even be a good idea
 to have the option of having the default delegate as a application
 setting or something. Would be real easy to implement too.

I like the idea of one more indirection :-) to allow more than a
single implementation.

But I can see a problem arise if you do so: having many
implementations that eventually will not share the same syntax for
accessing properties.

This could presumably be a risk for Components Reusability, if some
packaged components embark their own models and rely on a certain
syntax for specifying access to model properties ?


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Eelco Hillenius
Yeah, that's true. You're right. Maybe it isn't such a good idea then.

Eelco


On 10/27/05, Laurent PETIT [EMAIL PROTECTED] wrote:
 Hello,

 On 10/27/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  AbstractPropertyModel could work with something like a
  propertyresolver/ delegate (one more indirection :)) for getting and
  setting values based on a expression, and it might even be a good idea
  to have the option of having the default delegate as a application
  setting or something. Would be real easy to implement too.

 I like the idea of one more indirection :-) to allow more than a
 single implementation.

 But I can see a problem arise if you do so: having many
 implementations that eventually will not share the same syntax for
 accessing properties.

 This could presumably be a risk for Components Reusability, if some
 packaged components embark their own models and rely on a certain
 syntax for specifying access to model properties ?


 ---
 This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course
 Free Certification Exam for All Training Attendees Through End of 2005
 Visit http://www.jboss.com/services/certification for more information
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] replace ognl.

2005-10-26 Thread Igor Vaynberg



sounds awesome, great job Johan!
Im +1 for dropping ognl, you covered all my 
usecases.

-Igor


  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Johan 
  CompagnerSent: Wednesday, October 26, 2005 4:41 PMTo: 
  wicket-user@lists.sourceforge.netSubject: [Wicket-user] replace 
  ognl.
  Hi I have written a replacement of OGNL when i test it with 
  a very simple test (The FormInput example)then i see quite some 
  improvements in cpu speedups and mem improvementsAround 40% speed 
  increase for a submitting the forminput example page 20 timesand only 1/5 
  of the memory garbage is generated (50MB against 10MB)The question is 
  what do you guys use of ognl? Can i completely drop it or must i make it an 
  option sothat you can switch in youre application for all using ognl or 
  the homebrew wicket impl.Or make seperate classes (like 
  AbstractPropertyModel) but this is not really doable because then all the 
  sub classes must also be copied...(Like CompoundXX)What i do 
  support now is this:person.name 
  (plain properties)person.addresses.0.street (addresses is a list and i 
  take the first element)person.addresses.homeaddress.street (addresses is 
  map and i take the address with the key 'homeaddress' out of it)so 
  maps and list are seen and the next part of the _expression_ is then the key or 
  the index you can also put values in a mapor append/set to a 
  list:person.addresses.homeaddress = new 
  Address()person.addresses.10 = new Address()if the list size is 
  smaller then 10 then it will appends null to make it that 
  size.addresses can also be an Array but then it won't be able to 
  grow.Ofcourse the person.address.street will just be null if address 
  is null, no exception will be thrownif you try to set something on a null 
  object a exception is still thrown, Maybe we could make some null handlers for 
  that somehow that are easy useable.So can people live with this? Does 
  anybody uses something different of 
ognl?johan


Re: [Wicket-user] replace ognl.

2005-10-26 Thread Andrew Berman
I vote to get rid of OGNL too. I know that the Spring Framework
MVC uses its own home grown one as well and it has worked perfectly for
every use case I've ever had.

--AndrewOn 10/26/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
#: Johan Compagner changed the world a bit at a time by saying on10/27/2005 1:41 AM :#
 Hi I have written a replacement of OGNL when i test it with a very simple test (The FormInput example) then i see quite some improvements in cpu speedups and mem improvements
 Around 40% speed increase for a submitting the forminput example page 20 times and only 1/5 of the memory garbage is generated (50MB against 10MB)John this really makes me wonder, cause I know quite a few projects using ognl and never heard
complains about it. Have you noticed such complaints or is this completely new?Most probably the improvement may come from removing the _expression_ parser (as in the examples youhave presented such a parsing is not required), but still I am wondering if the parser should take
so long for simple _expression_ as those.sorry for wondering,./alex--.w( the_mindstorm )p. The question is what do you guys use of ognl? Can i completely drop it or must i make it an option so
 that you can switch in youre application for all using ognl or the homebrew wicket impl. Or make seperate classes (like AbstractPropertyModel) but this is not really doable because then all the
 sub classes must also be copied...(Like CompoundXX) What i do support now is this: person.name http://person.name
 (plain properties) person.addresses.0.street (addresses is a list and i take the first element) person.addresses.homeaddress.street (addresses is map and i take the address with the key 'homeaddress' out of it)
 so maps and list are seen and the next part of the _expression_ is then the key or the index you can also put values in a map or append/set to a list: person.addresses.homeaddress
 = new Address() person.addresses.10 = new Address() if the list size is smaller then 10 then it will appends null to make it that size. addresses can also be an Array but then it won't be able to grow.
 Ofcourse the person.address.street will just be null if address is null, no exception will be thrown if you try to set something on a null object a exception is still thrown, Maybe we could make some null handlers for that somehow that are easy
 useable. So can people live with this? Does anybody uses something different of ognl? johan---This SF.Net
 email is sponsored by the JBoss Inc.Get Certified Today * Register for a JBoss Training CourseFree Certification Exam for All Training Attendees Through End of 2005Visit 
http://www.jboss.com/services/certification for more information___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-26 Thread Alexandru Popescu

Please don't get the impression I haven't believed you; I was just wondering.

My opinion on this matter is according to make simple things easy, and complex 
things possible.
I am not aware of how this part is currently implemented, but I guess the best approach would be a 
value retrieval strategy defaulting to the new implementation, but also allow changing it with an 
ognl strategy.


my 2euroc

./alex
--
.w( the_mindstorm )p.

#: Johan Compagner changed the world a bit at a time by saying on  10/27/2005 
2:34 AM :#

It is the expression parser.
Thats why i ask it here. How many people are really using extreme things of
ognl
Because i think 99% is just using the basic what i have implemented now.

I tested it all in YourKit. and when i just submit the FormInput example of
us 20 times
(with some different data and some times errors)
i see those results.
It is all comes from Ognl.parsExpression() and its call to
ognl.JavaCharStream, all the time and all the garbage is comming from that
area.

And if 20 times submitting a form really kost 40MB (extra) of garbage then i
really don't want to know what
it cost when 200 persons are working at the same time on my application...

I think ognl is just to much for what we want.

i attached 2 screen dumps of yourkit.
1 cpu: you see that doPost/doGet (is the same for wicket app) does take 59%
of total runtime time but 58% of the total time is spend in Ognl! thats onle
1% that does something else.
2 mem: you see the dump of the singleselectchoice. One of the components of
forminput and only that component generated 2MB of garbage in the Ognl part

johan


On 10/27/05, Alexandru Popescu [EMAIL PROTECTED] wrote:


#: Johan Compagner changed the world a bit at a time by saying on
10/27/2005 1:41 AM :#
 Hi

 I have written a replacement of OGNL when i test it with a very simple
test
 (The FormInput example)
 then i see quite some improvements in cpu speedups and mem improvements

 Around 40% speed increase for a submitting the forminput example page 20
 times
 and only 1/5 of the memory garbage is generated (50MB against 10MB)


John this really makes me wonder, cause I know quite a few projects using
ognl and never heard
complains about it. Have you noticed such complaints or is this completely
new?

Most probably the improvement may come from removing the expression parser
(as in the examples you
have presented such a parsing is not required), but still I am wondering
if the parser should take
so long for simple expression as those.

sorry for wondering,

./alex
--
.w( the_mindstorm )p.

 The question is what do you guys use of ognl? Can i completely drop it
or
 must i make it an option so
 that you can switch in youre application for all using ognl or the
homebrew
 wicket impl.
 Or make seperate classes (like AbstractPropertyModel) but this is not
really
 doable because then all the
 sub classes must also be copied...(Like CompoundXX)

 What i do support now is this:

 person.name http://person.name http://person.name (plain properties)
 person.addresses.0.street (addresses is a list and i take the first
element)
 person.addresses.homeaddress.street (addresses is map and i take the
address
 with the key 'homeaddress' out of it)

 so maps and list are seen and the next part of the expression is then
the
 key or the index you can also put values in a map
 or append/set to a list:

 person.addresses.homeaddress = new Address()
 person.addresses.10 = new Address()

 if the list size is smaller then 10 then it will appends null to make it
 that size.

 addresses can also be an Array but then it won't be able to grow.

 Ofcourse the person.address.street will just be null if address is null,
no
 exception will be thrown
 if you try to set something on a null object a exception is still
thrown,
 Maybe we could make some null handlers for that somehow that are easy
 useable.

 So can people live with this? Does anybody uses something different of
ognl?

 johan




---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] replace ognl.

2005-10-26 Thread Igor Vaynberg
Im against introducing yet another strategy into this. We already provide
IModel interface which is easy to implement. If someone wants to use ognl
instead of the wicket's default they are more then welcome to roll their own
impementation of IModel. Maybe we can rename/save our current ognl
implementations and offer them as alternatives in the wicket-extensions
project.


-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Alexandru Popescu
 Sent: Wednesday, October 26, 2005 6:49 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] replace ognl.
 
 Please don't get the impression I haven't believed you; I was 
 just wondering.
 
 My opinion on this matter is according to make simple things 
 easy, and complex things possible.
 I am not aware of how this part is currently implemented, but 
 I guess the best approach would be a value retrieval strategy 
 defaulting to the new implementation, but also allow changing 
 it with an ognl strategy.
 
 my 2euroc
 
 ./alex
 --
 .w( the_mindstorm )p.
 
 #: Johan Compagner changed the world a bit at a time by 
 saying on  10/27/2005 2:34 AM :#
  It is the expression parser.
  Thats why i ask it here. How many people are really using extreme 
  things of ognl Because i think 99% is just using the basic 
 what i have 
  implemented now.
  
  I tested it all in YourKit. and when i just submit the FormInput 
  example of us 20 times (with some different data and some times 
  errors) i see those results.
  It is all comes from Ognl.parsExpression() and its call to 
  ognl.JavaCharStream, all the time and all the garbage is 
 comming from 
  that area.
  
  And if 20 times submitting a form really kost 40MB (extra) 
 of garbage 
  then i really don't want to know what it cost when 200 persons are 
  working at the same time on my application...
  
  I think ognl is just to much for what we want.
  
  i attached 2 screen dumps of yourkit.
  1 cpu: you see that doPost/doGet (is the same for wicket app) does 
  1 take 59%
  of total runtime time but 58% of the total time is spend in Ognl! 
  thats onle 1% that does something else.
  2 mem: you see the dump of the singleselectchoice. One of the 
  2 components of
  forminput and only that component generated 2MB of garbage 
 in the Ognl 
  part
  
  johan
  
  
  On 10/27/05, Alexandru Popescu 
 [EMAIL PROTECTED] wrote:
 
  #: Johan Compagner changed the world a bit at a time by saying on
  10/27/2005 1:41 AM :#
   Hi
  
   I have written a replacement of OGNL when i test it with a very 
   simple
  test
   (The FormInput example)
   then i see quite some improvements in cpu speedups and mem 
   improvements
  
   Around 40% speed increase for a submitting the forminput example 
   page 20 times and only 1/5 of the memory garbage is 
 generated (50MB 
   against 10MB)
  
 
  John this really makes me wonder, cause I know quite a few 
 projects 
  using ognl and never heard complains about it. Have you 
 noticed such 
  complaints or is this completely new?
 
  Most probably the improvement may come from removing the 
 expression 
  parser (as in the examples you have presented such a 
 parsing is not 
  required), but still I am wondering if the parser should 
 take so long 
  for simple expression as those.
 
  sorry for wondering,
 
  ./alex
  --
  .w( the_mindstorm )p.
 
   The question is what do you guys use of ognl? Can i 
 completely drop 
   it
  or
   must i make it an option so
   that you can switch in youre application for all using 
 ognl or the
  homebrew
   wicket impl.
   Or make seperate classes (like AbstractPropertyModel) 
 but this is 
   not
  really
   doable because then all the
   sub classes must also be copied...(Like CompoundXX)
  
   What i do support now is this:
  
   person.name http://person.name http://person.name (plain 
   properties) person.addresses.0.street (addresses is a list and i 
   take the first
  element)
   person.addresses.homeaddress.street (addresses is map and i take 
   the
  address
   with the key 'homeaddress' out of it)
  
   so maps and list are seen and the next part of the expression is 
   then
  the
   key or the index you can also put values in a map or 
 append/set to 
   a list:
  
   person.addresses.homeaddress = new Address() 
 person.addresses.10 = 
   new Address()
  
   if the list size is smaller then 10 then it will appends null to 
   make it that size.
  
   addresses can also be an Array but then it won't be able to grow.
  
   Ofcourse the person.address.street will just be null if 
 address is 
   null,
  no
   exception will be thrown
   if you try to set something on a null object a exception is still
  thrown,
   Maybe we could make some null handlers for that somehow that are 
   easy useable.
  
   So can people live with this? Does anybody uses 
 something different 
   of
  ognl?
  
   johan
  
 
 
 
  ---
  This SF.Net

Re: [Wicket-user] replace ognl.

2005-10-26 Thread Ingram Chen
+1

but... I believe that introduceing new syntax of _expression_ language make Wicket 
hard to learn, especially for those developers with JSP/JSTL background (most of us !)
It's better if we can reuse EL (_expression_ language) syntax, a J2EE standard, for new 
implmentation.

On 10/27/05, Johan Compagner [EMAIL PROTECTED] wrote:
Hi 

I have written a replacement of OGNL when i test it with a very simple test (The FormInput example)
then i see quite some improvements in cpu speedups and mem improvements

Around 40% speed increase for a submitting the forminput example page 20 times
and only 1/5 of the memory garbage is generated (50MB against 10MB)

The question is what do you guys use of ognl? Can i completely drop it or must i make it an option so
that you can switch in youre application for all using ognl or the homebrew wicket impl.
Or make seperate classes (like AbstractPropertyModel) but this is not really doable because then all the 
sub classes must also be copied...(Like CompoundXX)

What i do support now is this:

person.name (plain properties)
person.addresses.0.street (addresses is a list and i take the first element)
person.addresses.homeaddress.street (addresses is map and i take the address with the key 'homeaddress' out of it)

so maps and list are seen and the next part of the _expression_ is then the key or the index you can also put values in a map
or append/set to a list:

person.addresses.homeaddress = new Address()
person.addresses.10 = new Address()

if the list size is smaller then 10 then it will appends null to make it that size.

addresses can also be an Array but then it won't be able to grow.

Ofcourse the person.address.street will just be null if address is null, no exception will be thrown
if you try to set something on a null object a exception is still
thrown, Maybe we could make some null handlers for that somehow that
are easy useable.

So can people live with this? Does anybody uses something different of ognl?

johan


-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] replace ognl.

2005-10-26 Thread Martijn Dashorst
+1 on moving OGNL into extensions.

I think the OGNL thing is good, it provides a nice base
implementation. I'd like to see the current implementation still being
available for those 1% that need the full OGNL expression evaluator
(though I think I share the same sentiment Phil voiced).

Do we also support things like

person.getChildren().get(0).getName()?

Martijn


On 10/27/05, Phil Kulak [EMAIL PROTECTED] wrote:
 I'm very +1 on this. OGNL has turned into it's own scripting language
 over the years. If you want to use any of those features, then you're
 missing the point of Wicket.


 ---
 This SF.Net email is sponsored by the JBoss Inc.
 Get Certified Today * Register for a JBoss Training Course
 Free Certification Exam for All Training Attendees Through End of 2005
 Visit http://www.jboss.com/services/certification for more information
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user