Re: Default Ordering for BeanEditForm

2011-02-21 Thread Josh Canfield
http://download.oracle.com/javase/6/docs/api/java/lang/Class.html#getDeclaredMethods() The elements in the array returned are not sorted and are not in any particular order. Java's reflection mechanism doesn't guarantee the order of methods returned so it would be hard for Tapestry to do much

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Howard Lewis Ship
Acutally, Tapestry 5.2 uses Javassist to get at attribute information for the methods, including the line numbers where available. However, I'm honestly not sure what happens in a transformed component class. Certainly, if the @Property annotation is used, there is no line number information to be

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Josh Canfield
Acutally, Tapestry 5.2 uses Javassist to get at attribute information for the methods, including the line numbers where available. The getMethods in CtClass is not documented as being ordered, so I peeked at the code and unless I'm looking at the wrong spot it comes from an un-ordered HashMap.

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Mark
This wasn't using the @Property annotations. I was using getters and setters. The ordering isn't working when using a bean that is injected either. I'm not sure if this is a bug or if it is just something where it is impossible to get the information for ordering. Mark On Mon, Feb 21, 2011 at

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Mark
Josh, But it is documented--at least for normal beans. The notes section paragraph of the BeanEditForm documentation discusses the reorder parameter and then says: You can accomplish the same thing by changing the order of the getter methods in the bean class. The default order for properties

Re: Default Ordering for BeanEditForm

2011-02-20 Thread Ulrich Stärk
Use BeanEditForms reorder property. The argument is a comma-separated list of property names that will be displayed in the given order. Omitted properties will be appended automatically to this list, in alphabetical order. Uli On 19.02.2011 23:33, Mark wrote: I have a configuration page that

Re: Default Ordering for BeanEditForm

2011-02-20 Thread Mark
On Sun, Feb 20, 2011 at 5:32 AM, Ulrich Stärk u...@spielviel.de wrote: Use BeanEditForms reorder property. The argument is a comma-separated list of property names that will be displayed in the given order. Omitted properties will be appended automatically to this list, in alphabetical

Re: Default Ordering for BeanEditForm

2011-02-20 Thread Ulrich Stärk
I'm just guessing, but Tapestry might reorder accessor methods alphabetically when enhancing the page class. Uli On 20.02.2011 15:38, Mark wrote: On Sun, Feb 20, 2011 at 5:32 AM, Ulrich Stärk u...@spielviel.de wrote: Use BeanEditForms reorder property. The argument is a comma-separated list

Re: Default Ordering for BeanEditForm

2011-02-20 Thread Mark
On Sun, Feb 20, 2011 at 9:33 AM, Ulrich Stärk u...@spielviel.de wrote: I'm just guessing, but Tapestry might reorder accessor methods alphabetically when enhancing the page class. Hm. I'm also seeing this behavior on Java Beans now if they implement an interface and are Injected into the

Default Ordering for BeanEditForm

2011-02-19 Thread Mark
I have a configuration page that I want to edit using a BeanEditForm. I have created getter/setter methods on the page itself and I'm creating the BeanEditForm using: t:beaneditform object=this/ This works, but the properties are not listed in the order of the getters. Instead they are in