Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Eelco Hillenius
Why would want to cache the result? Look, you have to make a decission. Are you interested in paging lists or not? If you are, you should do a count query to determine how many rows there are, and then just load the page of results you need with another one. If you don't want to use paging, but

Re: [Wicket-user] ?Contract for Iterator IDataProvider.iterator(int first, int count) ???

2007-06-11 Thread Eelco Hillenius
On 6/10/07, Eelco Hillenius [EMAIL PROTECTED] wrote: if calling paging 1,2,3 n each time requires a call to iterator(first, count) and size(), which means a call to db, wouldn't this way, it ll give a bottleneck at the database layer? Imagine there are about concurrent 5000 users

Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Lec
you can only do onDetach on the AbstractDetachableReadOnlyModel, but you can't do it in IDataProvider if you are to cache the result. Even if you nullify the object in onDetach, the result list still appear in IDataProvider. How to nullify the result in IDataProvider? Jeremy Thomerson-2 wrote:

Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Eelco Hillenius
you can only do onDetach on the AbstractDetachableReadOnlyModel, but you can't do it in IDataProvider if you are to cache the result. In Wicket 1.3 you can. Eelco - This SF.net email is sponsored by DB2 Express Download

Re: [Wicket-user] ?Contract for Iterator IDataProvider.iterator(int first, int count) ???

2007-06-11 Thread Igor Vaynberg
in my experience this wont cause a problem. any reasonable db keeps a count of the total rows in any given table. the size() query is most likely select count(*) from foo, which will use that stored count. and even if there is something more dynamic to it, the db will most likely put that

Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Igor Vaynberg
i believe even in 1.2.6 you can mix in idetachable. in 1.3 idataprovider extends it directly. -igor On 6/10/07, Eelco Hillenius [EMAIL PROTECTED] wrote: you can only do onDetach on the AbstractDetachableReadOnlyModel, but you can't do it in IDataProvider if you are to cache the result. In

Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Lec
Eelco, What i mean is that, you don't necessary have to cache the result just do the paging lists. you can directly call the db to query the page just like that... void iterator( int first, int count) { db.getPage( parameter, first, count ).iterator(); } int size() {

Re: [Wicket-user] turning off markup validation

2007-06-11 Thread Vit Rozkovec
Thank you, thank you. I missed that setEscapeModelStrings(), it works now like a charm now. My boss will be happy :) Kent Tong wrote: wicket at rozkovec.info writes: Those parts are important: !--[if IE 7]!--/a!--![endif]-- !--[if lte IE 6]/td/tr/table/a![endif]-- the markup which

Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Johan Karlberg
If it's only the repeated execution of a count projection that bothers you, what Eelco suggest is likely not caching the data returned by the iterator, it's caching the long returned by size(). It will decrease the accuracy of the pager in favor of performance, and will not contribute to

Re: [Wicket-user] wicket did not make the grade.

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
I think theres lots(Eelco usually being the friendliest), however considering the subject of this thread. I think most will be inclined to be not so friendly. - Kick a guy in his ass and then asking to borrow a coin won't get you any.. regards Nino A_flj_ wrote: Thanks, I'm just downloading

Re: [Wicket-user] wicket did not make the grade.

2007-06-11 Thread Florian Hehlen
Hi all, I have been on holiday for a while... and I am very much surprised to see this thread still going! Eelco Hillenius wrote: previous post. After all, as far as I could notice, he's the only one who didn't make fun of this thread's initiator in his first response. You know how it

Re: [Wicket-user] ?Contract for IteratorIDataProvider.iterator(int first, int count) ???

2007-06-11 Thread Roger Hand
any reasonable db keeps a count of the total rows in any given table. the size() query is most likely select count(*) from foo Then I guess Postgres (up until version 8.0 anyway) is not a reasonable database. Unfortunately, getting a row count is typically an expensive process due to its

Re: [Wicket-user] wicket did not make the grade.

2007-06-11 Thread A_flj_
Al Maw wrote: I'm guessing you didn't try typing wicket treetable into Google and clicking the I'm feeling lucky button? Right, I pushed the google search button instead. Silly me. I got to sites where the examples were on display. But I could not find any place where a downloadable

Re: [Wicket-user] wicket did not make the grade.

