Hi all,

I'm a newbie at Tapestry and I'm reading Kent's book trying to get Tapestry
to work with AJAX.

In one of his examples, he has a customerCRUD.java class with the following
annotation:
@InjectComponent("customersLoop")
    public abstract ForBean getRow();
    
    public String getRowClientId() {
        return getRow().getClientId();
    }

This method will return the HTML id for the current <tr> element generated
from a For loop component.

I am having issues getting this to work with my current project and I want
to move annotation specification to page file specification.  What is the
equivalent page specification syntax for the above?


>From Tapestry's annotation reference:
The  InjectComponent  annotation allows nested components to be injected as
read-only properties. It is attached to an accessor method:

  @InjectComponent("inputUserName")
  public abstract TextField getUserInput();

This is functionally the same as providing the property attribute of the
<component> element. 


So I tried the following:
<component id="customersLoop" type="For" property="row">
        <binding name="source" value="customerEntries"/>
        <binding name="value" value="customerEntry"/>
        <binding name="index" value="idx"/>
    </component>

<property name="rowClientId" initial-value="row.clientId"/>
    
THEN

<bean name="rowClientId" class="java.util.String" property="row.clientId"/>

and other variations without any luck.

What am I doing wrong?  TIA!

-- 
View this message in context: 
http://www.nabble.com/-T4--Help-converting-InjectComponent-annotation-to-page-specification-tf4940334.html#a14142129
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to