Ron,

From my page specification (shown in the email trail) would Tapestry define a public getter, called getDescriptor, for the property 'descriptor' or do I also need to define an abstract getter

cheers
</jima>



Ron Piterman wrote:
Using tapestry 4.0, you can either use <property ...> in your .page/.jwc or add to your page/component class an abstract getter, or use both.
This is also how you access the property value:

add

public abstract String getDescriptor();

to your component/page class, and access the value throuw that method.





ציטוט Jim Alateras:

After further investigation it seems to be a problem with my JXPathBinding class. I seem to be making an assumption about properties declared in a page and where they are stored.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
<page-specification class="org.openvpms.app.tapestry.pages.Home">
  <inject property="archetypeService" object="spring:archetypeService"/>
  <property name="descriptor"/>
  <property name="archetypeDescriptors" />
</page-specification>


Tapestry creates a new class called $Home_0, which includes the properties defined in the page-specification in addition to some other stuff as shown below


My question is how do I access fields such as _$descriptor from the *root* object.

this= JXPathBinding  (id=175)
    _description= "template parameter source"
    _location= LocationImpl  (id=246)
    _valueConverter= $ValueConverter_106e316a8d8  (id=249)
    contextObjectName= "archetypeService"
    path= "archetypeDescriptors"
    root= $Home_0  (id=186)
        _$actService= null
        _$actService$defaultValue= null
        _$archetypeDescriptors= null
        _$archetypeDescriptors$default= null
        _$archetypeService= ArchetypeService  (id=278)
_$componentMessagesSource= $ComponentMessagesSource_106e316a910 (id=281)
        _$descriptor= null
        _$descriptor$default= null
        _$entityService= null
        _$entityService$defaultValue= null
        _$lookupService= null
        _$lookupService$defaultValue= null
        _$messages= null
        _$specification= ComponentSpecification  (id=284)
        _active= true
        _assets= null
        _beans= null
        _bindings= null
        _body= null
        _bodyCount= 0
        _changeObserver= PageRecorderImpl  (id=290)
        _components= HashMap<K,V>  (id=294)
        _containedComponent= null
        _container= null
        _engine= OpenVpmsEngine  (id=196)
        _id= null
        _idPath= null
        _listenerList= EventListenerList  (id=301)
        _listeners= null
        _locale= Locale  (id=303)
        _location= LocationImpl  (id=305)
        _namespace= Namespace  (id=306)
        _outer= IRender[5]  (id=310)
        _outerCount= 1
        _outputEncoding= null
        _page= $Home_0  (id=186)
        _pageName= "Home"
        _rendering= true
        _requestCycle= RequestCycle  (id=188)
        _visit= null
        delegate= null
        errorMessage= null
        message= null

cheers
</jima>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to