2007-06-11 Thread Jan Kriesten
hi, What I do: - checkout the directory wicket-examples try checking out not only wicket-examples but the whole trunk. then you should have all dependencies. regards, --- jan. - This SF.net email is sponsored by DB2

Re: [Wicket-user] ?Contract for IteratorIDataProvider.iterator(int first, int count) ???

2007-06-11 Thread Lec
yeah i sincerely believe issuing a row count() is an expensive, especially when the row count doesn't change at all Roger Hand wrote: any reasonable db keeps a count of the total rows in any given table. the size() query is most likely select count(*) from foo Then I guess Postgres

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
Yes i'll try to explain in greater detail. Looks like it was not the appendjavascript that wasnt working. But something else.:) Our hidden variables arent updated when using IE. Why they arent updated correctly puzzles me, because just before the ajax call they seem to have the correct

[Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Nart Seine
Hello, I made an innocent programming error that day by adding a Form as a child component of a TextField thats already the child of the Form. In that case, execution gets stuck in an infinite loop in Component.findParent(final Class c). I still am only scratching the surface of wicket, but are

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Matej Knopp
Can you please test it with latest wicket 1.3? There was a bug that prevented IE7 from processing ajax requests properly, it might be related. -Matej On 6/11/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Yes i'll try to explain in greater detail. Looks like it was not the

Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Alex Objelean
You just have to respect the hierarchy you have defined in the markup. Nart Seine wrote: Hello, I made an innocent programming error that day by adding a Form as a child component of a TextField thats already the child of the Form. In that case, execution gets stuck in an infinite loop

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
Hi Matej Currently gmap contrib are using wicket 1.2.6. And currently im testing with IE 6 which has the problems I mentioned, the ajax calls seems to yield no problems so far I can see we get a call when the form are submitted and it calls back after processing. However form values arent

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
In addition to the previous mail I would like to add, that we would like to resolve this using wicket 1.2.6. Now if anything are unclear or so please write and I'll try to explain further. Also the current version are the one available from SVN, I belive Iulian upgraded the example so that

[Wicket-user] AjaxFormComponentUpdatingBehavior for DropDownChoice not working in IE

2007-06-11 Thread Javed
I need to change image according the selection made in dropdown. It is working fine Firefox but not in IE I tried it with onchange and onclick. It worked in Firefox but some how it is not working IE. Is there anything I am missing? Is there any other approach to achieve the same functionality

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Matej Knopp
I dunno. Could be problem with ajax form serialization. Can you intercept the post request to see what parameters are submitted? -Matej On 6/11/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Looking even further into the problem I can see that the values are correct after

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
I can see in my form I have a action that looks like this(on IE): /quickstart/gmap/;jsessionid=blabla?wicket:interface:0:gmap in firefox it looks like this: /quickstart/gmap/?wicket:interface=:0:gmap:gmapUpdatingForm::IFormSubmitListener im not sure if that does affect anything? regards

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Matej Knopp
this doesn't really makes sense. you have different action for IE and different for firefox? On 6/11/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: I can see in my form I have a action that looks like this(on IE):

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
No I dont... It's pretty strange I guess it could be caused by IE not accepting cookies? And then web container trying with url rewrite. The difference in the action being called was a matter of me pasting from two different places, I guess the heat are getting to me now(its pretty hot here in

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
Looking at the the post (I use paros as proxy), things are alright. Im now suspecting that its our function that aren't merged correctly. We have a function called refreshGmap which we replace on ajax calls and then evaluate on the client, im not sure if this are updated correctly in IE. The

Re: [Wicket-user] [GMAP contrib] IE7 Ajax target appendJavascript not working?

2007-06-11 Thread Nino Saturnino Martinez Vazquez Wael
i'll try:) Matej Knopp wrote: I dunno. Could be problem with ajax form serialization. Can you intercept the post request to see what parameters are submitted? -Matej On 6/11/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Looking even further into the problem I can

Re: [Wicket-user] Resource.getParameters and resource mounting

2007-06-11 Thread Thomas R. Corbin
On Saturday 09 June 2007 12:03 pm, Janos Cserep escreveu: I've started migrating my applications to 1.3.0 and I think I ran into a bug with Resource.getParameters(). If a resource is mounted via Application.mountSharedResource then Resource.getParameters returns with an empty valuemap. If it

Re: [Wicket-user] AjaxFormComponentUpdatingBehavior for DropDownChoice not working in IE

2007-06-11 Thread Frank Bille
Hi I haven't got experience with that error. Can you please post the code that is not working? Frank On 6/11/07, Javed [EMAIL PROTECTED] wrote: I need to change image according the selection made in dropdown. It is working fine Firefox but not in IE I tried it with onchange and onclick.

Re: [Wicket-user] AJAX Button on my Form inside a Panel needs 2 clicks to do a search

2007-06-11 Thread Francisco Diaz Trepat - gmail
Great Jim, thanks a bunch. I'll try it out and let you know. Thanks again, f(t) On 6/8/07, James McLaughlin [EMAIL PROTECTED] wrote: I think some of the older versions of wicket would sometimes omit header contributions. When the error happens, check to see if wicket-ajax.js is included in

Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Eelco Hillenius
On 6/11/07, Johan Karlberg [EMAIL PROTECTED] wrote: If it's only the repeated execution of a count projection that bothers you, what Eelco suggest is likely not caching the data returned by the iterator, it's caching the long returned by size(). It will decrease the accuracy of the pager in

Re: [Wicket-user] ?Contract for IteratorIDataProvider.iterator(int first, int count) ???

2007-06-11 Thread Eelco Hillenius
yeah i sincerely believe issuing a row count() is an expensive, especially when the row count doesn't change at all Like it is said in the other thread, you should then look at caching the count in either the data provider or the, if the data provider calls a service to get the count, in the

Re: [Wicket-user] Problem with request sent with double quotes present in component value [Dropdown option value not being escaped]

2007-06-11 Thread Igor Vaynberg
why not download 1.2.6 and try yourself? let us know if its fixed or not. -igor On 6/11/07, Swaroop Belur [EMAIL PROTECTED] wrote: Hi All I have a dropdown choice in which I happened to render string values for option value tags. So as i have mentioned earlier in this thread, some option

Re: [Wicket-user] MarkupException using a fragment with a TabbedPanel

2007-06-11 Thread Huergo Perez
I am migrating my application from 1.2.6 to 1.3.0 and am getting a similar (although slightly different) problem in 1.3.0-incubating-SNAPSHOT. I'll try to isolate the problem in a small example and follow up. Regards, Huergo Igor Vaynberg wrote: have you tried against the latest wicket-1.2.x

Re: [Wicket-user] ?Contract for IteratorIDataProvider.iterator(int first, int count) ???

2007-06-11 Thread Igor Vaynberg
well, if a select count(*) from foo performs a table scan, i dont know if i would call it reasonable. this is of course imho. -igor On 6/11/07, Roger Hand [EMAIL PROTECTED] wrote: any reasonable db keeps a count of the total rows in any given table. the size() query is most likely select

Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Nart Seine
Yeah agreed. I was just wondering if a sanity check is needed at that point in the code. Thanks. On 6/11/07, Alex Objelean [EMAIL PROTECTED] wrote: You just have to respect the hierarchy you have defined in the markup. Nart Seine wrote: Hello, I made an innocent programming error that

Re: [Wicket-user] IDataProvider.size()

2007-06-11 Thread Al Maw
Lec wrote: so what s the most optimized way of doing paging using the IDataProvider? There is no optimal way. You have to engage your brain and make trade-offs, just like you do with everything else. You can make sure your database is configured to cache the COUNT(*) query, which will be as

Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Eelco Hillenius
On 6/11/07, Nart Seine [EMAIL PROTECTED] wrote: Yeah agreed. I was just wondering if a sanity check is needed at that point in the code. Thanks. It would be possible to build this in, but it would come at the price of increased processing overhead. Tbh, I'm not sure if the problem is common

Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread James McLaughlin
Speaking of sanity, awhile back, I was guilty of this fine piece of brain damage: class MyBrainDamagedModel implements IModel { // some interesting members // some interesting methods public Object getObject() { return this; } } Turns out this an excellent way to exercise your

[Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Shawn Tumey
Hello, The application I am working on uses i18n. Wicket has been great with this. :) Our base page that every other page extends from, does the following: getSession().setLocale(((INLWebSession)getSession()).getCredentials((WebRequest)getRequest()).getPreferredLocale()); to set the current

Re: [Wicket-user] Prototype scoped Spring beans

2007-06-11 Thread RĂ¼diger Schulz
I read on the wiki that serializing spring beans is a problem because of injected references. So what I want is something from spring which it probably cannot give me. But I will try to clear this up on the spring forum. 2007/6/7, Igor Vaynberg [EMAIL PROTECTED]: hrm. you say you will have a

Re: [Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Igor Vaynberg
how are you creating your itab/abstracttab objects? can we see that code? mainly what model do you pass in for the title. and what object does it say is not serializable? -igor On 6/11/07, Shawn Tumey [EMAIL PROTECTED] wrote: Hello, The application I am working on uses i18n. Wicket has

Re: [Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Shawn Tumey
The spring service is what it is complaining about not being serializable. private void build(final String ahId, final int tab) { List tabs=new ArrayList(); tabs.add(new AbstractTab(new ResourceModel(common.summary)){ private static final long serialVersionUID = 1L;

Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Timo Rantalaiho
On Mon, 11 Jun 2007, James McLaughlin wrote: class MyBrainDamagedModel implements IModel ... public Object getObject() { return this; } } Turns out this an excellent way to exercise your cpu. I don't know if there is anything wicket can do to prevent the hapless user the shame

Re: [Wicket-user] Accessing HttpSession attributes

2007-06-11 Thread Philip A. Chapman
You can get to the HttpSession through the WebRequest. Assuming your code is in a WebPage: getRequest().getHttpServletRequest().getSession() Enjoy, On Mon, 2007-06-11 at 21:54 +0200, Kees de Kooter wrote: I am currently working on a proof -of-concept of Wicket inside an existing Struts app.

Re: [Wicket-user] AjaxSubmitButton changing Button's Name/Displayed Text/etc

2007-06-11 Thread Jean-Baptiste Quenot
* Francisco Diaz Trepat - gmail: Anybody knows how to change the displayed name of an AjaxSubmitButton? I just tried to do a .setMode(new ResourceModel(bla bla But it didn't work. I have an input: input type=submit value=create wicket:id=createButton Please always mention the

Re: [Wicket-user] Accessing HttpSession attributes

2007-06-11 Thread Kees de Kooter
Thanks Igor. I should have been more specific. I would like to access HttpSession attributes from a wicket WebSession object. Is this possible? To be specific my WebSession subclass has a getUser() method. This user is stored as the session variable user. On 6/11/07, Igor Vaynberg [EMAIL

Re: [Wicket-user] Accessing HttpSession attributes

2007-06-11 Thread Igor Vaynberg
((webrequest)RequestCycle.get().getRequest())... -igor On 6/11/07, Kees de Kooter [EMAIL PROTECTED] wrote: Thanks Igor. I should have been more specific. I would like to access HttpSession attributes from a wicket WebSession object. Is this possible? To be specific my WebSession subclass

Re: [Wicket-user] Unit testing shared resources

2007-06-11 Thread Jean-Baptiste Quenot
* Janos Cserep: I've started writing a unit test for the getParameters() bug (WICKET-631), but can't find a way to directly call a shared resource using WicketTester. It's not on a page, or on a panel... Any pointers? Eelco suggested to ask on this list. Just typed Ctrl-Shift-T in

Re: [Wicket-user] Accessing HttpSession attributes

2007-06-11 Thread Eelco Hillenius
I would like to access HttpSession attributes from a wicket WebSession object. Is this possible? To be specific my WebSession subclass has a getUser() method. This user is stored as the session variable user. Note that (Web)Session is an abstraction. If your session store backs on

[Wicket-user] Using Ajax to update my tree

2007-06-11 Thread howzat
Wicket: 1.2.6 Is there a trick to getting a table's data updated using Ajax (eg when a DropDownChoice value changes - without refreshing the whole page)? I started with a table that got update by its ListView with no Ajax. That worked well. Now, I try to use a WebMarkupContainer to wrap the

[Wicket-user] Ajax - update table

2007-06-11 Thread howzat
Wicket: 1.2.6 Is there a trick to getting a table's data updated using Ajax (eg when a DropDownChoice value changes the rows in the table change - without refreshing the whole page)? I started with a table that got updated by its ListView with no Ajax. That worked well. Now, I try to use a

Re: [Wicket-user] Ajax - update table

2007-06-11 Thread howzat
Fixed indentation for clarity ... any ideas how to make this work - see below (table row data to be updated by the underlying ListView's model in Wicket)? final ListView lines = new ListView(lv,myList){ @Override protected void populateItem(ListItem item) { item.add(...); //

Re: [Wicket-user] Ajax - update table

2007-06-11 Thread Igor Vaynberg
try putting a webmarkupcontainer on the table tag and repainting that. -igor On 6/11/07, howzat [EMAIL PROTECTED] wrote: Fixed indentation for clarity ... any ideas how to make this work - see below (table row data to be updated by the underlying ListView's model in Wicket)? final ListView

[Wicket-user] Howto determine what objects are part of session state

2007-06-11 Thread Ryan
Through the use of anonymous inner classes it is easy for objects to become part of session state unintentionally. Does anyone know of a tool (or io util package) that would help debuging these issues? Specifically it would be great to be able to print the heiarchy/containment structure of a

Re: [Wicket-user] Ajax - update table

2007-06-11 Thread howzat
Thanks Igor. Could you be a bit more specific? As per my original post, I am trying to use the WebMarkupContainer, but it's not working (yet). I'll repeat the code in case I confused the issue with my indentation correction. final ListView lines = new ListView(lv,myList){ @Override

Re: [Wicket-user] Howto determine what objects are part of session state

2007-06-11 Thread Eelco Hillenius
Through the use of anonymous inner classes it is easy for objects to become part of session state unintentionally. Does anyone know of a tool (or io util package) that would help debuging these issues? Specifically it would be great to be able to print the heiarchy/containment structure of a

Re: [Wicket-user] Ajax - update table

2007-06-11 Thread howzat
OK, thanks.I tried that early on, but then my wicket:id=fN wicket:id=lN but got the old ... but that you either did not add the component to your page at all, or that the hierarchy does not match. for ... tr wicket:id=wmc td wicket:id=fNfirstName/td td

Re: [Wicket-user] Ajax - update table

2007-06-11 Thread Igor Vaynberg
you are missing wicket:id=lv somewhere -igor On 6/11/07, howzat [EMAIL PROTECTED] wrote: OK, thanks.I tried that early on, but then my wicket:id=fN wicket:id=lN but got the old ... but that you either did not add the component to your page at all, or that the hierarchy does not match. for

Re: [Wicket-user] Howto determine what objects are part of session state

2007-06-11 Thread Ryan
I just found terracotta provides a nice dump of an object graph if it finds problems in your clustering configuration. This should work for me however if it does not I will definitely take a look at the code you wrote to create a wicket session debug tool. Either way I will open a jira issue.

Re: [Wicket-user] Ajax - update table

2007-06-11 Thread howzat
The ListView with id lv was added to listContainer, and listContiner (a WebMarkupContainer with id wmc) was added to the form. Do I need to explicitly mention lv in the html as well as wmc ?? igor.vaynberg wrote: you are missing wicket:id=lv somewhere -igor On 6/11/07, howzat

Re: [Wicket-user] Ajax - update table

2007-06-11 Thread Igor Vaynberg
of course -igor On 6/11/07, howzat [EMAIL PROTECTED] wrote: The ListView with id lv was added to listContainer, and listContiner (a WebMarkupContainer with id wmc) was added to the form. Do I need to explicitly mention lv in the html as well as wmc ?? igor.vaynberg wrote: you are

Re: [Wicket-user] Howto determine what objects are part of session state

2007-06-11 Thread Jonathan Locke
yeah, this would be particularly neat if it could tell you the size of each object in the graph using that JMX sizeof call. it's actually the non-serialized size that matters the most and that management call ought to be able to get a value pretty close to correct (although if it's transitive,

Re: [Wicket-user] Using Ajax to update my tree

2007-06-11 Thread Frank Bille
I guess your code doesn't work right now.. Try this markup: table border =1 align=center wicket:id=wmc thead tr thfirst name/th thlast name/th /tr /thead tbody tr wicket:id=lv

Re: [Wicket-user] Using Ajax to update my tree

2007-06-11 Thread Frank Bille
Ok I didn't see you double-posted: http://www.nabble.com/Ajax---update-%3Ctable%3E-tf3904552.html Frank On 6/12/07, Frank Bille [EMAIL PROTECTED] wrote: I guess your code doesn't work right now.. Try this markup: table border =1 align=center wicket:id=wmc thead tr