You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andrew Broderick <ab...@peak6u.com> on 2008/04/01 22:39:29 UTC
refreshing page
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
Re: refreshing page
Posted by Scott Swank <sc...@gmail.com>.
My guess is that you are using a static model like "new
Model(someDomainObject)" when you need to use a dynamic model. See:
http://cwiki.apache.org/WICKET/working-with-wicket-models.html
- Scott
On Tue, Apr 1, 2008 at 2:25 PM, Andrew Broderick <ab...@peak6u.com> wrote:
> All I want to know is how you tell a page that its data is dirty and it should reload.
>
> Thanks
>
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Tuesday, April 01, 2008 3:49 PM
> To: users@wicket.apache.org
> Subject: Re: refreshing page
>
> It really does not hurt to google before asking you know :(
> http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html
>
> Maurice
>
> On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <ab...@peak6u.com> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: refreshing page
Posted by Igor Vaynberg <ig...@gmail.com>.
in soviet wicket the page calls you!
yes, read the models link given to you below.
-igor
On Tue, Apr 1, 2008 at 2:25 PM, Andrew Broderick <ab...@peak6u.com> wrote:
> All I want to know is how you tell a page that its data is dirty and it should reload.
>
> Thanks
>
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Tuesday, April 01, 2008 3:49 PM
> To: users@wicket.apache.org
> Subject: Re: refreshing page
>
> It really does not hurt to google before asking you know :(
> http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html
>
> Maurice
>
> On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <ab...@peak6u.com> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: refreshing page
Posted by Andrew Broderick <ab...@peak6u.com>.
All I want to know is how you tell a page that its data is dirty and it should reload.
Thanks
-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Tuesday, April 01, 2008 3:49 PM
To: users@wicket.apache.org
Subject: Re: refreshing page
It really does not hurt to google before asking you know :(
http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html
Maurice
On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <ab...@peak6u.com> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: refreshing page
Posted by Maurice Marrink <ma...@gmail.com>.
It really does not hurt to google before asking you know :(
http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html
Maurice
On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <ab...@peak6u.com> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: refreshing page
Posted by Al Maw <wi...@almaw.com>.
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 <ab...@peak6u.com>
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
>