Hi, I have created a simple that submits and ajax renders a form. This fails with two causes. First my code
<fieldset class="search-area"> ` <t:form t:id="searchTransactionsForm" t:zone="searchTransactionZone"> <input t:type="textField" class="recipent-id" t:id="recipientId" /> <input t:type="textField" class="recipent-name" t:id="recipientName" /> <input t:type="textField" class="recipent-amount" t:id="recipientAmount" /> <input type="submit" value="Search" class="search-btn" /> </t:form> </fieldset> <t:zone t:id="searchTransactionZone" id="searchTransactionZone"> <div class="tableDv"> <t:grid t:source="transactions" t:row="transaction" t:model="transactionGridModel" t:pagerPosition="top"> <p:actionCell> View <#> </p:actionCell> </t:grid> </div> </t:zone> Here is my backing java class public class Teller { @Property @Persist private String recipientId; @Property @Persist private String recipientName; @Property @Persist private String recipientAmount; @InjectComponent Zone searchTransactionZone; @Inject private Request request; @Persist @Property private ArrayList<Transactions> transactions; @Property private Transactions transaction; @Property private BeanModel<Transactions> transactionGridModel; @Inject private BeanModelSource beanModelSource; @Inject private Messages messages; void setupRender() { transactionGridModel = beanModelSource.createDisplayModel(Transactions.class, messages); transactionGridModel.add("action", null); transactionGridModel.include("dateOfTransactions","sendersName" ,"sendersStateCountry", "action"); transactionGridModel.get("dateOfTransactions").label("Date Of Transaction"); transactionGridModel.get("sendersName").label("Sender's name"); transactionGridModel.get("sendersStateCountry").label("Sender's state/country"); transactions=new ArrayList<Transactions>(); } @Log public Object onSubmitFromSearchTransactionsForm() { transactions=new ArrayList<Transactions>(); for(int i=0;i<10;i++) { Transactions a=new Transactions(); transactions.add(a); } return request.isXHR()?searchTransactionZone.getBody():null; } } and my POJO class public class Transactions { private String dateOfTransactions; private String transactionId; private String recipientName; private String recipientPhoneNumber; private String sendersName; private String sendersStateCountry; public Transactions() { } public String getDateOfTransactions() { return dateOfTransactions; } public void setDateOfTransactions(String dateOfTransactions) { this.dateOfTransactions = dateOfTransactions; } public String getTransactionId() { return transactionId; } public void setTransactionId(String transactionId) { this.transactionId = transactionId; } public String getRecipientName() { return recipientName; } public void setRecipientName(String recipientName) { this.recipientName = recipientName; } public String getRecipientPhoneNumber() { return recipientPhoneNumber; } public void setRecipientPhoneNumber(String recipientPhoneNumber) { this.recipientPhoneNumber = recipientPhoneNumber; } public String getSendersName() { return sendersName; } public void setSendersName(String sendersName) { this.sendersName = sendersName; } public String getSendersStateCountry() { return sendersStateCountry; } public void setSendersStateCountry(String sendersStateCountry) { this.sendersStateCountry = sendersStateCountry; } } Now if i do not include the t:model="transactionGridModel" and remove the code from the render portion, the grid gets displayed. However if i place in pagination then clicking the second page the grid data disappears. If i refresh the page, the data is displayed again. What am i doing wrong ? Kind Regards -- View this message in context: http://tapestry.1045711.n5.nabble.com/Grid-Ajax-Failiure-with-Pagination-tp5717651.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org