Really need some code to see exactly what you're doing wrong here.
Wicket uses models to bind your view components to your actual data.
Assuming you're using a ListView, you'll need something like:
IModel model = new AbstractReadOnlyModel() {
public Object getObject() {
// Database query here, e.g:
List<Product> products = productDao.findByStatus(Status.LIVE);
return products;
}
};
add(new ListView("foo", model) {
void populateItem(ListItem item) {
Product product = (Product)item.getModelObject();
item.add(new Label("name", product.getName()));
}
});
This model lets you pull stuff on-demand out of your database every time the
page is rendered. The ListView by default will recreate its entire set of
items every page render. You can change this behaviour with
#setReuseItems(true), but you probably don't want to for this. ;-)
Make sense?
Regards,
Al
On Tue, Apr 1, 2008 at 9:39 PM, Andrew Broderick <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm sure this is a basic newbie lack of knowledge showing here, but when I
> save some data to my DB from my wicket page (adding an object), my master
> (list) page is not updated. Okay, I thought, maybe I just need to modify the
> model at the same time as saving it. So I did that, and the new row still
> does not appear. How do I tell Wicket to do a "deep" refresh of the page,
> and not just redisplay the existing contents?
>
> Thanks
>
> _______________________________________________________
>
> The information in this email or in any file attached
> hereto is intended only for the personal and confiden-
> tial use of the individual or entity to which it is
> addressed and may contain information that is propri-
> etary and confidential. If you are not the intended
> recipient of this message you are hereby notified that
> any review, dissemination, distribution or copying of
> this message is strictly prohibited. This communica-
> tion is for information purposes only and should not
> be regarded as an offer to sell or as a solicitation
> of an offer to buy any financial product. Email trans-
> mission cannot be guaranteed to be secure or error-
> free. P6070214
>