Hi As Thiago always says, "Never never never initialize an instance variable in its declaration in case of a page/component/mixin"
use setupRender phase (@SetupRender) for initializing instance variables in case of a components/mixins and onActivate()(@OnEvent(EventConstants.ACTIVATE) in case of pages On Jan 15, 2012, at 5:00 PM, csckid wrote: > I have a table > <table id="prescriptionTable" t:type="grid" > t:source="prescriptionAddedToGrid" t:row="prescription"..> > I am populating the table from the java file > @Property > private ArrayList<Prescription> prescriptionResult = new ArrayList(); > Never do it void onActivate(){ prescriptionResult = new ArrayList<Prescription>(); } > public ArrayList<Prescription> getPrescriptionAddedToGrid() { > return *prescriptionResult*; > } > > void onSuccessFromAddToGrid() { > Medicine medicineTemp = new Medicine(); > medicineTemp.setName(medicineNameTf); > medicine = medicineDao.searchMedicine(medicineTemp); > > Prescription prescriptionTemp = new Prescription(); > prescriptionTemp.setMedicine(medicine); > prescriptionTemp.setDosage(prescription.getDosage()); > > *prescriptionResult*.add(prescriptionTemp); > > } > > > The problem is, I populated the table using a browser. Then I open another > browser and found that the same table result is shown. When I open the same > page in a different browser the table should be empty. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/remove-cache-tp5146267p5146267.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 > regards Taha --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org