You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ke Deng <la...@yahoo.com> on 2005/10/21 03:38:39 UTC
Could not find a strategy instance for class
Hi,all:
I'm a new comer for tapestry.I want to use "For" component to repeat the same contents,but i got "Could not find a strategy instance for class com.laniqi.crm.pages.FieldInfo". I don't know what the reason is.The following is my code fragment.
HTML Template file:
...
<tr jwcid="@For" source="ognl:crm.customers" value="ognl:crm.info" element="tr">
<td><span jwcid="@Insert" value="ognl:crm.info.name" /></td>
</tr>
...
Page data File:
public class CrmConfigurator
{
public CrmConfigurator(){
FieldInfo inf = new FieldInfo();
inf.setName("DK");
customers.add(inf);
}
private FieldInfo info = new FieldInfo();
public FieldInfo getInfo() {
return info;
}
public void setInfo(FieldInfo info) {
this.info = info;
}
private List customers = new ArrayList(); // it is used to contain FieldInfo object.
public List getCustomers(){
return customers;
}
}
Page Java File:
public abstract CrmConfigurator getCrm();
public abstract void setCrm(CrmConfigurator crm);
public void pageBeginRender(PageEvent event)
{
CrmConfigurator crm = new CrmConfigurator();
setCrm(crm);
}
Thanks and Regards,
Karl.
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.