Re: portlet examples?
cool. thanks! Thijs wrote: > > You can in that case also look in the wicket-examples (as there is a > portlet-configuration in there). > And then from the jetspeed svn check out > /trunk/jetspeed-commons/src/main/java/org/apache/wicket/* > /trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/* > Those should contain the relevent bits... > And you can check the http://cwiki.apache.org/WICKET/portal-howto.html > on the wiki :) > > I'll clean up the mess in my portlet and send you a war-file with > sources, some time today/ this evening > > Thijs > > > Jonathan Locke schreef: >> that would be great. i ran jetspeed once ;-) >> but i'm more interested in looking at the code >> (especially any portlet-specific stuff even if >> it's just configuration). i'll take your word for >> it that it works. >> >> >> Thijs wrote: >> >>> What specifically are you looking for? >>> I could send you a small portlet, that I use for testing if features >>> like ajax/dynamic images/etc work on the portal we are using. >>> >>> What portal are you using? Because the portlet itself (aside from the >>> web.xml/portlet.xml) is no different then any other wicket application. >>> The fun part is in the implementation of the apache portal bridges >>> ResourceUrlFactory and ServletContextProvider. (And in the case of >>> Liferay also other parts of Wicket) >>> >>> >>> Thijs >>> >>> >>> Jonathan Locke schreef: >>> does anyone out there have any wicket portlet examples i can look at? thanks, jon >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/portlet-examples--tp17190002p17202276.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: portlet examples?
You can in that case also look in the wicket-examples (as there is a portlet-configuration in there). And then from the jetspeed svn check out /trunk/jetspeed-commons/src/main/java/org/apache/wicket/* /trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/* Those should contain the relevent bits... And you can check the http://cwiki.apache.org/WICKET/portal-howto.html on the wiki :) I'll clean up the mess in my portlet and send you a war-file with sources, some time today/ this evening Thijs Jonathan Locke schreef: that would be great. i ran jetspeed once ;-) but i'm more interested in looking at the code (especially any portlet-specific stuff even if it's just configuration). i'll take your word for it that it works. Thijs wrote: What specifically are you looking for? I could send you a small portlet, that I use for testing if features like ajax/dynamic images/etc work on the portal we are using. What portal are you using? Because the portlet itself (aside from the web.xml/portlet.xml) is no different then any other wicket application. The fun part is in the implementation of the apache portal bridges ResourceUrlFactory and ServletContextProvider. (And in the case of Liferay also other parts of Wicket) Thijs Jonathan Locke schreef: does anyone out there have any wicket portlet examples i can look at? thanks, jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: portlet examples?
that would be great. i ran jetspeed once ;-) but i'm more interested in looking at the code (especially any portlet-specific stuff even if it's just configuration). i'll take your word for it that it works. Thijs wrote: > > What specifically are you looking for? > I could send you a small portlet, that I use for testing if features > like ajax/dynamic images/etc work on the portal we are using. > > What portal are you using? Because the portlet itself (aside from the > web.xml/portlet.xml) is no different then any other wicket application. > The fun part is in the implementation of the apache portal bridges > ResourceUrlFactory and ServletContextProvider. (And in the case of > Liferay also other parts of Wicket) > > > Thijs > > > Jonathan Locke schreef: >> does anyone out there have any wicket portlet examples i can look at? >> >> thanks, >> >> jon >> >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/portlet-examples--tp17190002p17202022.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: portlet examples?
What specifically are you looking for? I could send you a small portlet, that I use for testing if features like ajax/dynamic images/etc work on the portal we are using. What portal are you using? Because the portlet itself (aside from the web.xml/portlet.xml) is no different then any other wicket application. The fun part is in the implementation of the apache portal bridges ResourceUrlFactory and ServletContextProvider. (And in the case of Liferay also other parts of Wicket) Thijs Jonathan Locke schreef: does anyone out there have any wicket portlet examples i can look at? thanks, jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
i was not deeply offended. just a bit annoyed, but i thought i'd jump in and explain that i understood why this thread went a bit awry. i also didn't expect any of this was intentional (on either side). in any case i appreciate your apology and expect whichever of us may have snapped at you probably feel the same. i certainly apologize if i offended as well. Jan Kriesten wrote: > > > hi jonathan, > >> i do also think there were also some over-sensitive reactions to the >> unfortunately worded start of this thread. mutual apologies would be >> even >> better. > > it definitly wasn't intended as a personal offence to any of the wicket > team. > please take my apologies if you should have been offended by my > statements. > > as i already stated to igor on irc - your personal problems are always the > most > pressing, and not seeing the light at the end of the tunnel can be > frustrating. > > i really like wicket and it's team - the support i get is unmatched to any > other > software i have used so far. please keep up the good work - again, my > apoligies. > > best regards, --- jan. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/encapsulation%2C-extension-and-transparent-resolvers-tp17183817p17201558.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
hi jonathan, i do also think there were also some over-sensitive reactions to the unfortunately worded start of this thread. mutual apologies would be even better. it definitly wasn't intended as a personal offence to any of the wicket team. please take my apologies if you should have been offended by my statements. as i already stated to igor on irc - your personal problems are always the most pressing, and not seeing the light at the end of the tunnel can be frustrating. i really like wicket and it's team - the support i get is unmatched to any other software i have used so far. please keep up the good work - again, my apoligies. best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.4 Generics
we have the wicket-examples project that demonstrates various components. you can browse live here http://wicketstuff.org/wicket13 wicket 1.4 is basically the same as wicket 1.3 but with generics support. -igor On Mon, May 12, 2008 at 9:53 PM, Andre Prasetya <[EMAIL PROTECTED]> wrote: > Thanks, I'm still new to Wicket, is there any examples in using 1.4 ? a best > practices maybe ? > > -andre- > > > Igor Vaynberg wrote: > > > there is no need for a separate annots project since the entire > > codebase is now on java5, so annots was merged into wicket-spring > > > > -igor > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.4 Generics
Thanks, I'm still new to Wicket, is there any examples in using 1.4 ? a best practices maybe ? -andre- Igor Vaynberg wrote: there is no need for a separate annots project since the entire codebase is now on java5, so annots was merged into wicket-spring -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript adding input
On Mon, May 12, 2008 at 8:39 PM, Dan Kaplan <[EMAIL PROTECTED]> wrote: > I do use that. This has nothing to do with ReCaptcha, this is a "How do > I do x in Wicket" question that someone asked, "Why would you want to do > that?" so I used ReCaptcha as an answer. Ok, gotcha. So, we're not talking about ReCaptcha anymore? You just want to know how you could have some JavaScript run onload that displays input elements that are tied to Wicket components? Why do you need to use JavaScript? Are you writing the JavaScript? If I were going to go about this, I would perhaps try to do what ImageMap does. It creates components and adds them to itself. Then it calls getPage().componentRendered() so that Wicket knows that they've already been rendered. Then, your JavaScript needs to use the ids that Wicket generates in the document.write(). Now this is assuming that you have some control over the JavaScript (you need to dynamically generate it, obviously). As, Maurice pointed out, there are better ways of doing this (using Velocity to generate the markup would be easier IMHO if this is really what you want). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
A soft reference is very common for this type of thing. I know some of ICU's resources are stored this way. Jonathan Locke wrote: > > > maybe localizer should limit its size or use a soft reference cache? > > > Johan Compagner wrote: >> >> Can you really see what it holds? >> Almost 2G in memory in localizer is extreme... Thats really a lot of >> strings.. >> You could try to read that dump with yourkit if your current one >> doesnt show enough. >> >> On 5/9/08, Quan Zhou <[EMAIL PROTECTED]> wrote: >>> Hello everyone. >>> >>> I recently develop my App use Wicket1.3.3. It's my first time to use >>> this >>> framework and I feel it's really really a perfect framework for me. >>> My app support both Simplified Chinese , Traditional Chinese, I >>> implement >>> this with Wicket i18n feature. >>> With the load increasing these days, I found my app would become very >>> lag >>> abount every 24 hours ,so that i would only restart it >>> without any choice. >>> when I found the lag, My log records many Exceptions like : >>> "after 1 minute the Pagemap null is still locked by: >>> Thread[http-8080-321,5,main], giving >>> up trying to get the page for path xxx" >>> >>> I check the JVM status with jstat -gc , It tells that the Heapsize is >>> full >>> even after full GC. >>> My VM paraemter is "-Xms2000m -Xmx2000m -XX:MaxNewSize=250m >>> -XX:MaxPermSize=250m" >>> My deploy server has 2*CPU and 4G memory, Redhat AS4 OS + tomcat 6.0. >>> There're 2000 sessions on the day while the timeout threshold is 15 >>> minutes. >>> So i dump the whole heapsize with the command " jmap >>> -dump:live,format=b,file=3.dump.hprof processid" >>> and i truely get a 2G size dump files. I use SAP Memory Analyer to see >>> what're stored in HeapMemory. >>> and I found a strange number of Retained Heap usage: >>> Classname >>> ShallowHeap RetainHeap >>> RetainedHeap% >>> [EMAIL PROTECTED] >>> 16 >>> 1,755,070,35287.64% >>> [EMAIL PROTECTED] >>> 48 1,755,070,33687.69% >>> [EMAIL PROTECTED] >>> 33,554,448 >>> 1,755,069,632 87.69% >>>- [EMAIL PROTECTED] >>>24 3928 >>> 0.00% >>>- [EMAIL PROTECTED] >>>24 3928 >>> 0.00% >>>- [EMAIL PROTECTED] >>>24 3928 >>> 0.00% >>>- [EMAIL PROTECTED] >>>24 3928 >>> 0.00% >>>- [EMAIL PROTECTED] >>>24 3928 >>> 0.00% >>>- [EMAIL PROTECTED] >>>24 3928 >>> 0.00% >>> + 2,863,659 more... >>> >>> Is that means that the Localizer Object used most of the heap size? >>> or Is this number normal for Wicket App? >>> >>> I wonder whether I forget to release the memory by my mis-using of i18n >>> feature? >>> Is there any attentions I must pay to when dealing with Localizer? >>> >>> This problem annoys me more the 2 weeks. I really need some help. Thanks >>> . >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/Why-Localizer-Retained-so-many-heapsize--tp17142582p17199950.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
> I know transparent resolvers are currently a major issue and can't be > really handled in a proper way due to the hierarchy concept. But if things > can be fixed with a workaround (until a new transparent resolver model is > established) and which has no impact on the overall functionality - why > can't that make it into wicket? The 'We wont support this' dogma isn't > really proper argumentation. Sorry you're feeling frustrated. However, the "we won't support this" is directly related to our limited time. Even workarounds have to be evaluated, and evaluating patched typically takes (me at least) between an hour up to a whole evening. It won't be the first time a workaround opens up a can of worms no-one imagined before implementing it. In fact, as far as *I* am concerned, those resolvers are very workaround-ish, and opened up the door for more requests we didn't intend. In the end, we are the little dictators of our project, and sometimes (unfortunately for you in this case) that means that we just say no to stuff, even if it seems unreasonable. :-) In the end, if you really feel it is important, you can patch a project yourself - which once upon a time wasn't crazy at all -, and you can leave the JIRA issue open in case someone at some point gets inspiration to work on it. Cheers, Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
i do also think there were also some over-sensitive reactions to the unfortunately worded start of this thread. mutual apologies would be even better. Jonathan Locke wrote: > > > yeah, i feel that the original statement is most readily interpreted as > some form of bullying being levied against a team of volunteers. i don't > think that's too cool and the core team has every right to resist that > sort of pressure, particularly since their mission is to ensure minimal, > clean solutions to everyone's problems (for free no less). i doubt if the > offense was thoughtfully intended, but i still think an apology would be a > good step here. > > > jWeekend wrote: >> >> Making such general and potentially misleading comments on a public forum >> is not always the easiest way to get a *specific* problem you are faced >> with get addressed. >> >> If you are lucky enough to spend time on the Wicket IRC, based on my >> experience to date, the good people there would address such issues for >> you (with sound, reasoned logic explaining why things are as they are, or >> by gratefully acknowledging that you have found a way to improve things >> if that is the case) before frustration reaches levels that generate such >> sweeping statements about Wicket in general. >> >> Anyway, I hope you get to a solution you are happy with; I find Johan's >> response below ("bladiabla" etc) typical of the core-developer's >> pragmatism and no-nonsense desire to get to the crux of the matter and >> help people using this excellent framework they have given us and that >> they continue to dedicate their time to improve it and support a healthy >> and growing user base. >> >> Regards - Cemal >> >> http://jWeekend.co.uk http://jWeekend.co.uk >> >> >> >> Jan Kriesten wrote: >>> >>> >>> Hi, >>> >>> I'm getting a bit frustrated concerning wicket's encapsulation + >>> extensibility, >>> especially when it comes to transparent resolvers. >>> >>> There are a couple of nice features which are dependend on other >>> Components. >>> Just extending/customizing them is nearly impossible when it comes to >>> unthought >>> usecases. >>> >>> Such usecases - when described - are turned down by statements 'You are >>> using it >>> in an improper way, rethink your data access model.' or 'When it comes >>> to >>> transparent resolvers, you are on your own - implement it from scratch >>> without >>> them'. >>> >>> In the latter, 'implement it from scratch' has significant tradeoffs: My >>> case is >>> implementing a DataTable with some add-on features which need make use >>> of an >>> transparent resolver. The encapsulation of the contained DataGridView >>> with >>> DataTable leaves me no option (except doing it from scratch). If I would >>> implement a DataTable myself, I'd have to create all Components >>> expecting a >>> DataTable as parameter again: That just contradics Wicket's reusable >>> components >>> approach. >>> >>> As responsive + well supported as Wicket is (I really like that a lot - >>> and am >>> thankful for the work the dev team is doing) - if unthought usecases >>> occur the >>> team is frequently denying that such usecases are valid and wouldn't >>> bring >>> Wicket a step further. >>> >>> I know transparent resolvers are currently a major issue and can't be >>> really >>> handled in a proper way due to the hierarchy concept. But if things can >>> be fixed >>> with a workaround (until a new transparent resolver model is >>> established) and >>> which has no impact on the overall functionality - why can't that make >>> it into >>> wicket? The 'We wont support this' dogma isn't really proper >>> argumentation. >>> >>> Best regards, --- Jan. >>> >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/encapsulation%2C-extension-and-transparent-resolvers-tp17183817p17199433.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
yeah, i feel that the original statement is most readily interpreted as some form of bullying being levied against a team of volunteers. i don't think that's too cool and the core team has every right to resist that sort of pressure, particularly since their mission is to ensure minimal, clean solutions to everyone's problems (for free no less). i doubt if the offense was thoughtfully intended, but i still think an apology would be a good step here. jWeekend wrote: > > Making such general and potentially misleading comments on a public forum > is not always the easiest way to get a *specific* problem you are faced > with get addressed. > > If you are lucky enough to spend time on the Wicket IRC, based on my > experience to date, the good people there would address such issues for > you (with sound, reasoned logic explaining why things are as they are, or > by gratefully acknowledging that you have found a way to improve things if > that is the case) before frustration reaches levels that generate such > sweeping statements about Wicket in general. > > Anyway, I hope you get to a solution you are happy with; I find Johan's > response below ("bladiabla" etc) typical of the core-developer's > pragmatism and no-nonsense desire to get to the crux of the matter and > help people using this excellent framework they have given us and that > they continue to dedicate their time to improve it and support a healthy > and growing user base. > > Regards - Cemal > > http://jWeekend.co.uk http://jWeekend.co.uk > > > > Jan Kriesten wrote: >> >> >> Hi, >> >> I'm getting a bit frustrated concerning wicket's encapsulation + >> extensibility, >> especially when it comes to transparent resolvers. >> >> There are a couple of nice features which are dependend on other >> Components. >> Just extending/customizing them is nearly impossible when it comes to >> unthought >> usecases. >> >> Such usecases - when described - are turned down by statements 'You are >> using it >> in an improper way, rethink your data access model.' or 'When it comes to >> transparent resolvers, you are on your own - implement it from scratch >> without >> them'. >> >> In the latter, 'implement it from scratch' has significant tradeoffs: My >> case is >> implementing a DataTable with some add-on features which need make use of >> an >> transparent resolver. The encapsulation of the contained DataGridView >> with >> DataTable leaves me no option (except doing it from scratch). If I would >> implement a DataTable myself, I'd have to create all Components expecting >> a >> DataTable as parameter again: That just contradics Wicket's reusable >> components >> approach. >> >> As responsive + well supported as Wicket is (I really like that a lot - >> and am >> thankful for the work the dev team is doing) - if unthought usecases >> occur the >> team is frequently denying that such usecases are valid and wouldn't >> bring >> Wicket a step further. >> >> I know transparent resolvers are currently a major issue and can't be >> really >> handled in a proper way due to the hierarchy concept. But if things can >> be fixed >> with a workaround (until a new transparent resolver model is established) >> and >> which has no impact on the overall functionality - why can't that make it >> into >> wicket? The 'We wont support this' dogma isn't really proper >> argumentation. >> >> Best regards, --- Jan. >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/encapsulation%2C-extension-and-transparent-resolvers-tp17183817p17199343.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use AjaxFormChoiceComponentUpdatingBehavior in Check/CheckGroup
Hello Johan, Sorry, i forgot to add something in the code snippet, anyway, i finally got it working...here is the scenario: the Listview is being targeted from a dropdownchoice when "onchange" since the listview is generated only on runtime due to the dropdownchoice.When new values get it, does not have the AjaxFormChoiceComponentUpdatingBehavior (javascript or somethin..) to solve my problem...here the code snippet i've made //select what type to be displayed chkTypeChoice.add(new AjaxFormComponentUpdatingBehavior("onchange"){ @Override protected void onUpdate(AjaxRequestTarget target) { if(null != chkTypeChoice.getModelObject()){ .. list.setModelObject(listChk); target.addComponent(container); target.addComponent(chkGrp); //refresh chkgrp to get AjaxFormChoiceComponentUpdatingBehavior working } } }); ...Thanks a lot..Cheers Johan Compagner wrote: > > Code seems fine. What is the hrml output? > > On 5/12/08, freak182 <[EMAIL PROTECTED]> wrote: >> >> Hello, >> I having problem integrating AjaxFormChoiceComponentUpdatingBehavior. my >> code snippet: >> >> final WebMarkupContainer container = new WebMarkupContainer("wmc"); >> final CheckGroup chkGrp = new CheckGroup("chkGrp",new ArrayList()); >> >> final ListView list = new ListView("listBcs",listChk){ >> @Override >> protected void populateItem(ListItem item) { >> >> item.add(new Check("fltId",item.getModel())); >> ... >> } >> }; >> >> chkGrp.add(new AjaxFormChoiceComponentUpdatingBehavior(){ >> @Override >> protected void onUpdate(AjaxRequestTarget target) { >> System.out.println("here >> AjaxFormChoiceComponentUpdatingBehavior"); >> >> target.addComponent(amtChk); >> target.addComponent(cntChk); >> } >> }); >> >> ...it not getting hit inside the onUpdate method..any idea.. >> Thanks a lot..Cheers >> >> >> -- >> View this message in context: >> http://www.nabble.com/How-to-use-AjaxFormChoiceComponentUpdatingBehavior-in-Check-CheckGroup-tp17184651p17184651.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-to-use-AjaxFormChoiceComponentUpdatingBehavior-in-Check-CheckGroup-tp17184651p17199233.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom validation string for 'required' fields
Never mind - I figured it out. I had changed the component ID and didn't update the properties mapping for Required (very embarrassing but this happens in the best families). -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Monday, May 12, 2008 5:08 PM To: users@wicket.apache.org Subject: Custom validation string for 'required' fields This should be simple. I have a radio group ("group"), which is required: monthlyRadioGroup.setRequired(true); that group is inside a WebMarkupContainer ("monthlyLayer"), which is inside my form ("submitForm"). My panel's property file has this: submitForm.monthlyLayer.group.Required = My own error message However, I keep getting the default error message. What am I doing wrong? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Javascript adding input
I do use that. This has nothing to do with ReCaptcha, this is a "How do I do x in Wicket" question that someone asked, "Why would you want to do that?" so I used ReCaptcha as an answer. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of James Carman > Sent: Monday, May 12, 2008 3:47 PM > To: users@wicket.apache.org > Subject: Re: Javascript adding input > > Have you looked at the Recaptcha Java plugin? It might give you an > example of how to create a Recaptcha component. I'm actually thinking > about playing around with this myself. Recaptcha seems pretty cool. > I'll let you know if I come up with anything. > > On Mon, May 12, 2008 at 1:57 PM, Dan Kaplan <[EMAIL PROTECTED]> > wrote: > > Ok, that's the only way I know how too. I was hoping there is another > > way > > > >> -Original Message- > >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan > >> Gravener > >> Sent: Friday, May 09, 2008 12:52 PM > >> To: users@wicket.apache.org > >> Subject: Re: Javascript adding input > >> > >> Get the hidden data from the request: > >> getRequest().getParameter("hidden_token"); > >> > >> On Fri, May 9, 2008 at 2:13 PM, Dan Kaplan <[EMAIL PROTECTED]> > >> wrote: > >> > >> > That's not the point, but if you need a good reason how about this: > > I'm > >> > using recaptcha (it generates a captcha on the page). It works by > >> > putting a script tag where you want it to show up. When the page > > loads, > >> > it puts a text input field and a bunch of hidden fields there. You > > need > >> > these hidden fields to tell the recaptcha server what it gave you so > > it > >> > can compare it to what the user typed in. Without them, it can't > > tell > >> > you if the user entered things in correctly or not. > >> > > >> > > -Original Message- > >> > > From: Maurice Marrink [mailto:[EMAIL PROTECTED] > >> > > Sent: Friday, May 09, 2008 12:24 AM > >> > > To: users@wicket.apache.org > >> > > Subject: Re: Javascript adding input > >> > > > >> > > Why would you want to do that? > >> > > If it happens at form load you must know about this inputfield > > when > >> > > you create the page so why not add a wicket component for it too? > >> > > > >> > > Maurice > >> > > > >> > > On Fri, May 9, 2008 at 1:02 AM, Dan Kaplan > > <[EMAIL PROTECTED]> > >> > > wrote: > >> > > > Let's say that hypothetically I used javascript to add an > > to > >> > a > >> > > > form in its onload method. How can I get wicket to become aware > > of > >> > that > >> > > > input so I can do things like validate it, etc.? > >> > > > > >> > > > > >> > > > >> > > > > - > >> > > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > >> > > >> > > >> > > >> > > > - > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > >> > >> -- > >> Ryan Gravener > >> http://twitter.com/ryangravener > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Custom validation string for 'required' fields
This should be simple. I have a radio group ("group"), which is required: monthlyRadioGroup.setRequired(true); that group is inside a WebMarkupContainer ("monthlyLayer"), which is inside my form ("submitForm"). My panel's property file has this: submitForm.monthlyLayer.group.Required = My own error message However, I keep getting the default error message. What am I doing wrong?
Re: encapsulation, extension and transparent resolvers
Making such general and potentially misleading comments on a public forum is not always the easiest way to get a *specific* problem you are faced with get addressed. If you are lucky enough to spend time on the Wicket IRC, based on my experience to date, the good people there would address such issues for you (with sound, reasoned logic explaining why things are as they are, or by gratefully acknowledging that you have found a way to improve things if that is the case) before frustration reaches levels that generate such sweeping statements about Wicket in general. Anyway, I hope you get to a solution you are happy with; I find Johan's response below ("bladiabla" etc) typical of the core-developer's pragmatism and no-nonsense desire to get to the crux of the matter and help people using this excellent framework they have given us and that they continue to dedicate their time to improve it and support a healthy and growing user base. Regards - Cemal http://jWeekend.co.uk http://jWeekend.co.uk Jan Kriesten wrote: > > > Hi, > > I'm getting a bit frustrated concerning wicket's encapsulation + > extensibility, > especially when it comes to transparent resolvers. > > There are a couple of nice features which are dependend on other > Components. > Just extending/customizing them is nearly impossible when it comes to > unthought > usecases. > > Such usecases - when described - are turned down by statements 'You are > using it > in an improper way, rethink your data access model.' or 'When it comes to > transparent resolvers, you are on your own - implement it from scratch > without > them'. > > In the latter, 'implement it from scratch' has significant tradeoffs: My > case is > implementing a DataTable with some add-on features which need make use of > an > transparent resolver. The encapsulation of the contained DataGridView with > DataTable leaves me no option (except doing it from scratch). If I would > implement a DataTable myself, I'd have to create all Components expecting > a > DataTable as parameter again: That just contradics Wicket's reusable > components > approach. > > As responsive + well supported as Wicket is (I really like that a lot - > and am > thankful for the work the dev team is doing) - if unthought usecases occur > the > team is frequently denying that such usecases are valid and wouldn't bring > Wicket a step further. > > I know transparent resolvers are currently a major issue and can't be > really > handled in a proper way due to the hierarchy concept. But if things can be > fixed > with a workaround (until a new transparent resolver model is established) > and > which has no impact on the overall functionality - why can't that make it > into > wicket? The 'We wont support this' dogma isn't really proper > argumentation. > > Best regards, --- Jan. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/encapsulation%2C-extension-and-transparent-resolvers-tp17183817p17198545.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript adding input
Have you looked at the Recaptcha Java plugin? It might give you an example of how to create a Recaptcha component. I'm actually thinking about playing around with this myself. Recaptcha seems pretty cool. I'll let you know if I come up with anything. On Mon, May 12, 2008 at 1:57 PM, Dan Kaplan <[EMAIL PROTECTED]> wrote: > Ok, that's the only way I know how too. I was hoping there is another > way > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan >> Gravener >> Sent: Friday, May 09, 2008 12:52 PM >> To: users@wicket.apache.org >> Subject: Re: Javascript adding input >> >> Get the hidden data from the request: >> getRequest().getParameter("hidden_token"); >> >> On Fri, May 9, 2008 at 2:13 PM, Dan Kaplan <[EMAIL PROTECTED]> >> wrote: >> >> > That's not the point, but if you need a good reason how about this: > I'm >> > using recaptcha (it generates a captcha on the page). It works by >> > putting a script tag where you want it to show up. When the page > loads, >> > it puts a text input field and a bunch of hidden fields there. You > need >> > these hidden fields to tell the recaptcha server what it gave you so > it >> > can compare it to what the user typed in. Without them, it can't > tell >> > you if the user entered things in correctly or not. >> > >> > > -Original Message- >> > > From: Maurice Marrink [mailto:[EMAIL PROTECTED] >> > > Sent: Friday, May 09, 2008 12:24 AM >> > > To: users@wicket.apache.org >> > > Subject: Re: Javascript adding input >> > > >> > > Why would you want to do that? >> > > If it happens at form load you must know about this inputfield > when >> > > you create the page so why not add a wicket component for it too? >> > > >> > > Maurice >> > > >> > > On Fri, May 9, 2008 at 1:02 AM, Dan Kaplan > <[EMAIL PROTECTED]> >> > > wrote: >> > > > Let's say that hypothetically I used javascript to add an > to >> > a >> > > > form in its onload method. How can I get wicket to become aware > of >> > that >> > > > input so I can do things like validate it, etc.? >> > > > >> > > > >> > > >> > > > - >> > > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > > For additional commands, e-mail: [EMAIL PROTECTED] >> > > >> > >> > >> > >> > > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> >> >> -- >> Ryan Gravener >> http://twitter.com/ryangravener > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disabling the date part in the DateTimeField component
this is not possible, but based on DateTimeField, it should be fairly straight forward to run your own TimeField. Gerolf On Mon, May 12, 2008 at 8:28 PM, nitinkc <[EMAIL PROTECTED]> wrote: > > Does anyone know if it is possible to disable just the date part in the > DateTimeField component. I have a requirement to allow to user to only > edit > the hours and minutes. > > Is there another component/way to achieve this?? > -- > View this message in context: > http://www.nabble.com/Disabling-the-date-part-in-the-DateTimeField-component-tp17189917p17189917.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: encapsulation, extension and transparent resolvers
Does it break api? Or is it dangerous on some level? Can it break running code? On 5/13/08, Gerolf Seitz <[EMAIL PROTECTED]> wrote: > On Mon, May 12, 2008 at 7:26 PM, Jan Kriesten <[EMAIL PROTECTED]> > wrote: > > > maybe gerolf didn't want to step into ground where others may have more > > insight - that's the reason i filed this to jira. > > > > correct. > > also, because of what igor said: > > > especially if it is markup parsing code which is a pretty fragile area > > > in wicket. > > > > > > i applied it o 1.4.x, since that's the version jan would like to see fixed. > should 1.3.x and 1.4.x be in sync regarding this issue? > > Gerolf > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is it illegal to update hierarchy in onAfterRender?
Except events back to them dont work.. (because they only lived in the response phase of the page) On 5/13/08, Johan Compagner <[EMAIL PROTECTED]> wrote: > Hmm i am affraid the source for more info is the source.. > > AutoAdd can be done in the rendering. They are only there just then. > And they will be removed by wicket after rendering. (at least they > should) > > They are or can be normal components > > On 5/12/08, Erik van Oosten <[EMAIL PROTECTED]> wrote: > > Johan Compagner wrote: > > > What you can use is try to add it as auto add.. > > > So create an auto add component, we will remove those for you > > > > > I tried to find some more on this topic, but both google as the Wicket > > wiki are not very informative. In the javadocs I could only find > > MarkupContainer.html#autoAdd. Unfortunately I am not sure I understand > > the consequences of what that method describes. > > > > Is there a source of more information? > > > > Regards, > > Erik. > > > > -- > > Erik van Oosten > > http://day-to-day-stuff.blogspot.com/ > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is it illegal to update hierarchy in onAfterRender?
Hmm i am affraid the source for more info is the source.. AutoAdd can be done in the rendering. They are only there just then. And they will be removed by wicket after rendering. (at least they should) They are or can be normal components On 5/12/08, Erik van Oosten <[EMAIL PROTECTED]> wrote: > Johan Compagner wrote: > > What you can use is try to add it as auto add.. > > So create an auto add component, we will remove those for you > > > I tried to find some more on this topic, but both google as the Wicket > wiki are not very informative. In the javadocs I could only find > MarkupContainer.html#autoAdd. Unfortunately I am not sure I understand > the consequences of what that method describes. > > Is there a source of more information? > > Regards, > Erik. > > -- > Erik van Oosten > http://day-to-day-stuff.blogspot.com/ > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
On Mon, May 12, 2008 at 7:26 PM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > maybe gerolf didn't want to step into ground where others may have more > insight - that's the reason i filed this to jira. > correct. also, because of what igor said: > especially if it is markup parsing code which is a pretty fragile area > > in wicket. > > > i applied it o 1.4.x, since that's the version jan would like to see fixed. should 1.3.x and 1.4.x be in sync regarding this issue? Gerolf
portlet examples?
does anyone out there have any wicket portlet examples i can look at? thanks, jon -- View this message in context: http://www.nabble.com/portlet-examples--tp17190002p17190002.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getBodyContainer replacement for appending attributes to body tag
Hi Guys, Since getBodyContainer is no longer available as of wicket 1.3.x, how can you allow inherited page markup to update or contribute to the body tag's attributes (other than onLoad and onUnload). We used to rely on getBodyContainer().getBodyContainer(). Thanks for the help -hc -- View this message in context: http://www.nabble.com/getBodyContainer-replacement-for-appending-attributes-to-body-tag-tp17189983p17189983.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript adding input
> You need > these hidden fields to tell the recaptcha server what it gave you so it > can compare it to what the user typed in. Without them, it can't tell > you if the user entered things in correctly or not. I guess storing that information in the user session is out of the question? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is it illegal to update hierarchy in onAfterRender?
Johan Compagner wrote: What you can use is try to add it as auto add.. So create an auto add component, we will remove those for you I tried to find some more on this topic, but both google as the Wicket wiki are not very informative. In the javadocs I could only find MarkupContainer.html#autoAdd. Unfortunately I am not sure I understand the consequences of what that method describes. Is there a source of more information? Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disabling the date part in the DateTimeField component
Does anyone know if it is possible to disable just the date part in the DateTimeField component. I have a requirement to allow to user to only edit the hours and minutes. Is there another component/way to achieve this?? -- View this message in context: http://www.nabble.com/Disabling-the-date-part-in-the-DateTimeField-component-tp17189917p17189917.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DropDownChoice throws IllegalArgumentException with Integer values
I completely agree, Johan. Bad example - I really like John Krasney's example - a lot more elegant: public MyBusinessClass { private int period; // getter/setter omitted for clarity } MyBusinessClass myObject = // blah List periods = Arrays.asList(new Integer[] { 1, 7, 14, 30, 365 }); new DropDownChoice("period", new PropertyModel(myObject, "period"), periods, new ChoiceRenderer() { public String getDisplayValue(Object object) { int period = ((Integer) object).intValue(); switch (period) { case 1: return "Day"; case 7: return "Week"; case 14: return "Fortnight"; case 30: return "Month"; case 365: return "Year"; default: throw new RuntimeException(); } } } ); -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 10:43 PM To: users@wicket.apache.org Subject: Re: DropDownChoice throws IllegalArgumentException with Integer values And thats why i think the wiki example is a bad one. It points people in the wrong way. On 5/10/08, John Krasnay <[EMAIL PROTECTED]> wrote: > On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote: >> Thanks for the input, John - but I the plot thickens here. It seems that >> there is actually a Wicket bug that needs to get fixed. After a lot of >> tinkering I figured out why I was getting this error. The VERY FIRST >> TIME my renderer is being called it actually calls getIdValue() with an >> Integer, not with the Object that I'm using. In my debugger I saw the > > This isn't a bug. The integer is coming from your business model. > DropDownChoice calls getIdValue() with this value so it can pre-select > the correct option based on your current business object value. > > I'll try explaining this again. Maybe this time it will click. > > You give a DDC a model and a list of possible values. The type of object > returned by the model and the type of objects in the list *must* be the > same. You've already mentioned that your model returns an Integer, so > you *must* pass a list of Integers, not IntegerSelectChoice or anything > else. > > If you want to display something different than the integer, you have to > implement some custom code in ChoiceRenderer.getDisplayValue(). Don't > get hung up on the idea that the value returned has to be a property of > the objects in your list. It can be anything, such as the > getString("period_" + object.toString()) in my example. > > You are probably used to a Model2 framework like Struts, where you have > to create lists of key/value pair objects to render s. No need > for such an artificial structure in Wicket. > > Is the light coming on yet? > > jk > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DropDownChoice throws IllegalArgumentException with Integer values
Yeah, I can be thick headed at times ;-) Actually the solution is to add some custom code to getIdValue(), not getDisplayValue(). It's a bit of a hack, but seems to work fine now. Next time I'll build this differently though, that's for sure. Thank you for walking me through this. This whole thing was a bit confusing to me, especially since that tutorial leads people in the wrong direction. It makes complete sense that the model and list objects need to be of the same type. Best, Michael -Original Message- From: John Krasnay [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 7:13 PM To: users@wicket.apache.org Subject: Re: DropDownChoice throws IllegalArgumentException with Integer values On Fri, May 09, 2008 at 06:42:11PM -0700, Michael Mehrle wrote: > Thanks for the input, John - but I the plot thickens here. It seems that > there is actually a Wicket bug that needs to get fixed. After a lot of > tinkering I figured out why I was getting this error. The VERY FIRST > TIME my renderer is being called it actually calls getIdValue() with an > Integer, not with the Object that I'm using. In my debugger I saw the This isn't a bug. The integer is coming from your business model. DropDownChoice calls getIdValue() with this value so it can pre-select the correct option based on your current business object value. I'll try explaining this again. Maybe this time it will click. You give a DDC a model and a list of possible values. The type of object returned by the model and the type of objects in the list *must* be the same. You've already mentioned that your model returns an Integer, so you *must* pass a list of Integers, not IntegerSelectChoice or anything else. If you want to display something different than the integer, you have to implement some custom code in ChoiceRenderer.getDisplayValue(). Don't get hung up on the idea that the value returned has to be a property of the objects in your list. It can be anything, such as the getString("period_" + object.toString()) in my example. You are probably used to a Model2 framework like Struts, where you have to create lists of key/value pair objects to render s. No need for such an artificial structure in Wicket. Is the light coming on yet? jk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Javascript adding input
Ok, that's the only way I know how too. I was hoping there is another way > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan > Gravener > Sent: Friday, May 09, 2008 12:52 PM > To: users@wicket.apache.org > Subject: Re: Javascript adding input > > Get the hidden data from the request: > getRequest().getParameter("hidden_token"); > > On Fri, May 9, 2008 at 2:13 PM, Dan Kaplan <[EMAIL PROTECTED]> > wrote: > > > That's not the point, but if you need a good reason how about this: I'm > > using recaptcha (it generates a captcha on the page). It works by > > putting a script tag where you want it to show up. When the page loads, > > it puts a text input field and a bunch of hidden fields there. You need > > these hidden fields to tell the recaptcha server what it gave you so it > > can compare it to what the user typed in. Without them, it can't tell > > you if the user entered things in correctly or not. > > > > > -Original Message- > > > From: Maurice Marrink [mailto:[EMAIL PROTECTED] > > > Sent: Friday, May 09, 2008 12:24 AM > > > To: users@wicket.apache.org > > > Subject: Re: Javascript adding input > > > > > > Why would you want to do that? > > > If it happens at form load you must know about this inputfield when > > > you create the page so why not add a wicket component for it too? > > > > > > Maurice > > > > > > On Fri, May 9, 2008 at 1:02 AM, Dan Kaplan <[EMAIL PROTECTED]> > > > wrote: > > > > Let's say that hypothetically I used javascript to add an to > > a > > > > form in its onload method. How can I get wicket to become aware of > > that > > > > input so I can do things like validate it, etc.? > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Ryan Gravener > http://twitter.com/ryangravener - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Load serialized (or in session) page/model on refresh..
So yeah the dataview the dataview does get the iterator on refresh every time Also as maurice mentioned in his latest reply, the dataview components does re-create and gets the model for its child component every time.. And thats why i am seeing this behavior.. mfs wrote: > > sure will check it out.. > > Jonathan Locke wrote: >> >> >> try setting a breakpoint on this line: >> >> List certificateList = >> >> DAOManager.getExemptionCertificateDAO().getExemptionCertificates( >> >> m_certificateSearchCriteriaName,m_certificateSearchCriteriaValue, >> Integer.valueOf(first), Integer.valueOf(count)); >> >> i assume the data view has to get the iterator each time to repopulate >> the list (since it's refreshing). >> >> >> mfs wrote: >>> >>> >>> >>> Jonathan Locke wrote: oh, okay. sorry, i was speed-reading your question and misunderstood it. maurice and johan are correct that hybrid urls will avoid creating the instance. the part i mistakenly assumed we were talking about was whether one can completely avoid creating a new version of the page in the page store during rendering. maybe matej can verify this, but i don't think that is possible anymore. wicket requests can dynamically modify the component hierarchy and with the new disk page store, i think you always end up with a new page version. so when you hit a hybrid url and a new page version is created and that number at the end of the url changes (which i'm assuming you are assuming is a new page), that doesn't mean a new page was constructed (set a breakpoint in your constructor and verify for yourself). it merely means that the existing page was mutated. is that where your confusion is coming from? So For me 1) Doing a refresh, doesnt change/increment the version at the end of url, it remains the same with every refresh 2) the confusion is that i see the model being reloaded from the database (even though i am not using a DetachableModel), may be i am doing something wrong here (or probably i am not understanding something correctly), if u look at my implementation here (http://papernapkin.org/pastebin/view/788/) may be you can tell, because if a a new page is not constructed on a refresh (given hybridstrategy), why is the DataView repopulated/reconstructed every time with the latest model (provided to it via a IDataProvider impl which in turns get the data from the DB and, yes also the model returned by the DataProvider.model(Object object) is non-detachable model)...I think i am missing something very basic yet important here.. btw, i still think you are making a big mistake if you're avoiding detachable models. detachable models are the best practice. you should add a database cache to make them efficient, not try to work around them. early on i tried to avoid them at first and discovered dozens of ways to get bit by that. don't prematurely optimize your app. build it the right way first and then look at your hot spots. I will re-think this over defintly and u certainly seem to make sense, but i would still wanna have a good understanding of how this works.. Jonathan Locke wrote: > > > okay, so i think the answer to your question is no, you can't optimize > that. you should be using detachable models and an OTS db cache. > > what i don't understand is why you want to do this. if the user hits > refresh in their browser they are hoping to see updated data. why do > you want to turn that into a no-op? > > > mfs wrote: >> >> I have the condensed version of the code here, with some comments on >> the top of each class.. >> >> http://papernapkin.org/pastebin/view/788/ >> >> Waiting for follow up >> >> >> Jonathan Locke wrote: >>> >>> >>> you must be making some mistake (probably conceptual). can you >>> create a quickstart example of your problem and post it at some link >>> where we can see exactly what you're doing? >>> >>> >>> mfs wrote: Well actually before posting this up, i did try this i.e. mounted the page using hybridurlcodingstrategy (with the assumption that since the pageId is there in the url doing a refresh would load the already instantiated page against the id) but at that time i had the page as bookmarkable (i.e. had public default and param constructors), so after reading maurice's post, i made it a non-bookmarkable one (by making both the constructors as protected) but unfortunately it still doesnt work, doing a refresh i still see the updated model..to be precise i am using a DataView whic
Re: encapsulation, extension and transparent resolvers
too bad you did not maintain the jira issue properly. maybe now you have a taste of what its like, but try it for hundreds of issues. -igor On Mon, May 12, 2008 at 10:26 AM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi igor, > > > > > so i am a little confused as to why we are talking about transparent > > resolvers, and why gerolf did not apply that code himself... > > > > i tried to verify whether or not is related to the transparent resolver - > it seems at last it's connected to them cause i couldn't produce a case > where it happens without them. (though i can't claim it can't happen) > > maybe gerolf didn't want to step into ground where others may have more > insight - that's the reason i filed this to jira. > > > > > personally i do not like to change code if it "maybe" helps, > > > > it helps, so it's not 'maybe' in this case. > > > > > especially if it is markup parsing code which is a pretty fragile area > > in wicket. > > > > right, i very well understand - this has to be carefully reasoned. i didn't > find any problems with this workaround with my code yet - a test on a second > codebase would be helpful though. > > if there are no objections i will ask gerolf to apply this patch (and > remove it again should there be evidence that it breaks anything on another > project). > > hopefully there will be another way with 1.5 to cope with transparent > resolvers so this only is a matter of time 'til wicket is more robust on > those use cases. > > best regards, --- jan. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
hi igor, so i am a little confused as to why we are talking about transparent resolvers, and why gerolf did not apply that code himself... i tried to verify whether or not is related to the transparent resolver - it seems at last it's connected to them cause i couldn't produce a case where it happens without them. (though i can't claim it can't happen) maybe gerolf didn't want to step into ground where others may have more insight - that's the reason i filed this to jira. personally i do not like to change code if it "maybe" helps, it helps, so it's not 'maybe' in this case. especially if it is markup parsing code which is a pretty fragile area in wicket. right, i very well understand - this has to be carefully reasoned. i didn't find any problems with this workaround with my code yet - a test on a second codebase would be helpful though. if there are no objections i will ask gerolf to apply this patch (and remove it again should there be evidence that it breaks anything on another project). hopefully there will be another way with 1.5 to cope with transparent resolvers so this only is a matter of time 'til wicket is more robust on those use cases. best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LinkTree with IndicatingAjaxLink leaks
please create a jira issue with a quickstart -igor On Mon, May 12, 2008 at 9:24 AM, Philippe Laflamme <[EMAIL PROTECTED]> wrote: > > I'm using a customized LinkTree in one of my pages. The customisation to > LinkTree was made to use an IndicatingAjaxLink instead of an AjaxLink: > > final LinkTree tree = new LinkTree("tree", createTreeModel()) { > public MarkupContainer newLink(String id, final ILinkCallback > callback) { > return new IndicatingAjaxLink(id) { > public void onClick(AjaxRequestTarget target) { > callback.onClick(target); > } > }; > } > }; > > Works great, except that every time I clink on any of the links or whenever > a tree operation is executed (expdand or collapse a node), the > portion of the DOM tree gets a bunch of new
Re: encapsulation, extension and transparent resolvers
ive seen the issue, and your comment on it: "Jan Kriesten - 23/Apr/08 01:21 AM Just realized: Maybe it doesn't has to do anything with transparent resolvers at all but only with nested repeaters and adding cells from the innermost." so i am a little confused as to why we are talking about transparent resolvers, and why gerolf did not apply that code himself... personally i do not like to change code if it "maybe" helps, especially if it is markup parsing code which is a pretty fragile area in wicket. -igor On Mon, May 12, 2008 at 9:14 AM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi igor, > > > > > you want something done that we dont consider a priority and is not a > > quickie for us to fix, provide a patch. > > > > hello? if you'd taken a look at the jira, you'd seen that there _is_ a > patch. [1] > > my issues are surely not high priority for you - you're not affected by > them, so > i can understand. > > but since there _is_ a workaround which can be applied - why not doing so? > > i've taken a look at the datatable, sure it's not big. the point is, i > can't > just replace datatable but would have to go all the way down to the > AbstractDataGridView. also - all components like navigation + toolbars > would > have to be implemented as well... > > i'm not hacking, i'm using what wicket has got. in this case wicket's 'has > got' > isn't working. i know about that, i can live with that - when i'm able to > work > around those issues. and i can't at the moment cause i can't replace > MarkupFragmentFinder programatically. if i could do so i would happily > replace > that and all would be fine... > > best regards, --- jan. > > > [1] https://issues.apache.org/jira/browse/WICKET-1560 > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic user supplied parameters on wicket Link urls
Thanks Igor that works fine! - excellent support, more points for Wicket Igor Vaynberg wrote: class randomlink extends link { oncomponentntag(tag) { super.oncomponenttag(tag); string href=tag.getattrbutes().get("href"); href+="&uuid="+UUID.random(); tag.put("href", href); } } -igor On Mon, May 12, 2008 at 2:46 AM, JulesT <[EMAIL PROTECTED]> wrote: I have a page with dynamic links which is reused both in terms of the number of links and the model data behind them. The problem is that the browser 'link visited' concept is driven off the url and the wicket url contains indices. ie on subsequent same page requests the model data may change but the actual html link may have already been seen by the broswer on a previous page rendering. I want the 'link visited' concept to parallel the model data. I've overcome this on a previous web gui by adding a unique parameter in the link url hence the browser sees it as a new link. Being fairly new to Wicket (and liking it compared to what I've seen before!) I cant see how I can add a parameter with a dynamic value into the actual link html thats generated. Can anyone help? -- View this message in context: http://www.nabble.com/Dynamic-user-supplied-parameters-on-wicket-Link-urls-tp17184358p17184358.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks & regards, Julian Triggs Tel : 01925 752319 Mobile: 07963 992708
Terracotta and PatternValidator
Hi, I've come across a problem with the wicket-terracotta intergration. If you have a PatternValidator (like EmailAddressValidator) attached to an input then terracotta throws a non portable exception because java.util.regex.Pattern isnt in the additional-boot-jar-classes bit of the config xml. I tried to add this myself but it turns out that Pattern has loads of internal classes that it uses and so it is a pain. As PatternValidator is a wicket class it would seem that these changes should either go into the wicket-terracotta integration project's xml config or that the Pattern in PatternValidator should be made transient and the code adapted to take care of it. Has anyone else got round this problem? I'm thinking for now I should write my own Validator that does hold the Pattern object. Cheers Richard -- View this message in context: http://www.nabble.com/Terracotta-and-PatternValidator-tp17189868p17189868.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use AjaxFormChoiceComponentUpdatingBehavior in Check/CheckGroup
Is void onError(AjaxRequestTarget target, RuntimeException e) being called? On Mon, May 12, 2008 at 11:42 AM, Johan Compagner <[EMAIL PROTECTED]> wrote: > Code seems fine. What is the hrml output? > > On 5/12/08, freak182 <[EMAIL PROTECTED]> wrote: > > > > Hello, > > I having problem integrating AjaxFormChoiceComponentUpdatingBehavior. my > > code snippet: > > > > final WebMarkupContainer container = new WebMarkupContainer("wmc"); > > final CheckGroup chkGrp = new CheckGroup("chkGrp",new ArrayList()); > > > > final ListView list = new ListView("listBcs",listChk){ > > @Override > > protected void populateItem(ListItem item) { > > item.add(new > Check("fltId",item.getModel())); > > ... > > } > > }; > > > > chkGrp.add(new AjaxFormChoiceComponentUpdatingBehavior(){ > > @Override > > protected void onUpdate(AjaxRequestTarget target) > { > > System.out.println("here > AjaxFormChoiceComponentUpdatingBehavior"); > > > > target.addComponent(amtChk); > > target.addComponent(cntChk); > > } > > }); > > > > ...it not getting hit inside the onUpdate method..any idea.. > > Thanks a lot..Cheers > > > > > > -- > > View this message in context: > > > http://www.nabble.com/How-to-use-AjaxFormChoiceComponentUpdatingBehavior-in-Check-CheckGroup-tp17184651p17184651.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Ryan Gravener http://twitter.com/ryangravener
LinkTree with IndicatingAjaxLink leaks
I'm using a customized LinkTree in one of my pages. The customisation to LinkTree was made to use an IndicatingAjaxLink instead of an AjaxLink: final LinkTree tree = new LinkTree("tree", createTreeModel()) { public MarkupContainer newLink(String id, final ILinkCallback callback) { return new IndicatingAjaxLink(id) { public void onClick(AjaxRequestTarget target) { callback.onClick(target); } }; } }; Works great, except that every time I clink on any of the links or whenever a tree operation is executed (expdand or collapse a node), the portion of the DOM tree gets a bunch of new
Re: encapsulation, extension and transparent resolvers
hi johan, A whole story about bladiabla, but what is now the actual problem?? Why do you need transparant resolvers and why dont they work for you ? https://issues.apache.org/jira/browse/WICKET-1560 best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
hi igor, you want something done that we dont consider a priority and is not a quickie for us to fix, provide a patch. hello? if you'd taken a look at the jira, you'd seen that there _is_ a patch. [1] my issues are surely not high priority for you - you're not affected by them, so i can understand. but since there _is_ a workaround which can be applied - why not doing so? i've taken a look at the datatable, sure it's not big. the point is, i can't just replace datatable but would have to go all the way down to the AbstractDataGridView. also - all components like navigation + toolbars would have to be implemented as well... i'm not hacking, i'm using what wicket has got. in this case wicket's 'has got' isn't working. i know about that, i can live with that - when i'm able to work around those issues. and i can't at the moment cause i can't replace MarkupFragmentFinder programatically. if i could do so i would happily replace that and all would be fine... best regards, --- jan. [1] https://issues.apache.org/jira/browse/WICKET-1560 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use AjaxFormChoiceComponentUpdatingBehavior in Check/CheckGroup
Code seems fine. What is the hrml output? On 5/12/08, freak182 <[EMAIL PROTECTED]> wrote: > > Hello, > I having problem integrating AjaxFormChoiceComponentUpdatingBehavior. my > code snippet: > > final WebMarkupContainer container = new WebMarkupContainer("wmc"); > final CheckGroup chkGrp = new CheckGroup("chkGrp",new ArrayList()); > > final ListView list = new ListView("listBcs",listChk){ > @Override > protected void populateItem(ListItem item) { > > item.add(new Check("fltId",item.getModel())); > ... > } > }; > > chkGrp.add(new AjaxFormChoiceComponentUpdatingBehavior(){ > @Override > protected void onUpdate(AjaxRequestTarget target) { > System.out.println("here > AjaxFormChoiceComponentUpdatingBehavior"); > > target.addComponent(amtChk); > target.addComponent(cntChk); > } > }); > > ...it not getting hit inside the onUpdate method..any idea.. > Thanks a lot..Cheers > > > -- > View this message in context: > http://www.nabble.com/How-to-use-AjaxFormChoiceComponentUpdatingBehavior-in-Check-CheckGroup-tp17184651p17184651.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
A whole story about bladiabla, but what is now the actual problem?? Why do you need transparant resolvers and why dont they work for you ? On 5/12/08, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi martijn, > > > I don't do that. I pose that it is very easy to say that feature X > > must be implemented when you don't have to do anything yourself in > > supporting feature X. > > i don't want a new feature. the point is wicket's implementation of > transparent > resolvers has it's troubles making it hard to use it to implement extension > to > (default) components (due to encapsulation). > > all i ask is to get a workaround until there might be a new implementation > of > how transparent resolvers work. > > > It is a matter of fact: should we support this or not. > > as i said, it's not a question of to support it, it's a matter of 'we can't > fix > it atm, but there's a way we could fix a problem for now'... > > regards, --- jan. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic user supplied parameters on wicket Link urls
class randomlink extends link { oncomponentntag(tag) { super.oncomponenttag(tag); string href=tag.getattrbutes().get("href"); href+="&uuid="+UUID.random(); tag.put("href", href); } } -igor On Mon, May 12, 2008 at 2:46 AM, JulesT <[EMAIL PROTECTED]> wrote: > > I have a page with dynamic links which is reused both in terms of the number > of links and the model data behind them. The problem is that the browser > 'link visited' concept is driven off the url and the wicket url contains > indices. ie on subsequent same page requests the model data may change but > the actual html link may have already been seen by the broswer on a previous > page rendering. I want the 'link visited' concept to parallel the model > data. I've overcome this on a previous web gui by adding a unique parameter > in the link url hence the browser sees it as a new link. > > Being fairly new to Wicket (and liking it compared to what I've seen > before!) I cant see how I can add a parameter with a dynamic value into the > actual link html thats generated. Can anyone help? > -- > View this message in context: > http://www.nabble.com/Dynamic-user-supplied-parameters-on-wicket-Link-urls-tp17184358p17184358.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: London Wicket Event - June 4th, at Google UK
Here's an update on our June 4th, London Wicket Event at Google (more details on our "Wicket In Action" draw etc ... in my original post, pasted below): http://faler.wordpress.com/ Wille Faler is going to talk about using the "Open Session In View" pattern with Wicket (I've just been over his high-level plan and this promises to be quite an instructive presentation, covering some "real-world"/practical issues. http://www.richard-wilkinson.co.uk/ Richard Wilkinson is going to show us a Wicket "Google Maps overlay" panel. http://herebebeasties.com Al Maw will be performing his usual magic (but possibly on a slightly different scale ...). Time permitting, I'll show you how to use Select and SelectOption when DropDownChoice doesn't give you enough control (ie if you want each option displayed with a different style). I'm also putting together a Wicket front end to a Drools Sudoku solver (that I may commit back to the Drools project later), but that will probably have to wait until our August (probably 6th) event. You know where to http://jweekend.co.uk/dev/LWUGReg/ register and http://jweekend.com/dev/ContactUsBody/ contact us if you'd like to give us a presentation too. Regards - Cemal http://jweekend.co.uk http://jWeekend.co.uk PS Eelco, thanks for that. This does demand quite a bit more commitment than we envisaged at first but as long as we're still enjoying it and getting great, appreciative feedback we'll keep going here in London and maybe even help sponsor something on a more international level when the time is right. Any ideas are more than welcome. I am still keen to get some of the other core developers to join us at some point - our guests would appreciate that too. And again it is very nice of you guys to organize this, and of Google to host. Thanks! Eelco I'm pleased to confirm that our next London Wicket Event will be held on June 4th, again at Google's London offices. We've been attracting a really nice crowd as well as encouraging and very positive feedback/reviews. If you' like to come along register (early) at http://jweekend.com/dev/LWUGReg/ the usual place . I expect we will have 3 or 4 presentations this time, most likely from Al, myself and a couple of you that have already proposed some interesting topics (remember we are always interested in hearing from you if you'd like to have a go too). I'll confirm details, hopefully in the next few days, when I have fixed the schedule. We will have our regular free draw for Martijn and Eelco's Wicket In Action (MEAP). Regards - Cemal http://jWeekend.co.uk -- View this message in context: http://www.nabble.com/London-Wicket-Event---June-4th%2C-at-Google-UK-tp17071445p17189802.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
a simple fact of the matter here is that datatable was not designed to show two rows per item, it is designed to show tabular data where each item is represented by a single row and a set of columns. you are trying to hack it to show two rows per item by using transparent resolvers - which were not meant to be used that way. so why should we "support" this? furthermore, starting from scratch is not a big deal. its now like you are writing the whole thing from scratch. DataTable itself is a pretty small class ( ~300 lines with our whitespace friendly formatter ). The nice thing about Wicket is that when you rewrite DataTable you get to reuse everything that it itself builds ont, that is why the original is a small class. we can even further factor out things like toolbar container/management out of it if you would bother to create an rfe. finally, supporting this usecase is not high on our priority list. we are madly trying to finish 1.4 so we can move on to 1.5 where we can start breaking api and possibly even getting rid of the transparentresolver completely and replace it with something that works better. so i dont see why you are making such a stink about this. we've got very limited resources that we are working with here. you want something done that we dont consider a priority and is not a quickie for us to fix, provide a patch. -igor On Mon, May 12, 2008 at 2:08 AM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm getting a bit frustrated concerning wicket's encapsulation + > extensibility, especially when it comes to transparent resolvers. > > There are a couple of nice features which are dependend on other > Components. Just extending/customizing them is nearly impossible when it > comes to unthought usecases. > > Such usecases - when described - are turned down by statements 'You are > using it in an improper way, rethink your data access model.' or 'When it > comes to transparent resolvers, you are on your own - implement it from > scratch without them'. > > In the latter, 'implement it from scratch' has significant tradeoffs: My > case is implementing a DataTable with some add-on features which need make > use of an transparent resolver. The encapsulation of the contained > DataGridView with DataTable leaves me no option (except doing it from > scratch). If I would implement a DataTable myself, I'd have to create all > Components expecting a DataTable as parameter again: That just contradics > Wicket's reusable components approach. > > As responsive + well supported as Wicket is (I really like that a lot - and > am thankful for the work the dev team is doing) - if unthought usecases > occur the team is frequently denying that such usecases are valid and > wouldn't bring Wicket a step further. > > I know transparent resolvers are currently a major issue and can't be > really handled in a proper way due to the hierarchy concept. But if things > can be fixed with a workaround (until a new transparent resolver model is > established) and which has no impact on the overall functionality - why > can't that make it into wicket? The 'We wont support this' dogma isn't > really proper argumentation. > > Best regards, --- Jan. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.4 Generics
there is no need for a separate annots project since the entire codebase is now on java5, so annots was merged into wicket-spring -igor On Mon, May 12, 2008 at 2:30 AM, Andre Prasetya <[EMAIL PROTECTED]> wrote: > thanks, how about the wicket-spring-annot ? > > http://repo1.maven.org/maven2/org/apache/wicket/wicket-spring-annot/ > > is the 1.3.3 version compatible with the 1.4-m1 ? > > > Frank Bille wrote: > > > http://repo1.maven.org/maven2/org/apache/wicket/wicket-spring/1.4-m1/ > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: persistent sessions in Tomcat
do you get any serialization errors in your logs, you might be trying to store something non serializable in the wicket component. -igor On Mon, May 12, 2008 at 1:09 AM, ElSe <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm just started experiments with Wicket so I suppose my question is stupid > however I haven't found the answer on the forum. > > The point was to understand how to organize persistent sessions for the > wicket application. It seemed to me that such application should work with > the standard Tomcat mechanism transparently as any other servlet. > So I have written simple wicket application - just two pages that show > sessionid, configured Tomcat persistent manager and started session. Then I > restarted the server and tried to pass from one page to another waiting to > see the same sessionid. But I have seen "page has expired". > Should I provide some serialization support in my application or there is > some error in my logic or there aren't such possibility and I "want > something strange"(c)? > > BR > -- > View this message in context: > http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17183181.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Bug introduced somewhere after 1.2.2 is still in 1.3.3
I added https://issues.apache.org/jira/browse/WICKET-1621 to say that the Component Example for RadioGroup, which contains a ListView of Form components, ought to call #setReuseItems(true). The example as written works, of course, but not when I put two such RadioGroups on the page. A person who adapts the examples without reading the JavaDoc can get into trouble, as I did. /Frank -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 12:52 PM To: users@wicket.apache.org Subject: Re: Bug introduced somewhere after 1.2.2 is still in 1.3.3 call setReuseItems(true) on the listview that contains radio components. javadoc of listview recommends this for listviews inside forms that contain formcomponents. -igor On Thu, May 8, 2008 at 1:49 PM, Frank Silbermann <[EMAIL PROTECTED]> wrote: > Here's the URL of my jira issue. > > https://issues.apache.org/jira/browse/WICKET-1601 > > The issue has attached a quickstart project and a screen print. > > -Original Message- > From: Igor Vaynberg [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 08, 2008 12:13 PM > To: users@wicket.apache.org > Subject: Re: Bug introduced somewhere after 1.2.2 is still in 1.3.3 > > On Thu, May 8, 2008 at 10:06 AM, Frank Silbermann > <[EMAIL PROTECTED]> wrote: >> I wrote earlier about my problems going from Wicket 1.2.2 to Wicket >> 1.2.6. This has to do with a RadioGroup component that I built; >> whenever I used it on more than one page, clicking on one RadioGroup >> caused the marker to disapper from all the other RadioGroups on the >> page. >> >> I wasn't given much help because Wicket 1.2 is end-of-life. Today I > >> tried the example on Wicked 1.3.3. I downloaded the QuickStart >> application for Wicket 1.3.3, installed an upgraded version of my >> RadioGroup component, modified the home page to show my RadioGroup >> panel twice, and the bad behavior is still there. >> >> By the way, the only change in the generated HTML that I could see >> was that in Wicket 1.2.2 the buttons were defined: >> >> > >> -- with the numbers starting over again for each RadioGroup, whereas >> in Wicket 1.2.6 and Wicket 1.3.3 it was more like: >> >> > >> with the numbers _not_ starting over for each RadioGroup. Clicking >> on one radio group causes the marker to disappear from the other >> radio group -- as if part of Wicket were treating the buttons as >> though they all belonged to the same radio group. >> >> I'd like the Wicket 1.3 developers either to fix the bug in a future > >> release (after which I'll upgrade my entire application to 1.3), or >> tell me what I'm doing wrong. How do I get the process started? > > the usual way, create a jira issue and attach a quickstart project > that demonstrates the problem. than post the jira url back into this thread. > it is not very helpful when you post huge fragments of code and markup > into an email. > > -igor > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
On Mon, May 12, 2008 at 8:42 AM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi martijn, > > > > > md5sum for the concatenated string? Though the calculation may be > > costly and there could be false cache hits. > > > > looking at the length of the strings and their composition... i doubt that > md5 would lead to false cache hits... There's always the chance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxLazyLoadPanel question
got ya. yeah I eventually figure that is what had to happen to make it work correctly. I was trying to make it do something that it was not meant to do. When I put everything in a panel it all worked prefectly. Thanks T Johan Compagner wrote: > > just to make it more clear to you > > AjaxLazyLoadPanel == a Panel == Own markup > > so what you have is not possible > > you can have that code just fine in lazy load panel but the panel must > have > its own markup > that is this: > > > >option 1 >option 2 > > > > > > > > On Mon, May 5, 2008 at 4:51 PM, taygolf <[EMAIL PROTECTED]> wrote: > >> >> Hey guys, >> >> I have a question about the lazyloadpanel. I have a modal window. in that >> modal window I have a form with a ListChoice and an ajaxbutton. What I >> want >> to do is have the entire modal window or the entire form lazyload. the >> ListChoice can be very large sometime and I want do not want the page to >> load until I have the executed the quesry that populates the listchoice >> and >> saved the values in it. >> >> I tried to create a div for the ajaxlazyloadpanel and simply put all the >> code for the page in the allp but this did not work. >> >> What do I need to do to make this happen? I don't know if I am just >> confused >> about how this works or what. I have looked at the example on wicket >> stuff >> but I am still confused >> >> Here is the code I want to wrap in an ajaxlazyloadpanel: >> >> final ListChoice list = createList(); >> >> Form form = new Form("form"); >> form.add(list); >> final AjaxButton ajx = new AjaxButton("asubmit",form) { >>protected void onSubmit(AjaxRequestTarget target, Form form) { >>window.setWindowClosedCallback(new >> ModalWindow.WindowClosedCallback(){ >>public void onClose(AjaxRequestTarget target) { >>targetField.setModelObject(list.getValue()); >>target.addComponent(targetField); >>} >>}); >>window.close(target); >>} >> }; >> form.add(ajx); >> add(form); >> >> >> >> >> >> >> >>option 1 >>option 2 >> >> >> >> >> >> >> >> >> >> Thanks for the help >> >> T >> -- >> View this message in context: >> http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17063419.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17186908.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
hi martijn, md5sum for the concatenated string? Though the calculation may be costly and there could be false cache hits. looking at the length of the strings and their composition... i doubt that md5 would lead to false cache hits... regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: After Upload File via ModalWindow and IFrame, the TreeModels UserOject Attributes are null
no one has a idea? -- View this message in context: http://www.nabble.com/After-Upload-File-via-ModalWindow-and-IFrame%2C-the-TreeModels-UserOject-Attributes-are-null-tp16936673p17186772.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
hi martijn, I don't do that. I pose that it is very easy to say that feature X must be implemented when you don't have to do anything yourself in supporting feature X. i don't want a new feature. the point is wicket's implementation of transparent resolvers has it's troubles making it hard to use it to implement extension to (default) components (due to encapsulation). all i ask is to get a workaround until there might be a new implementation of how transparent resolvers work. It is a matter of fact: should we support this or not. as i said, it's not a question of to support it, it's a matter of 'we can't fix it atm, but there's a way we could fix a problem for now'... regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
hi johan, a reall UUID? that cant be then all the keys would change constantly... right, didn't took that into account. still, having a a component-id calculated on the path information and e.g. using a md5 only once for that would shorten things (with the benefit of "don't repeat yourself" in different locations of wicket... regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
md5sum for the concatenated string? Though the calculation may be costly and there could be false cache hits. Martijn On 5/12/08, Johan Compagner <[EMAIL PROTECTED]> wrote: > a reall UUID? > > that cant be > then all the keys would change constantly... > The point is that the paths of components on a page class are quite stable > and for those the keys are stored > If we use UUID for those then every key would be different for the "same" > component on a page class > > The thing is that it must be stable for a page.component... (and re > occuring) > > johan > > > On Mon, May 12, 2008 at 2:22 PM, Jan Kriesten <[EMAIL PROTECTED]> > wrote: > > > > > > hi johan, > > > > and that would walk over the hierarchy.. how would that help? > > > > > > > no, not walk the hierarchy, that wouldn't be that better (but at least it > > wouldn't be recompiled every access). > > > > but you could just use a static getNextUid like you do at other places as > > well (and that could be used as a stable id for repeaters as well btw). > > > > also getInputName is a bit smarter. That can stop with the first form it > > > finds. Because an input name only have to be unique for the form. > > > > > > > actually, on genereated forms this really get sick long ids as well which > > doen't look nice in the html output at all. i can show you... ;-) > > > > best regards, --- jan. > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
On 5/12/08, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > > The 'We wont support this' dogma isn't really proper argumentation. > > Are you providing the 24x7 free support then? > > > > that's actually not the point, is it? i'm trying to help out on the irc > channel as well as good as i can. so you can't claim that all yourself. I don't do that. I pose that it is very easy to say that feature X must be implemented when you don't have to do anything yourself in supporting feature X. > just get back to serious discussion and don't hide behind this statement > you're repeating over and over. It is a matter of fact: should we support this or not. Support takes time and effort. Failing to acknowledge that and telling us that valuing our own time and effort is not an argument is a serious disrespect IMO. > as i stated, i really appreciate your work - but that doesn't mean one > isn't allowed to formulate (light) criticism. Criticism is fine, but disregarding a valid argument because you don't have to maintain it yourself is not. Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
a reall UUID? that cant be then all the keys would change constantly... The point is that the paths of components on a page class are quite stable and for those the keys are stored If we use UUID for those then every key would be different for the "same" component on a page class The thing is that it must be stable for a page.component... (and re occuring) johan On Mon, May 12, 2008 at 2:22 PM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi johan, > > and that would walk over the hierarchy.. how would that help? > > > > no, not walk the hierarchy, that wouldn't be that better (but at least it > wouldn't be recompiled every access). > > but you could just use a static getNextUid like you do at other places as > well (and that could be used as a stable id for repeaters as well btw). > > also getInputName is a bit smarter. That can stop with the first form it > > finds. Because an input name only have to be unique for the form. > > > > actually, on genereated forms this really get sick long ids as well which > doen't look nice in the html output at all. i can show you... ;-) > > best regards, --- jan. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: encapsulation, extension and transparent resolvers
hi martijn, The 'We wont support this' dogma isn't really proper argumentation. Are you providing the 24x7 free support then? that's actually not the point, is it? i'm trying to help out on the irc channel as well as good as i can. so you can't claim that all yourself. just get back to serious discussion and don't hide behind this statement you're repeating over and over. as i stated, i really appreciate your work - but that doesn't mean one isn't allowed to formulate (light) criticism. regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
hi johan, and that would walk over the hierarchy.. how would that help? no, not walk the hierarchy, that wouldn't be that better (but at least it wouldn't be recompiled every access). but you could just use a static getNextUid like you do at other places as well (and that could be used as a stable id for repeaters as well btw). also getInputName is a bit smarter. That can stop with the first form it finds. Because an input name only have to be unique for the form. actually, on genereated forms this really get sick long ids as well which doen't look nice in the html output at all. i can show you... ;-) best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encapsulation, extension and transparent resolvers
On 5/12/08, Jan Kriesten <[EMAIL PROTECTED]> wrote: > The 'We wont support this' dogma isn't really proper argumentation. Are you providing the 24x7 free support then? Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
and that would walk over the hierarchy.. how would that help? also getInputName is a bit smarter. That can stop with the first form it finds. Because an input name only have to be unique for the form. johan On Mon, May 12, 2008 at 1:02 PM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi johan, > > So how to make those keys unique enough? > > > > getParent().getClass().getName() + getParent().getId() + > > getClass().getName() + getId() + getLocale() + getStyle() ?? > > > > i'd suggest component implementing a lazy componentUID - that could then > also be used by getInputName for identification purpose. > > this way, the whole walk-the-hierachy-to-get-me-a-component-id stuff could > be much more friendly... > > regards, --- jan. > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Load serialized (or in session) page/model on refresh..
On Mon, May 12, 2008 at 12:40 AM, mfs <[EMAIL PROTECTED]> wrote: > > > Mr Mean wrote: > > > > On Sun, May 11, 2008 at 9:04 AM, mfs <[EMAIL PROTECTED]> wrote: > >> > >> Guys, > >> > >> Firstly, Is that a right understanding that doing a browser-refresh of > >> the > >> page would result in a new instance of the page being created everytime > >> and > >> similarly a new model instance would be binded to the page. > > > > Only if the page is stateless or if the url you refresh is a bookmarkable > > url. > > Otherwise the page instance is reused. > > > > First, just to be sure, you mean BOTH, page-instance AND model-instance > > will be re-used ? Yes both will be reused, however components like dataview can recreate child components and the IDataProvider supplies them with a new model every time. > > Assuming the first is true, the rule is to make the pages non-bookmarkable > > (i.e. non- public constructors) ? in order to re-use the instance...but > > that alone wouldnt work..right one has to use the appropriate > > url-coding-strategy like u and johan suggested > > (HyBridURLCodingStrategy)..right ? > The constructor just make it possible to use the page as bookmarkable, It is things like BookMarkablePageLink (and possibly the mount strategy) that facilitate the bookmarkability of pages. I hardly ever use a mountstrategy so i can't say much about those. > > > > > > >> Is there a way one can use the same version of the page/model (which > >> wicket > >> kept in the session) when the page was rendered the first time.. > > > > See previous answer. > > > > See my response to Johan's post, i tried using HybridURLCodingStrategy but > > unfortunately, that still doesnt work...any clue.. > This is getting a bit confusing you are talking about models where i think you mean idataprovider. Even is the page instance is being reused it is in the nature of the dataview to requery the provider. You could do as Jonathan suggests and store the list outside the provider but as he already pointed out you loose a lot if you do that. Maurice > > > >> > >> I would want to avoid a hit to the database on refresh (since my model > >> construction requires so) > >> -- > >> View this message in context: > >> > http://www.nabble.com/Load-serialized-%28or-in-session%29-page-model-on-refresh..-tp17170105p17170105.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > Maurice > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Load-serialized-%28or-in-session%29-page-model-on-refresh..-tp17170105p17178903.html > > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
hi johan, So how to make those keys unique enough? getParent().getClass().getName() + getParent().getId() + getClass().getName() + getId() + getLocale() + getStyle() ?? i'd suggest component implementing a lazy componentUID - that could then also be used by getInputName for identification purpose. this way, the whole walk-the-hierachy-to-get-me-a-component-id stuff could be much more friendly... regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
yeah the current impl just generates the full path This could be a problem if you have a lot of components in a repeater that also hit the localizer.. the problem is that a key for a component X can return a different thing then that same key for component Y.. So how to make those keys unique enough? getParent().getClass().getName() + getParent().getId() + getClass().getName() + getId() + getLocale() + getStyle() ?? Would that be unique enough? The problem is that combination could be added to 2 different panels that have there own properties and then it that panel is the unique part... But i just found a bit of leak, that is causing the problem of the first email The page was as far as i can see also added... Thats really wrong.. Then it would really grow and grow, but everybody should see this.. Weird.. johan On Mon, May 12, 2008 at 11:44 AM, Iman Rahmatizadeh < [EMAIL PROTECTED]> wrote: > Is there any way to make getCacheKey() return smaller keys ? Those huge > keys > are consuming a lot of memory and also the equals/hashcode check on the > key > will take resources. > > On Mon, May 12, 2008 at 12:33 PM, Johan Compagner <[EMAIL PROTECTED]> > wrote: > > > i guess you have a loads of null values somehow > > Dont know why in your situation you have soo many of those. > > > > What you could do is this in the init of your application: > > > > Localizer localizer = new Localizer() > > { > > protected void putIntoCache(final String cacheKey, final String string) > > { > > if (string != null) super.putIntoCache(cacheKey,string); > > } > > }; > > getResourceSettings().setLocalizer(localizer); > > > > this way you dont cache null values at all, only your real values. > > If null values are asked a lot this could be slower ofcourse.. > > > > > > I will also open up Localizer api a bit more so that you can override > the > > cache that is used: > > > > /** > > * Create a new cache, override this method if you want a different > map > > to store the cache keys, > > * for example a map that hold only the last X number of elements.. > > * > > * By default it uses the [EMAIL PROTECTED] ConcurrentHashMap} > > * > > * @return cache > > */ > >protected Map newCache() > >{ > >return new ConcurrentHashMap(); > >} > > > > You could return there a map that evicts on the least recently used > then. > > > > johan > > > > > > > > On Mon, May 12, 2008 at 9:41 AM, Quan Zhou <[EMAIL PROTECTED]> wrote: > > > > > Thanks iman. > > > > > > I explore many CocurrentHashMap$Entry to check its key/value. > > > I truly found two things: > > > 1. some key is large , its length would be more than 300 if the > > component > > > has deep hierachy.That must be one of the reasons why Localizer is so > > big. > > > 2. the number of this object is large too. there're 2,863,559 entrys. > I > > > couldn't check the whole objects one by one.but i was wondering > > > why there're too many Entrys. There are about 2000 java files at > most > > in > > > my app, and no more than 500 wicket page/components with 2 > > >properties files , 1 html files in average. It means there are not > > > huge > > > properties or name that needs to retain in heapze ,so what things > > > would those 2,863,559 entries supposed to contain? > > > > > > Is there any settings can control the limit of Entry size?or some > > strategy > > > can reduce the key name of the entry? > > > > > > > > > 2008/5/12 Iman Rahmatizadeh <[EMAIL PROTECTED]>: > > > > > > > Well actually I haven't :-) My localizer gets quite large, but it > > hasnt > > > > made > > > > any problems, yet . > > > > You see when the localizer wants to find the resource value for a > > > specific > > > > key, it caches the result into the localizer. Now if your component > > has > > > a > > > > deep hierarchy, the generated key will be quite large. In yourkit , > > use > > > > the > > > > object explorer to explore the ConcurrentHashMap entries and see why > > are > > > > they so large, as I think the number of entries in the cache is > > limited, > > > > So > > > > the only explanation would be to see why are the key/values taking > so > > > much > > > > space. If you can give a dump of one of the bigger key/values we can > > > help > > > > more. > > > > Also the DiskPageStore doesnt hold on to anything in memory, so it > > wont > > > > consume any memory, nothing strange about it. > > > > > > > > Iman > > > > > > > > On Mon, May 12, 2008 at 9:31 AM, Quan Zhou <[EMAIL PROTECTED]> > > wrote: > > > > > > > > > Thanks for your all replys. > > > > > > > > > > I review the dump file with both SAP MemoryAnalyzer and YourKit > > > > > They all show the same hierachy as follows: > > > > > > > > > > -org.apache.wicket.settings.Settings > > > > > - org.apache.wicket.Localizer > > > > > - org.apache.wicket.util.concurrent.ConcurrentHashMap > > > > > - org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry > > > > > > > > > > Localizer Object retaind 87
Re: Why Localizer Retained so many heapsize?
no the api is just opened up to be able to create your own map impl I can change it to be ICache. But the localizer currently just needs a Map thats a pretty common thing to have. But i agree wit that contains call. thats just double up because if it is we have too look it up again. I will remove it. On Mon, May 12, 2008 at 11:39 AM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi johan, > > why? > > we just have a protected factory method now for a cache implementation > > that > > must be a map. > > > > if you open up the api to change the implementation of the cache - there > are other implementations than map... why limit it to map? (actually, I > don't really understand the cache.containsKey(cacheKey) at all since it > could just be checked for null when getting the value)... > > > best regards, --- jan. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Overriding panel markup: close tag not found for tag
So in your page you are doing exactly the same as Palette, i.e. you are adding all the components, headers, etc ? Just because you want to have different markup. Then why don't you create your own Palette and use fragments to change the markup, that certainly is a lot code friendlier then repeating yourself every time. However it is odd the close tag can not be found. Maurice On Mon, May 12, 2008 at 9:13 AM, Martin Makundi <[EMAIL PROTECTED]> wrote: > But why does it seem to work with FeedbackPanel? I want just that. A > fragment I understand just means providing optional markups. That is > not exactly what I want because every realization is different. > > ** > Martin > > 2008/5/12 Eelco Hillenius <[EMAIL PROTECTED]>: > > > > > Instead, I want the MyPage.html to contain the panel markup: In a > > > similar manner to how the feedbackpanel markup is given in that > > > example in the book "created the component component structure inside > > > the page". > > > > You should use a Fragment instead of a Panel in that case. > > > > Eelco > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use AjaxFormChoiceComponentUpdatingBehavior in Check/CheckGroup
Hello, I having problem integrating AjaxFormChoiceComponentUpdatingBehavior. my code snippet: final WebMarkupContainer container = new WebMarkupContainer("wmc"); final CheckGroup chkGrp = new CheckGroup("chkGrp",new ArrayList()); final ListView list = new ListView("listBcs",listChk){ @Override protected void populateItem(ListItem item) { item.add(new Check("fltId",item.getModel())); ... } }; chkGrp.add(new AjaxFormChoiceComponentUpdatingBehavior(){ @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println("here AjaxFormChoiceComponentUpdatingBehavior"); target.addComponent(amtChk); target.addComponent(cntChk); } }); ...it not getting hit inside the onUpdate method..any idea.. Thanks a lot..Cheers -- View this message in context: http://www.nabble.com/How-to-use-AjaxFormChoiceComponentUpdatingBehavior-in-Check-CheckGroup-tp17184651p17184651.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
hi johan, we just have a protected factory method now for a cache implementation that must be a map. another point to that: why not expecting a general cache implementation as you do with MarkupCache.ICache ? best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic user supplied parameters on wicket Link urls
I have a page with dynamic links which is reused both in terms of the number of links and the model data behind them. The problem is that the browser 'link visited' concept is driven off the url and the wicket url contains indices. ie on subsequent same page requests the model data may change but the actual html link may have already been seen by the broswer on a previous page rendering. I want the 'link visited' concept to parallel the model data. I've overcome this on a previous web gui by adding a unique parameter in the link url hence the browser sees it as a new link. Being fairly new to Wicket (and liking it compared to what I've seen before!) I cant see how I can add a parameter with a dynamic value into the actual link html thats generated. Can anyone help? -- View this message in context: http://www.nabble.com/Dynamic-user-supplied-parameters-on-wicket-Link-urls-tp17184358p17184358.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
Is there any way to make getCacheKey() return smaller keys ? Those huge keys are consuming a lot of memory and also the equals/hashcode check on the key will take resources. On Mon, May 12, 2008 at 12:33 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: > i guess you have a loads of null values somehow > Dont know why in your situation you have soo many of those. > > What you could do is this in the init of your application: > > Localizer localizer = new Localizer() > { > protected void putIntoCache(final String cacheKey, final String string) > { > if (string != null) super.putIntoCache(cacheKey,string); > } > }; > getResourceSettings().setLocalizer(localizer); > > this way you dont cache null values at all, only your real values. > If null values are asked a lot this could be slower ofcourse.. > > > I will also open up Localizer api a bit more so that you can override the > cache that is used: > > /** > * Create a new cache, override this method if you want a different map > to store the cache keys, > * for example a map that hold only the last X number of elements.. > * > * By default it uses the [EMAIL PROTECTED] ConcurrentHashMap} > * > * @return cache > */ >protected Map newCache() >{ >return new ConcurrentHashMap(); >} > > You could return there a map that evicts on the least recently used then. > > johan > > > > On Mon, May 12, 2008 at 9:41 AM, Quan Zhou <[EMAIL PROTECTED]> wrote: > > > Thanks iman. > > > > I explore many CocurrentHashMap$Entry to check its key/value. > > I truly found two things: > > 1. some key is large , its length would be more than 300 if the > component > > has deep hierachy.That must be one of the reasons why Localizer is so > big. > > 2. the number of this object is large too. there're 2,863,559 entrys. I > > couldn't check the whole objects one by one.but i was wondering > > why there're too many Entrys. There are about 2000 java files at most > in > > my app, and no more than 500 wicket page/components with 2 > >properties files , 1 html files in average. It means there are not > > huge > > properties or name that needs to retain in heapze ,so what things > > would those 2,863,559 entries supposed to contain? > > > > Is there any settings can control the limit of Entry size?or some > strategy > > can reduce the key name of the entry? > > > > > > 2008/5/12 Iman Rahmatizadeh <[EMAIL PROTECTED]>: > > > > > Well actually I haven't :-) My localizer gets quite large, but it > hasnt > > > made > > > any problems, yet . > > > You see when the localizer wants to find the resource value for a > > specific > > > key, it caches the result into the localizer. Now if your component > has > > a > > > deep hierarchy, the generated key will be quite large. In yourkit , > use > > > the > > > object explorer to explore the ConcurrentHashMap entries and see why > are > > > they so large, as I think the number of entries in the cache is > limited, > > > So > > > the only explanation would be to see why are the key/values taking so > > much > > > space. If you can give a dump of one of the bigger key/values we can > > help > > > more. > > > Also the DiskPageStore doesnt hold on to anything in memory, so it > wont > > > consume any memory, nothing strange about it. > > > > > > Iman > > > > > > On Mon, May 12, 2008 at 9:31 AM, Quan Zhou <[EMAIL PROTECTED]> > wrote: > > > > > > > Thanks for your all replys. > > > > > > > > I review the dump file with both SAP MemoryAnalyzer and YourKit > > > > They all show the same hierachy as follows: > > > > > > > > -org.apache.wicket.settings.Settings > > > > - org.apache.wicket.Localizer > > > > - org.apache.wicket.util.concurrent.ConcurrentHashMap > > > > - org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry > > > > > > > > Localizer Object retaind 87.84% HeapSize. while the DiskPageStore > only > > > > retained 0.71% > > > > That's weird,isn't it? > > > > > > > > I decrease the max heapsize settings to 50M, and make a load test > then > > > > monitor the memory allocation. > > > > It indeed allocated more and more char[] objects time by time. > > > > > > > > Iman,how do you solve your problem at last? > > > > could you share some experience with me ? Thank you very much. > > > > > > > > 2008/5/10 Iman Rahmatizadeh <[EMAIL PROTECTED]>: > > > > > > > > > I've seen this before, altough it wasnt 2GB, but in a small 70MB > > heap > > > > dump > > > > > the cache size was around 25MB. The ConcurrentHashMap caches a lot > > of > > > > > unneeded string keys, where the keys are quite large, maybe > strings > > of > > > > size > > > > > 1k characters, like key : > > > > > > > > > > > > > > > > > > > > "org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1:rows-ir.co.meraat.avicenna.web.components.AvicennaDataTable$InnerDataTable:inner-table-ir.co.meraat.avicenna.web.components.AvicennaDataTable$1:filter-form-ir.co.meraat.avicenna.web.components.AvicennaDataTable:table-ir.co.mer
Re: Why Localizer Retained so many heapsize?
hi johan, why? we just have a protected factory method now for a cache implementation that must be a map. if you open up the api to change the implementation of the cache - there are other implementations than map... why limit it to map? (actually, I don't really understand the cache.containsKey(cacheKey) at all since it could just be checked for null when getting the value)... best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.4 Generics
merged On Mon, May 12, 2008 at 11:30 AM, Andre Prasetya <[EMAIL PROTECTED]> wrote: > thanks, how about the wicket-spring-annot ? > > http://repo1.maven.org/maven2/org/apache/wicket/wicket-spring-annot/ > > is the 1.3.3 version compatible with the 1.4-m1 ? > > Frank Bille wrote: > > > http://repo1.maven.org/maven2/org/apache/wicket/wicket-spring/1.4-m1/ > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Why Localizer Retained so many heapsize?
why? that cache will be used now and there in the localizer. Because we also have support for not caching at all and then we have to test the cache if it is null we just have a protected factory method now for a cache implementation that must be a map. johan On Mon, May 12, 2008 at 11:15 AM, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > hi johan, > > I will also open up Localizer api a bit more so that you can override the > > cache that is used: > > > > please make sure, that you also remove the direct access on the cache to > check if it contains a certain key: > > // Value not found are cached as well (value = null) > if ((cacheKey != null) && cache.containsKey(cacheKey)) > > > Best regards, --- Jan. > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Wicket 1.4 Generics
thanks, how about the wicket-spring-annot ? http://repo1.maven.org/maven2/org/apache/wicket/wicket-spring-annot/ is the 1.3.3 version compatible with the 1.4-m1 ? Frank Bille wrote: http://repo1.maven.org/maven2/org/apache/wicket/wicket-spring/1.4-m1/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket Web Beans autocomplete field
Hi all, I have a question regarding Wicket Web Beans (WWB). I know this may be slightly OT, but since the wwb mailing list does not see a lot of traffic these days, I figured I might as well post this here... I introduced a new WWB field, basically an InputField with an added AjaxAutocompleteBehavior (from wicket-contrib-scriptacolous). When I use that field in a BeanForm, I have the following problem: When the user selects a value from the autocomplete dropdown, the correcponding InputField is correctly updated with the new value, then immediately changes back to the old user input. About every 10th time or so it works just fine... Somehow the field value seems to refresh before the new autocompleted value is written to the model. Any ideas on how to make this work correctly? Thanks for the help... -stephan Code for the Autocomplete field is below, its just a slightly modified InputField from wwb. public abstract class AbstractAutoCompleteField extends AbstractField { /** * * @param id the Wicket id for the editor. * @param model the model. * @param metaData the meta data for the property. * @param viewOnly true if the component should be view-only. */ public AbstractAutoCompleteField(String id, IModel model, ElementMetaData metaData, boolean viewOnly) { super(id, model, metaData, viewOnly); boolean advOnEnter = metaData.getBooleanParameter("advOnEnter"); Fragment fragment; if (viewOnly) { fragment = new Fragment("frag", "viewer"); fragment.add( new LabelWithMinSize("component", model) ); } else { fragment = new Fragment("frag", "editor"); TextField field = new TextField("component", model, metaData.getPropertyType()); AjaxAutocompleteBehavior acBehavior = new AjaxAutocompleteBehavior() { protected String[] getResults(String input) { return getAutoCompleteResults(input); } }; field.add(acBehavior); if (advOnEnter) { field.add( new SimpleAttributeModifier("onkeypress", "return inputField_HandleEnter(this, event)") ); } setFieldParameters(field); fragment.add(field); } add(fragment); } protected abstract String[] getAutoCompleteResults(String input); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
hi johan, I will also open up Localizer api a bit more so that you can override the cache that is used: please make sure, that you also remove the direct access on the cache to check if it contains a certain key: // Value not found are cached as well (value = null) if ((cacheKey != null) && cache.containsKey(cacheKey)) Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
encapsulation, extension and transparent resolvers
Hi, I'm getting a bit frustrated concerning wicket's encapsulation + extensibility, especially when it comes to transparent resolvers. There are a couple of nice features which are dependend on other Components. Just extending/customizing them is nearly impossible when it comes to unthought usecases. Such usecases - when described - are turned down by statements 'You are using it in an improper way, rethink your data access model.' or 'When it comes to transparent resolvers, you are on your own - implement it from scratch without them'. In the latter, 'implement it from scratch' has significant tradeoffs: My case is implementing a DataTable with some add-on features which need make use of an transparent resolver. The encapsulation of the contained DataGridView with DataTable leaves me no option (except doing it from scratch). If I would implement a DataTable myself, I'd have to create all Components expecting a DataTable as parameter again: That just contradics Wicket's reusable components approach. As responsive + well supported as Wicket is (I really like that a lot - and am thankful for the work the dev team is doing) - if unthought usecases occur the team is frequently denying that such usecases are valid and wouldn't bring Wicket a step further. I know transparent resolvers are currently a major issue and can't be really handled in a proper way due to the hierarchy concept. But if things can be fixed with a workaround (until a new transparent resolver model is established) and which has no impact on the overall functionality - why can't that make it into wicket? The 'We wont support this' dogma isn't really proper argumentation. Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
i guess you have a loads of null values somehow Dont know why in your situation you have soo many of those. What you could do is this in the init of your application: Localizer localizer = new Localizer() { protected void putIntoCache(final String cacheKey, final String string) { if (string != null) super.putIntoCache(cacheKey,string); } }; getResourceSettings().setLocalizer(localizer); this way you dont cache null values at all, only your real values. If null values are asked a lot this could be slower ofcourse.. I will also open up Localizer api a bit more so that you can override the cache that is used: /** * Create a new cache, override this method if you want a different map to store the cache keys, * for example a map that hold only the last X number of elements.. * * By default it uses the [EMAIL PROTECTED] ConcurrentHashMap} * * @return cache */ protected Map newCache() { return new ConcurrentHashMap(); } You could return there a map that evicts on the least recently used then. johan On Mon, May 12, 2008 at 9:41 AM, Quan Zhou <[EMAIL PROTECTED]> wrote: > Thanks iman. > > I explore many CocurrentHashMap$Entry to check its key/value. > I truly found two things: > 1. some key is large , its length would be more than 300 if the component > has deep hierachy.That must be one of the reasons why Localizer is so big. > 2. the number of this object is large too. there're 2,863,559 entrys. I > couldn't check the whole objects one by one.but i was wondering > why there're too many Entrys. There are about 2000 java files at most in > my app, and no more than 500 wicket page/components with 2 >properties files , 1 html files in average. It means there are not > huge > properties or name that needs to retain in heapze ,so what things > would those 2,863,559 entries supposed to contain? > > Is there any settings can control the limit of Entry size?or some strategy > can reduce the key name of the entry? > > > 2008/5/12 Iman Rahmatizadeh <[EMAIL PROTECTED]>: > > > Well actually I haven't :-) My localizer gets quite large, but it hasnt > > made > > any problems, yet . > > You see when the localizer wants to find the resource value for a > specific > > key, it caches the result into the localizer. Now if your component has > a > > deep hierarchy, the generated key will be quite large. In yourkit , use > > the > > object explorer to explore the ConcurrentHashMap entries and see why are > > they so large, as I think the number of entries in the cache is limited, > > So > > the only explanation would be to see why are the key/values taking so > much > > space. If you can give a dump of one of the bigger key/values we can > help > > more. > > Also the DiskPageStore doesnt hold on to anything in memory, so it wont > > consume any memory, nothing strange about it. > > > > Iman > > > > On Mon, May 12, 2008 at 9:31 AM, Quan Zhou <[EMAIL PROTECTED]> wrote: > > > > > Thanks for your all replys. > > > > > > I review the dump file with both SAP MemoryAnalyzer and YourKit > > > They all show the same hierachy as follows: > > > > > > -org.apache.wicket.settings.Settings > > > - org.apache.wicket.Localizer > > > - org.apache.wicket.util.concurrent.ConcurrentHashMap > > > - org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry > > > > > > Localizer Object retaind 87.84% HeapSize. while the DiskPageStore only > > > retained 0.71% > > > That's weird,isn't it? > > > > > > I decrease the max heapsize settings to 50M, and make a load test then > > > monitor the memory allocation. > > > It indeed allocated more and more char[] objects time by time. > > > > > > Iman,how do you solve your problem at last? > > > could you share some experience with me ? Thank you very much. > > > > > > 2008/5/10 Iman Rahmatizadeh <[EMAIL PROTECTED]>: > > > > > > > I've seen this before, altough it wasnt 2GB, but in a small 70MB > heap > > > dump > > > > the cache size was around 25MB. The ConcurrentHashMap caches a lot > of > > > > unneeded string keys, where the keys are quite large, maybe strings > of > > > size > > > > 1k characters, like key : > > > > > > > > > > > > > > "org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1:rows-ir.co.meraat.avicenna.web.components.AvicennaDataTable$InnerDataTable:inner-table-ir.co.meraat.avicenna.web.components.AvicennaDataTable$1:filter-form-ir.co.meraat.avicenna.web.components.AvicennaDataTable:table-ir.co.meraat.avicenna.vita.GradesManagementPanel$1:studentSearch-ir.co.meraat.avicenna.vita.GradesManagementPanel:componentId-ir.co.meraat.avicenna.web.CompositePage:5-fa_IR-nullg.apache.wicket.markup.repeater.OddEvenItem:29-" > > > > > > > > As you see the component hierarchy is dumped into the string, making > > it > > > > very > > > > large. I guess we're both localizing a lot of strings, so our > problem > > > could > > > > be the same. > > > > > > > > Iman > > > > > > > > On Sat, May 10, 2008 at 9:38 AM,
Re: javascript error in internet explorer
is there a jira issue for this patch? On Sat, May 10, 2008 at 12:34 AM, PITI <[EMAIL PROTECTED]> wrote: > > I had a similar problem. In wicket-ajax.js, I made the following changes, > and > now it works fine : > > if (Wicket.Focus && Wicket.Focus.lastFocusId) { > t.setRequestHeader("Wicket-FocusedElementId", Wicket.Focus.lastFocusId > || ""); > } > else { >// t.setRequestHeader("Wicket-FocusedElementId", ""); > } > > Hope this helps. > > > > bglynn wrote: > > > > I'm also having either the same issue or one very similar. > > > > The problem I'm seeing seems to be isolated to IE. The specific build > > version of IE 7.0.5730.11. The issue only seems to have come up on one > of > > 5 machines and assuming the specific IE build maybe an issue. > > > > Here's a description: > > We are using a AjaxLazyLoadPanel to load a long running panel. As soon > as > > the panel is is loaded a javascript error of "invalid argument" is > thrown > > and the ajax request is halted. Doing some debugging revealed that the > > exception was being thrown from > > "t.setRequestHeader("Wicket-FocusedElementId", > > Wicket.Focus.lastFocusId || "");". The Wicket.Focus.lastFocusId variable > > is to "", which doesn't seem like it would cause a problem given the OR > > operator. > > > > I'd really apperciate some assitance. > > > > Thanks, > > Brian Glynn > > > > > > > > atul singh-5 wrote: > >> > >> Hi, > >> I wanted to know about preCallHandlers in wicket-ajax.js .What are they > >> and > >> How are they related in java code. > >> Actually I am facing a problem in internet explorer. The ajax get call > >> give > >> error after "Invoking pre-call handler(s).." > >> It gives an error in the highlighted portion and then all ajax stops > >> working, because this get call did not return. > >> The error says--"invalid argument" > >> I will really appreciate any help. Also if anyone know a javascript > >> debugger/debugging technique for internet explorer, please let me know, > >> so i > >> will be able to do something about this :(.. > >> > >> Thanks > >> > >> > >> doGet: function() { > >> if (this.precondition()) { > >> > >> this.transport = Wicket.Ajax.getTransport(); > >> > >> var url = this.createUrl(); > >> this.log("GET", url); > >> > >> Wicket.Ajax.invokePreCallHandlers(); > >> > >> * var t = this.transport;** > >> if (t != null) { > >> if (Wicket.Browser.isGecko()) { > >> var href = document.location.href; > >> var lastIndexOf = href.lastIndexOf('/'); > >> if (lastIndexOf > 0) > >> { > >> url = href.substring(0,lastIndexOf+1) + url; > >> } > >> } > >> t.open("GET", url, this.async); > >> t.onreadystatechange = > >> this.stateChangeCallback.bind(this); > >> // set a special flag to allow server distinguish > between > >> ajax and non-ajax requests > >> t.setRequestHeader("Wicket-Ajax", "true"); > >> t.setRequestHeader("Wicket-FocusedElementId", > >> Wicket.Focus.lastFocusId || ""); > >> t.setRequestHeader("Accept", "text/xml"); > >> t.send(null); > >> return true;* > >> } else { > >> this.failure(); > >>return false; > >> } > >> } else { > >> Wicket.Log.info("Ajax GET stopped because of precondition > >> check, > >> url:" + this.url); > >> this.done(); > >> return true; > >> } > >> } > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/javascript-error-in-internet-explorer-tp16732896p17157574.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Load serialized (or in session) page/model on refresh..
sure will check it out.. Jonathan Locke wrote: > > > try setting a breakpoint on this line: > > List certificateList = > > DAOManager.getExemptionCertificateDAO().getExemptionCertificates( > > m_certificateSearchCriteriaName,m_certificateSearchCriteriaValue, > Integer.valueOf(first), Integer.valueOf(count)); > > i assume the data view has to get the iterator each time to repopulate the > list (since it's refreshing). > > > mfs wrote: >> >> >> >> Jonathan Locke wrote: >>> >>> >>> oh, okay. sorry, i was speed-reading your question and misunderstood >>> it. >>> >>> maurice and johan are correct that hybrid urls will avoid creating the >>> instance. the part i mistakenly assumed we were talking about was >>> whether one can completely avoid creating a new version of the page in >>> the page store during rendering. maybe matej can verify this, but i >>> don't think that is possible anymore. wicket requests can dynamically >>> modify the component hierarchy and with the new disk page store, i think >>> you always end up with a new page version. so when you hit a hybrid url >>> and a new page version is created and that number at the end of the url >>> changes (which i'm assuming you are assuming is a new page), that >>> doesn't mean a new page was constructed (set a breakpoint in your >>> constructor and verify for yourself). it merely means that the existing >>> page was mutated. is that where your confusion is coming from? >>> >>> So For me 1) Doing a refresh, doesnt change/increment the version at the >>> end of url, it remains the same with every refresh 2) the confusion is >>> that i see the model being reloaded from the database (even though i am >>> not using a DetachableModel), may be i am doing something wrong here (or >>> probably i am not understanding something correctly), if u look at my >>> implementation here (http://papernapkin.org/pastebin/view/788/) may be >>> you can tell, because if a a new page is not constructed on a refresh >>> (given hybridstrategy), why is the DataView repopulated/reconstructed >>> every time with the latest model (provided to it via a IDataProvider >>> impl which in turns get the data from the DB and, yes also the model >>> returned by the DataProvider.model(Object object) is non-detachable >>> model)...I think i am missing something very basic yet important here.. >>> >>> btw, i still think you are making a big mistake if you're avoiding >>> detachable models. detachable models are the best practice. you should >>> add a database cache to make them efficient, not try to work around >>> them. early on i tried to avoid them at first and discovered dozens of >>> ways to get bit by that. don't prematurely optimize your app. build it >>> the right way first and then look at your hot spots. >>> >>> I will re-think this over defintly and u certainly seem to make sense, >>> but i would still wanna have a good understanding of how this works.. >>> >>> >>> Jonathan Locke wrote: okay, so i think the answer to your question is no, you can't optimize that. you should be using detachable models and an OTS db cache. what i don't understand is why you want to do this. if the user hits refresh in their browser they are hoping to see updated data. why do you want to turn that into a no-op? mfs wrote: > > I have the condensed version of the code here, with some comments on > the top of each class.. > > http://papernapkin.org/pastebin/view/788/ > > Waiting for follow up > > > Jonathan Locke wrote: >> >> >> you must be making some mistake (probably conceptual). can you >> create a quickstart example of your problem and post it at some link >> where we can see exactly what you're doing? >> >> >> mfs wrote: >>> >>> Well actually before posting this up, i did try this i.e. mounted >>> the page using hybridurlcodingstrategy (with the assumption that >>> since the pageId is there in the url doing a refresh would load the >>> already instantiated page against the id) but at that time i had the >>> page as bookmarkable (i.e. had public default and param >>> constructors), so after reading maurice's post, i made it a >>> non-bookmarkable one (by making both the constructors as protected) >>> but unfortunately it still doesnt work, doing a refresh i still see >>> the updated model..to be precise i am using a DataView which is a >>> IDataProvider and am using non-detachable models. >>> >>> Thanks for the follow up.. >>> >>> >>> >>> Johan Compagner wrote: HybridUrlEnoding On Sun, May 11, 2008 at 9:04 AM, mfs <[EMAIL PROTECTED]> wrote: > > Guys, > > Firstly, Is that a right understanding that doing a
persistent sessions in Tomcat
Hi, I'm just started experiments with Wicket so I suppose my question is stupid however I haven't found the answer on the forum. The point was to understand how to organize persistent sessions for the wicket application. It seemed to me that such application should work with the standard Tomcat mechanism transparently as any other servlet. So I have written simple wicket application - just two pages that show sessionid, configured Tomcat persistent manager and started session. Then I restarted the server and tried to pass from one page to another waiting to see the same sessionid. But I have seen "page has expired". Should I provide some serialization support in my application or there is some error in my logic or there aren't such possibility and I "want something strange"(c)? BR -- View this message in context: http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17183181.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javascript error in internet explorer
I get this too on IE6.0.2900.2180 on xp. I don't get this problem with Firefix, unfortunately I'm developing an intranet app and IE6 is the standard. The js fix below fixed it for me too. PITI wrote: > > I had a similar problem. In wicket-ajax.js, I made the following changes, > and now it works fine : > > if (Wicket.Focus && Wicket.Focus.lastFocusId) { > t.setRequestHeader("Wicket-FocusedElementId", Wicket.Focus.lastFocusId > || ""); > } > else { > // t.setRequestHeader("Wicket-FocusedElementId", ""); > } > > Hope this helps. > > > > bglynn wrote: >> >> I'm also having either the same issue or one very similar. >> >> The problem I'm seeing seems to be isolated to IE. The specific build >> version of IE 7.0.5730.11. The issue only seems to have come up on one of >> 5 machines and assuming the specific IE build maybe an issue. >> >> Here's a description: >> We are using a AjaxLazyLoadPanel to load a long running panel. As soon as >> the panel is is loaded a javascript error of "invalid argument" is thrown >> and the ajax request is halted. Doing some debugging revealed that the >> exception was being thrown from >> "t.setRequestHeader("Wicket-FocusedElementId", >> Wicket.Focus.lastFocusId || "");". The Wicket.Focus.lastFocusId variable >> is to "", which doesn't seem like it would cause a problem given the OR >> operator. >> >> I'd really apperciate some assitance. >> >> Thanks, >> Brian Glynn >> >> >> >> atul singh-5 wrote: >>> >>> Hi, >>> I wanted to know about preCallHandlers in wicket-ajax.js .What are they >>> and >>> How are they related in java code. >>> Actually I am facing a problem in internet explorer. The ajax get call >>> give >>> error after "Invoking pre-call handler(s).." >>> It gives an error in the highlighted portion and then all ajax stops >>> working, because this get call did not return. >>> The error says--"invalid argument" >>> I will really appreciate any help. Also if anyone know a javascript >>> debugger/debugging technique for internet explorer, please let me know, >>> so i >>> will be able to do something about this :(.. >>> >>> Thanks >>> >>> >>> doGet: function() { >>> if (this.precondition()) { >>> >>> this.transport = Wicket.Ajax.getTransport(); >>> >>> var url = this.createUrl(); >>> this.log("GET", url); >>> >>> Wicket.Ajax.invokePreCallHandlers(); >>> >>> * var t = this.transport;** >>> if (t != null) { >>> if (Wicket.Browser.isGecko()) { >>> var href = document.location.href; >>> var lastIndexOf = href.lastIndexOf('/'); >>> if (lastIndexOf > 0) >>> { >>> url = href.substring(0,lastIndexOf+1) + url; >>> } >>> } >>> t.open("GET", url, this.async); >>> t.onreadystatechange = >>> this.stateChangeCallback.bind(this); >>> // set a special flag to allow server distinguish >>> between >>> ajax and non-ajax requests >>> t.setRequestHeader("Wicket-Ajax", "true"); >>> t.setRequestHeader("Wicket-FocusedElementId", >>> Wicket.Focus.lastFocusId || ""); >>> t.setRequestHeader("Accept", "text/xml"); >>> t.send(null); >>> return true;* >>> } else { >>> this.failure(); >>>return false; >>> } >>> } else { >>> Wicket.Log.info("Ajax GET stopped because of precondition >>> check, >>> url:" + this.url); >>> this.done(); >>> return true; >>> } >>> } >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/javascript-error-in-internet-explorer-tp16732896p17183082.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why Localizer Retained so many heapsize?
Thanks iman. I explore many CocurrentHashMap$Entry to check its key/value. I truly found two things: 1. some key is large , its length would be more than 300 if the component has deep hierachy.That must be one of the reasons why Localizer is so big. 2. the number of this object is large too. there're 2,863,559 entrys. I couldn't check the whole objects one by one.but i was wondering why there're too many Entrys. There are about 2000 java files at most in my app, and no more than 500 wicket page/components with 2 properties files , 1 html files in average. It means there are not huge properties or name that needs to retain in heapze ,so what things would those 2,863,559 entries supposed to contain? Is there any settings can control the limit of Entry size?or some strategy can reduce the key name of the entry? 2008/5/12 Iman Rahmatizadeh <[EMAIL PROTECTED]>: > Well actually I haven't :-) My localizer gets quite large, but it hasnt > made > any problems, yet . > You see when the localizer wants to find the resource value for a specific > key, it caches the result into the localizer. Now if your component has a > deep hierarchy, the generated key will be quite large. In yourkit , use > the > object explorer to explore the ConcurrentHashMap entries and see why are > they so large, as I think the number of entries in the cache is limited, > So > the only explanation would be to see why are the key/values taking so much > space. If you can give a dump of one of the bigger key/values we can help > more. > Also the DiskPageStore doesnt hold on to anything in memory, so it wont > consume any memory, nothing strange about it. > > Iman > > On Mon, May 12, 2008 at 9:31 AM, Quan Zhou <[EMAIL PROTECTED]> wrote: > > > Thanks for your all replys. > > > > I review the dump file with both SAP MemoryAnalyzer and YourKit > > They all show the same hierachy as follows: > > > > -org.apache.wicket.settings.Settings > > - org.apache.wicket.Localizer > > - org.apache.wicket.util.concurrent.ConcurrentHashMap > > - org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry > > > > Localizer Object retaind 87.84% HeapSize. while the DiskPageStore only > > retained 0.71% > > That's weird,isn't it? > > > > I decrease the max heapsize settings to 50M, and make a load test then > > monitor the memory allocation. > > It indeed allocated more and more char[] objects time by time. > > > > Iman,how do you solve your problem at last? > > could you share some experience with me ? Thank you very much. > > > > 2008/5/10 Iman Rahmatizadeh <[EMAIL PROTECTED]>: > > > > > I've seen this before, altough it wasnt 2GB, but in a small 70MB heap > > dump > > > the cache size was around 25MB. The ConcurrentHashMap caches a lot of > > > unneeded string keys, where the keys are quite large, maybe strings of > > size > > > 1k characters, like key : > > > > > > > > > "org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1:rows-ir.co.meraat.avicenna.web.components.AvicennaDataTable$InnerDataTable:inner-table-ir.co.meraat.avicenna.web.components.AvicennaDataTable$1:filter-form-ir.co.meraat.avicenna.web.components.AvicennaDataTable:table-ir.co.meraat.avicenna.vita.GradesManagementPanel$1:studentSearch-ir.co.meraat.avicenna.vita.GradesManagementPanel:componentId-ir.co.meraat.avicenna.web.CompositePage:5-fa_IR-nullg.apache.wicket.markup.repeater.OddEvenItem:29-" > > > > > > As you see the component hierarchy is dumped into the string, making > it > > > very > > > large. I guess we're both localizing a lot of strings, so our problem > > could > > > be the same. > > > > > > Iman > > > > > > On Sat, May 10, 2008 at 9:38 AM, Johan Compagner <[EMAIL PROTECTED] > > > > > wrote: > > > > > > > Can you really see what it holds? > > > > Almost 2G in memory in localizer is extreme... Thats really a lot of > > > > strings.. > > > > You could try to read that dump with yourkit if your current one > > > > doesnt show enough. > > > > > > > > On 5/9/08, Quan Zhou <[EMAIL PROTECTED]> wrote: > > > > > Hello everyone. > > > > > > > > > > I recently develop my App use Wicket1.3.3. It's my first time to > use > > > this > > > > > framework and I feel it's really really a perfect framework for > me. > > > > > My app support both Simplified Chinese , Traditional Chinese, I > > > implement > > > > > this with Wicket i18n feature. > > > > > With the load increasing these days, I found my app would become > > very > > > lag > > > > > abount every 24 hours ,so that i would only restart it > > > > > without any choice. > > > > > when I found the lag, My log records many Exceptions like : > > > > > "after 1 minute the Pagemap null is still locked by: > > > > > Thread[http-8080-321,5,main], giving > > > > > up trying to get the page for path xxx" > > > > > > > > > > I check the JVM status with jstat -gc , It tells that the Heapsize > > is > > > > full > > > > > even after full GC. > > > > > My VM paraemter is "-Xms2000m -Xmx2000m -XX:MaxNewSize=250m >
Re: Wicket 1.4 Generics
http://repo1.maven.org/maven2/org/apache/wicket/wicket-spring/1.4-m1/ On Mon, May 12, 2008 at 8:02 AM, Andre Prasetya <[EMAIL PROTECTED]> wrote: > usually there is a wicket-spring release for every wicket release, can > I use wicket-spring 1.3.3 for 1.4-m1 or should i wait until there is a > spesific release for 1.4-m1 ? > > -andre- > > > > > Igor Vaynberg wrote: > > > spring support has been there since 1.2, see wicket-spring and spring > examples. > > > > -igor > > > > > > On Sun, May 11, 2008 at 8:10 PM, Andre Prasetya > > <[EMAIL PROTECTED]> wrote: > > > > > > > Doug Donohoe wrote: > > > > > > > > > > > > > I just migrated to 1.4-M1 and converted all my classes to use the new > > > > generics support. It cleaned up my code quite nicely - I got to > remove a > > > > lot of casting and cured many unchecked/raw messages. > > > > > > > > It also make the code much more readable - especially in list views, > etc. > > > > > > > > Excellent work, Wicket team. > > > > > > > > -Doug > > > > > > > > > > > > > > > > > > > has 1.4-m1 support spring ? i m about to start a wicket project, and if > > > 1.4-m1 already supported spring i can give a shot. > > > > > > -andre- > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overriding panel markup: close tag not found for tag
But why does it seem to work with FeedbackPanel? I want just that. A fragment I understand just means providing optional markups. That is not exactly what I want because every realization is different. ** Martin 2008/5/12 Eelco Hillenius <[EMAIL PROTECTED]>: > > Instead, I want the MyPage.html to contain the panel markup: In a > > similar manner to how the feedbackpanel markup is given in that > > example in the book "created the component component structure inside > > the page". > > You should use a Fragment instead of a Panel in that case. > > Eelco > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]