Re: bookmarkable link keep recreate the objects.

2008-01-23 Thread dvd
I guess I need to read more docs and codes to understand so never mind. On Jan 22, 2008 7:09 PM, [EMAIL PROTECTED] wrote: The point is the model should be first absorbed/consumed by listview, and later provided to listitem. according to whom is this the point? -igor

Re: bookmarkable link keep recreate the objects.

2008-01-22 Thread Johan Compagner
If you use a normal bookmarkable page (redirect) yes this will happen But if you use a statefull page that does a redirect then if you do a refresh you get that page back. Also you still can have a bookmarkble page/link that also results in the page to be reused, use the:

Re: bookmarkable link keep recreate the objects.

2008-01-22 Thread Igor Vaynberg
On Jan 22, 2008 7:09 PM, [EMAIL PROTECTED] wrote: The point is the model should be first absorbed/consumed by listview, and later provided to listitem. according to whom is this the point? -igor - To unsubscribe, e-mail:

bookmarkable link keep recreate the objects.

2008-01-21 Thread dvd
Hi:  On a Home page menu bar, I put a FAQ link add(new Bookmarkablelinl(id,FAQ.class)    it is not an external static html file link since it would includes a few other bookmarkable links/buttons.  It is content does not change, but in the same session, say every second, when I click on the

RE: bookmarkable link keep recreate the objects.

2008-01-21 Thread dvd
To simpplify the issue, Consider the following Home.html html span wicket:id=text//html Home.java add(new Label(text, StaticText) Everytime the home page is accessed, Home.java is created anew and so is the text label even though the content should remain the same through the session. How can I

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread Eelco Hillenius
This is obviouly a huge performance issue. I wonder if it is. Java is optimized for creating objects, and creating new ones is often cheaper than reusing old ones if you take synchronization and lookups into account. Are you sure it is a bottleneck? If you haven't seen any actual performance

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread Ned Collyer
associated with it. Anyway, I've got a limited workaround. It seems like a commonly used concept. -- View this message in context: http://www.nabble.com/bookmarkable-link--keep-recreate-the-objects.-tp14997853p15009613.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread dvd
Thanks. I looked that source of the staticpages examples and even more troubled with it. It generates each static links via a costly markup object creation and attribute modification. In a base template page that may contain,say 50 such links, that would be displayed for all site (bookmarkable)

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread Igor Vaynberg
On Jan 21, 2008 4:31 PM, [EMAIL PROTECTED] wrote: Thanks. I looked that source of the staticpages examples and even more troubled with it. It generates each static links via a costly markup object creation and attribute modification. In a base template page that may contain,say 50 such

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread dvd
Would it be possible to turn a bookmarkale/stateless page object into a stateful page during a session once user first access it. these pages are not created until accessed...so not sure what you mean I meant once they are created, accessing it again (say hit refresh button on browser)

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread Igor Vaynberg
you are free to write your own coding strategy that checks for existence of these pages in session before creating a new instance. -igor On Jan 21, 2008 6:01 PM, [EMAIL PROTECTED] wrote: Would it be possible to turn a bookmarkale/stateless page object into a stateful page during a session

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread dvd
I see. I guess I need to dig through more info on usage of api. But I just noticed the following perhaps you can point out surprising (to me) issue right away. It is a simple list view display with class Test{ PageableListView listView = new PageableListView(records, new PropertyModel(this,

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread Igor Vaynberg
wicket is doing exactly what you told it to do you call final Object record = listItem.getModelObject(); 1000 times which in turns calls listviewmodel.getobject().get(index); where index varies from 1 to 1000 listviewmodel is PropertyModel(this, records) so when its getobject() is called (1000

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread Eelco Hillenius
On Jan 21, 2008 6:32 PM, [EMAIL PROTECTED] wrote: I see. I guess I need to dig through more info on usage of api. But I just noticed the following perhaps you can point out surprising (to me) issue right away. It is a simple list view display with class Test{ PageableListView listView =

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread dvd
Got it. On Jan 21, 2008 6:32 PM, [EMAIL PROTECTED] wrote: I see. I guess I need to dig through more info on usage of api. But I just noticed the following perhaps you can point out surprising (to me) issue right away. It is a simple list view display with class Test{ PageableListView

Re: bookmarkable link keep recreate the objects.

2008-01-21 Thread dvd
Thanks for the tip. It worked perfectly. I do feel this could be a minor bug even for a fixed list (might not be noticeable visually). At the time ListView is created, it is provided with a predefined model object =this.getRecords() which should be the state of the listview and this.getModel