Couldn't this simply be achieved by implementing a property method on your page/components that does the property path traversal?  If I'm understanding your problem, that is the way we solve it - all our pages/components inherit from a common page/component that has does aaa.bbb.ccc path traversal - eg. public SomeObject getCcc() { return this.getAaa().getBbb().getCcc(); }.  Then refactoring just involves changing that method implementation in your page/component superclass.
 
Couldn't ${application}, and ${visit} be achieved in a similar (and simpler) way by adding such properties to either your page/component superclass, or if they are generally useful they could be added to BasePage/BaseComponent?
 
Richard
----- Original Message -----
Sent: Thursday, June 20, 2002 11:08 PM
Subject: [Tapestry-developer] suggestion: property-path substitution

Here's an idea I'd like to bounce off Howard and the group. If there's a postive consensus I'll add a feature request.
 
I'm building a really big app, will probably have 50+ pages and more components. When entering property paths,
my strings mostly start with 'aaa.bbb.ccc" (in some cases its 'aaa.bbb.ccc.ddd'). It has become a bit of a pain as
I need to enter them many times per component.
Maybe I'm a bit numb fingered but there are occasional spelling/paste errors on my part that cause some uneeded grief.
 
I'd like to see the ability to define an application property like ${prepend} = 'aaa.bbb.ccc'
 
and then make my property-paths look like this; '${prepend}.x', '${prepend}.y'
It has been the case where I've refactored my design and had to go back and change a bunch of property paths one by one.
a facility like the one I've suggested would save me scads of time.
 
Whether the idea could be extended to include a hierachy for looking up the substition (component then page then app) is beyond my needs but feel free to comment.
 
While I'm at it why not have a few predefined substitutions:
 
${application} get read access to the app spec
${visit} get the visit from the engine
etc.
 
Any thoughts?
 
Is this fodder for the wiki?
 
Geoff
 
Geoffrey Longman
Intelligent Works Inc.
 
 

Reply via email to