Re: [Wicket-user] Wicket 2.0: Adding a component via ajax that contributes javascript (like AutoCompleteTextField) doesn't work correctly in Firefox
This is the same problem I reported a few days ago for Wicket 1.2.2. Igor wrote that it was already solved in th 1.x trunk. So maybe this is also the case for the 2.x trunk. Regards, Erik. Caleb Land schreef: When I add a component via ajax that contributes javascript to be executed (like the AutoCompleteTextField from wicket-extensions) the javascript is executed before the component elements are added to the page in Firefox ( 1.5.0.7 http://1.5.0.7). The same code works correctly in Safari, Opera, and IE7 (I haven't tests 6.x). In the case of the AutoCompleteTextField (which adds javascript through the AbstractAutoCompleteBehavior), the javascript: new Wicket.Ajax.AutoComplete('id ', 'callbackUrl'); gets executed before the control is added to the page, so an element with the specified id cannot be found and the autocomplete functionality isn't added to the control. Here is a quickstart application that demonstrates the problem: http://www.granfalloon.com/~caleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip if I alter AbstractAutoCompleteBehavior to execute the javascript in a setTimeout() then everything work correctly in Firefox. -- Caleb Land ([EMAIL PROTECTED] mailto:[EMAIL PROTECTED]) -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] timeout event
please in a situation where my application needs to trigger an event just before a session timeout, what can i do. thanks - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] weightlifter also
I don't watch golf at any other time and hardly ever play - maybe two rounds in as many years. Enter now and you could win. A powerful French conscience and a great friend of Africa, he will be sorely missed by all who love justice and freedom. I would highly recommend giving it a go. Fastfinger reveals the art of shredding! Situated at the crossroads of commerce, culture and entertainment, Aruntx is uniquely positioned to grant any request you may have. Mueble Antiguo De Estilo Ingles ! Some of these enterprises were established since. There is a chance that it will work out to be slightly less close than the polls show due to their margin of error. for some reason that makes all the difference. Your needs are met with the discretion and privacy you expect, ensuring your business will always remain exactly that. Most of them were of course now all lining up to be the first to disown brand Blair claiming they felt "let down". Guitar World Magazine knows the answer: beautiful women with hot gear! Wherever I went, two things remained consistent: The French government was hated, and Africans looked to Washington for a square deal. The fight which lasted more than. A black French person with as much claim to frenchness and the identical qualifications as Sarkozy cannot even dream of becoming interior. for some reason that makes all the difference. It feels different here because it is different here. His most recent movie from. The list is clearly not exhaustive. Among the signature services, amenities and design features that set the Aruntx apart. There is a chance that it will work out to be slightly less close than the polls show due to their margin of error. Well, actually I hope you didn't, but hey. Tastes wonderful in moderation, makes. Accommodating life, business and individuality, Aruntx is not a place you visit. Either the Mexicans know a lot more. Besides the full conc. Not only was France training the genocidal militias prior. The list is clearly not exhaustive. Not only was France training the genocidal militias prior. This is life at its finest. According to Patrik, 'The workshop is created for all you guitarists out there who seek new inspiration'. Kikkerfest, the free online festival, brings us Joe Satriani live in Annaheim. Kikkerfest, the free online festival, brings us Joe Satriani live in Annaheim. Among the signature services, amenities and design features that set the Aruntx apart. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] timeout event
Probably the easiest way to do this is to provide a session listener. That object implements http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html and has to be registered in web.xml. Eelco On 10/15/06, Ayodeji Aladejebi [EMAIL PROTECTED] wrote: please in a situation where my application needs to trigger an event just before a session timeout, what can i do. thanks - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket 2.0: Adding a component via ajax that contributes javascript (like AutoCompleteTextField) doesn't work correctly in Firefox
I'm using the 2.0 trunk. I think he was referring to the header contribution working when added via ajax. That does appear to work (the correct script reference is made to the autocomplete _javascript_ library), however the code that actually calls the library to create the field in the browser is being called before the field is placed on the page in Firefox (it works correctly in the other browsers I tried). On 10/15/06, Erik van Oosten [EMAIL PROTECTED] wrote: This is the same problem I reported a few days ago for Wicket 1.2.2.Igor wrote that it was already solved in th 1.x trunk. So maybe this isalso the case for the 2.x trunk.Regards, Erik.Caleb Land schreef: When I add a component via ajax that contributes _javascript_ to be executed (like the AutoCompleteTextField from wicket-extensions) the _javascript_ is executed before the component elements are added to the page in Firefox ( 1.5.0.7 http://1.5.0.7).The same code works correctly in Safari, Opera, and IE7 (I haven't tests 6.x). In the case of the AutoCompleteTextField (which adds _javascript_ through the AbstractAutoCompleteBehavior), the _javascript_: new Wicket.Ajax.AutoComplete('id ', 'callbackUrl'); gets executed before the control is added to the page, so an element with the specified id cannot be found and the autocomplete functionality isn't added to the control. Here is a quickstart application that demonstrates the problem: http://www.granfalloon.com/~caleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip if I alter AbstractAutoCompleteBehavior to execute the _javascript_ in a setTimeout() then everything work correctly in Firefox. -- Caleb Land ([EMAIL PROTECTED] mailto:[EMAIL PROTECTED] )--Erik van Oostenhttp://day-to-day-stuff.blogspot.com/-Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user-- Caleb Land([EMAIL PROTECTED]) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] proof of concept app
One weekend later and I'm working on this again. Here's my situation: page - browse panel - cart panel - modal window - - edit item form (inside the modal window) I have an ajax submit button in the EditItemForm. I need to call public void onSubmit(AjaxRequestTarget target, Form f) { target.addComponent(theCartPanel); ModalWindow.close(target); } My problem is: how do I get access to the cart panel from within the form in the modal window? Here's what I've come up with, and everything feels a bit ugly: 1. I can get the cart from the session and have the cart fetch the cart panel -- ugh, the cart (business object) shouldn't know about a UI widget. 2. I can pass the cart panel in as my model object 3. I could put the cart panel in the session (or my own ThreadLocal) 4. I could crawl my way back up findParent(ProductPanel.class).visitChildren(IVisitorThatHandlesTargetAddComponent) Any suggestions would be entirely welcome. Thanks, Scott On 10/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote: the question is one of lifecycle. does your reportmodel need to live as long as the user's session? if not then you dont need to put it into session. a shopping cart usually spans the session - so it makes complete sense to put it there. -Igor On 10/9/06, Nino Wael [EMAIL PROTECTED] wrote: Why? Keeping the cart within constructors are kinda more POJO i think. What I am working on now, we have a reportmodel and almost all our pages has a constructor that requires our reportmodel, so we dont need to be aware of session. I feel that the application becomes more simple that way, however we do not have a LOT of panels, we have some which uses abstractmodels that grabs their data from the reportmodel, when switching pages we pass the reportmodel through. This might be a different approach from what you need when building a store site, but it feels pretty a lot simpler than have something stored in session context. regards Nino -Original Message- From: [EMAIL PROTECTED] on behalf of Eelco Hillenius Sent: Mon 09-10-2006 20:14 To: wicket-user@lists.sourceforge.net Cc: Subject:Re: [Wicket-user] proof of concept app If you're main domain is a store, and a cart is information you want to keep throughout, it does make sense to put it in a session, so that you don't have to pass it around your pages and panels all the time. Eelco On 10/9/06, Nino Wael [EMAIL PROTECTED] wrote: Looks nice(just skimping the code through without running it though), however I can see that you have extended the session, do you really have a need to store the cart in session context? Why not just create it on PosPage? -regards Nino -Original Message- From: [EMAIL PROTECTED] on behalf of Scott Swank Sent: Mon 09-10-2006 18:30 To: wicket-user@lists.sourceforge.net Cc: Subject:[Wicket-user] proof of concept app I've been pushing to use Wicket as our new web UI framework. We currently have a custom template that resembles Velocity. The broad concensus is to go with JSF. While I'm convinced that JSF will work for us it always seems so cumbersome. I've convinced by boss to give Wicket a 2nd look, and so this weekend I threw together the attached. If anyone is inclined to give it a quick glance for best practices type considerations I'd certainly be appreciative. The only relevant files are the jetty config, web.xml the java/html. There are two apps that both sub-class an abstract app. The Concierge version is for retail sales while the C3 version is for our call center. The urls are below. Thank you, Scott -- Forwarded message -- From: Scott Swank [EMAIL PROTECTED] Date: Oct 8, 2006 10:41 PM Subject: concierge/c3 in wicket To: Scott Swank [EMAIL PROTECTED], Scott Swank [EMAIL PROTECTED] http://localhost:8081/concierge/app http://localhost:8081/concierge/c3 -- Scott Swank reformed mathematician Power is not a means, it is an end. One does not establish a dictatorship in order to safeguard a revolution; one makes the revolution in order to establish the dictatorship. The object of persecution is persecution. The object of torture is torture. The object of power is power. -- George Orwell, 1984 -- Scott Swank reformed mathematician Power is not a means, it is an end. One does not establish a dictatorship in order to safeguard a revolution; one makes the revolution in order to establish the dictatorship. The object of persecution is persecution. The object of torture is torture. The object of power is power. -- George Orwell, 1984 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay
Re: [Wicket-user] timeout event
just before is not possible (as far as i know)it is always after..you can't touch the session then anymore (by using a httpsession listener)so what do you want to do?johan On 10/15/06, Ayodeji Aladejebi [EMAIL PROTECTED] wrote: please in a situation where my application needs to trigger an eventjust before a session timeout, what can i do. thanks-Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] IE causes Unable to load class errors...
its very strange that you get loading class things differences with the use of a browser?What could sent IE do different that FF that could result in that kind of behaviour?johan On 10/14/06, Gwyn Evans [EMAIL PROTECTED] wrote: Hi,Anyone seen this sort of thing?If I use Firefox, there's nothingin the logs, whereas if I try IE, I get the page (including the cssfile) but there's an error logged -2006-10-13 23:05:21,589 [ERROR] RequestCycle - Unable to load class with name: c.z.t.web.manual.page.log.cssThe page I'm loading is c.z.t.web.manual.page.log.Index, which has noCSS load but does extend ../BasePage, which containshead ... link rel=stylesheet type=text/css href="" /headThis is translated to link href="" type=text/css rel=stylesheetand does load OK, although it does containbehavior:url(css/csshover.htc); which could be the issue? What's really a problem is that while I get this page, trying to getto any page needing authentication just ends up with a 404 afterlogging in, so any suggestions welcome!As I said though, FF is fine with it.../Gwyn--Download Wicket 1.2.2 now! - http://wicketframework.org-Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] IE causes Unable to load class errors...
That stumped me, too! I checked with Lynx that was OK too. Unfortunately, (or not, as I need to install this next week) it hasn't repeated itself since I had to reboot my laptop thus restart the (local) appserver (as WinXP wanted to update itself). As a result, there's not much I can do to add to the initial report... /Gwyn On 15/10/06, Johan Compagner [EMAIL PROTECTED] wrote: its very strange that you get loading class things differences with the use of a browser? What could sent IE do different that FF that could result in that kind of behaviour? johan On 10/14/06, Gwyn Evans [EMAIL PROTECTED] wrote: Hi, Anyone seen this sort of thing? If I use Firefox, there's nothing in the logs, whereas if I try IE, I get the page (including the css file) but there's an error logged - 2006-10-13 23:05:21,589 [ERROR] RequestCycle - Unable to load class with name: c.z.t.web.manual.page.log.css The page I'm loading is c.z.t.web.manual.page.log.Index, which has no CSS load but does extend ../BasePage, which contains head ... link rel=stylesheet type=text/css href=css/styles.css /head This is translated to link href=/manual/css/styles.css type=text/css rel=stylesheet and does load OK, although it does contain behavior:url(css/csshover.htc); which could be the issue? What's really a problem is that while I get this page, trying to get to any page needing authentication just ends up with a 404 after logging in, so any suggestions welcome! As I said though, FF is fine with it... /Gwyn -- Download Wicket 1.2.2 now! - http://wicketframework.org -- Download Wicket 1.2.2 now! - http://wicketframework.org - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket 2.0: Adding a component via ajax that contributes javascript (like AutoCompleteTextField) doesn't work correctly in Firefox
I've created the same testcase using wicket 1.2.2 and it works correctly in Firefox:http://www.granfalloon.com/~caleb/wicket-quickstart-1.2.2.zip I'm looking into the cause of it...On 10/15/06, Caleb Land [EMAIL PROTECTED] wrote: I'm using the 2.0 trunk. I think he was referring to the header contribution working when added via ajax. That does appear to work (the correct script reference is made to the autocomplete _javascript_ library), however the code that actually calls the library to create the field in the browser is being called before the field is placed on the page in Firefox (it works correctly in the other browsers I tried). On 10/15/06, Erik van Oosten [EMAIL PROTECTED] wrote: This is the same problem I reported a few days ago for Wicket 1.2.2.Igor wrote that it was already solved in th 1.x trunk. So maybe this isalso the case for the 2.x trunk.Regards, Erik.Caleb Land schreef: When I add a component via ajax that contributes _javascript_ to be executed (like the AutoCompleteTextField from wicket-extensions) the _javascript_ is executed before the component elements are added to the page in Firefox ( 1.5.0.7 http://1.5.0.7).The same code works correctly in Safari, Opera, and IE7 (I haven't tests 6.x). In the case of the AutoCompleteTextField (which adds _javascript_ through the AbstractAutoCompleteBehavior), the _javascript_: new Wicket.Ajax.AutoComplete('id ', 'callbackUrl'); gets executed before the control is added to the page, so an element with the specified id cannot be found and the autocomplete functionality isn't added to the control. Here is a quickstart application that demonstrates the problem: http://www.granfalloon.com/~caleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip if I alter AbstractAutoCompleteBehavior to execute the _javascript_ in a setTimeout() then everything work correctly in Firefox. -- Caleb Land ([EMAIL PROTECTED] mailto:[EMAIL PROTECTED] )--Erik van Oostenhttp://day-to-day-stuff.blogspot.com/- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user -- Caleb Land([EMAIL PROTECTED]) -- Caleb Land([EMAIL PROTECTED]) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket 2.0: Adding a component via ajax that contributes javascript (like AutoCompleteTextField) doesn't work correctly in Firefox
Well, I'll try to look at it later today (or tomorrow). The problem is that firefox executes the script automatically, while in other browsers we need to call the scripts in the fragment manually. So I can't affect the order in which the scripts are bing called. I'll see what I can do about it. -Matej Caleb Land wrote: I've created the same testcase using wicket 1.2.2 and it works correctly in Firefox: http://www.granfalloon.com/~caleb/wicket-quickstart-1.2.2.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart-1.2.2.zip I'm looking into the cause of it... On 10/15/06, *Caleb Land* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm using the 2.0 trunk. I think he was referring to the header contribution working when added via ajax. That does appear to work (the correct script reference is made to the autocomplete javascript library), however the code that actually calls the library to create the field in the browser is being called before the field is placed on the page in Firefox (it works correctly in the other browsers I tried). On 10/15/06, *Erik van Oosten* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: This is the same problem I reported a few days ago for Wicket 1.2.2. Igor wrote that it was already solved in th 1.x trunk. So maybe this is also the case for the 2.x trunk. Regards, Erik. Caleb Land schreef: When I add a component via ajax that contributes javascript to be executed (like the AutoCompleteTextField from wicket-extensions) the javascript is executed before the component elements are added to the page in Firefox ( 1.5.0.7 http://1.5.0.7 http://1.5.0.7). The same code works correctly in Safari, Opera, and IE7 (I haven't tests 6.x). In the case of the AutoCompleteTextField (which adds javascript through the AbstractAutoCompleteBehavior), the javascript: new Wicket.Ajax.AutoComplete('id ', 'callbackUrl'); gets executed before the control is added to the page, so an element with the specified id cannot be found and the autocomplete functionality isn't added to the control. Here is a quickstart application that demonstrates the problem: http://www.granfalloon.com/~caleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip if I alter AbstractAutoCompleteBehavior to execute the javascript in a setTimeout() then everything work correctly in Firefox. -- Caleb Land ([EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]) -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user https://lists.sourceforge.net/lists/listinfo/wicket-user -- Caleb Land ([EMAIL PROTECTED] mailto:[EMAIL PROTECTED]) -- Caleb Land ([EMAIL PROTECTED] mailto:[EMAIL PROTECTED]) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get
Re: [Wicket-user] Wicket 2.0: Adding a component via ajax that contributes javascript (like AutoCompleteTextField) doesn't work correctly in Firefox
Okay. I'm making this up as I go along, so this could be the worst idea ever, but what about scanning a component's response for script tag, putting the contents in the AjaxRequestTarget as _javascript_s, and removing the script tag from the normal component output? From my reading of the source code, the evaluation of those scripts is controlled by the wicket ajax system (since a call to eval() is made when processing them). I'm a Wicket/Web development newbie so I can't see far enough ahead to see potential problems with a solution like this. On 10/15/06, Matej Knopp [EMAIL PROTECTED] wrote: Well, I'll try to look at it later today (or tomorrow). The problem isthat firefox executes the script automatically, while in otherbrowsers we need to call the scripts in the fragment manually. So I can't affect the order in which the scripts are bing called.I'll see what I can do about it.-MatejCaleb Land wrote: I've created the same testcase using wicket 1.2.2 and it works correctly in Firefox: http://www.granfalloon.com/~caleb/wicket-quickstart-1.2.2.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart-1.2.2.zip I'm looking into the cause of it... On 10/15/06, *Caleb Land* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm using the 2.0 trunk.I think he was referring to the header contribution working when added via ajax.That does appear to work (the correct script reference is made to the autocomplete _javascript_ library), however the code that actually calls the library to create the field in the browser is being called before the field is placed on the page in Firefox (it works correctly in the other browsers I tried). On 10/15/06, *Erik van Oosten* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: This is the same problem I reported a few days ago for Wicket 1.2.2. Igor wrote that it was already solved in th 1.x trunk. So maybe this is also the case for the 2.x trunk. Regards,Erik. Caleb Land schreef: When I add a component via ajax that contributes _javascript_ to be executed (like the AutoCompleteTextField from wicket-extensions) the _javascript_ is executed before the component elements are added to the page in Firefox ( 1.5.0.7 http://1.5.0.7 http://1.5.0.7).The same code works correctly in Safari, Opera, and IE7 (I haven't tests 6.x). In the case of the AutoCompleteTextField (which adds _javascript_ through the AbstractAutoCompleteBehavior), the _javascript_: new Wicket.Ajax.AutoComplete('id ', 'callbackUrl'); gets executed before the control is added to the page, so an element with the specified id cannot be found and the autocomplete functionality isn't added to the control. Here is a quickstart application that demonstrates the problem: http://www.granfalloon.com/~caleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip http://www.granfalloon.com/%7Ecaleb/wicket-quickstart.zip if I alter AbstractAutoCompleteBehavior to execute the _javascript_ in a setTimeout() then everything work correctly in Firefox. -- Caleb Land ( [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto: [EMAIL PROTECTED]) -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto: Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user https://lists.sourceforge.net/lists/listinfo/wicket-user -- Caleb Land ( [EMAIL PROTECTED] mailto: [EMAIL PROTECTED]) -- Caleb Land ( [EMAIL PROTECTED] mailto: [EMAIL PROTECTED]) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make
Re: [Wicket-user] Ajax form and feedback panel
I'm not seeing a (target) panel updated as a result of an AjaxSubmitButton. The onSubmit() method delagates to an IVisitor that uses getPage().visitChildren() to find the panel in question. Does that sound like the same bug? public EditItemPanel(String id, Model whsItemModel) { super(id, whsItemModel); wItem = (WarehouseItem) this.getModelObject(); form = new EditItemForm(editItemForm); form.add(new Label(productName, wItem.getSku().getProductName())); guestNameField = new TextField(guestName, new Model()); form.add(guestNameField); form.add(new AjaxSubmitButton(ajaxSubmit, form) { private static final long serialVersionUID = 8677262489811798153L; public void onSubmit(final AjaxRequestTarget target, Form f) { getPage().visitChildren(CartPanel.class, new Component.IVisitor() { public Object component(Component comp) { target.addComponent(comp); return Component.IVisitor.STOP_TRAVERSAL; } }); ModalWindow.close(target); } }); this.add(form); } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] proof of concept app
Scott,do you really have to get access to the panel from the form? Or can your panel respond to a model change you do in the form?Dirk2006/10/15, Scott Swank [EMAIL PROTECTED]:One weekend later and I'm working on this again.Here's my situation: page- browse panel- cart panel- modal window- - edit item form (inside the modal window)I have an ajax submit button in the EditItemForm.I need to callpublic void onSubmit(AjaxRequestTarget target, Form f) { target.addComponent(theCartPanel);ModalWindow.close(target);}My problem is: how do I get access to the cart panel from within theform in the modal window?Here's what I've come up with, and everything feels a bit ugly:1. I can get the cart from the session and have the cart fetch thecart panel -- ugh, the cart (business object) shouldn't know about aUI widget.2.I can pass the cart panel in as my model object 3. I could put the cart panel in the session (or my own ThreadLocal)4. I could crawl my way back upfindParent(ProductPanel.class).visitChildren(IVisitorThatHandlesTargetAddComponent)Any suggestions would be entirely welcome. Thanks,ScottOn 10/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote: the question is one of lifecycle. does your reportmodel need to live as long as the user's session? if not then you dont need to put it into session. a shopping cart usually spans the session - so it makes complete sense to put it there. -Igor On 10/9/06, Nino Wael [EMAIL PROTECTED] wrote: Why? Keeping the cart within constructors are kinda more POJO i think. What I am working on now, we have a reportmodel and almost all our pages has aconstructor that requires our reportmodel, so we dont need to be aware of session. I feel that the application becomes more simple that way, however we do not have a LOT of panels, we have some which uses abstractmodels that grabs their data from the reportmodel, when switching pages we pass the reportmodel through. This might be a different approach from what you need when building a store site, but it feels pretty a lot simpler than have something stored in session context. regards Nino-Original Message- From: [EMAIL PROTECTED] on behalf of Eelco Hillenius Sent: Mon 09-10-2006 20:14 To: wicket-user@lists.sourceforge.net Cc: Subject:Re: [Wicket-user] proof of concept app If you're main domain is a store, and a cart is information you want to keep throughout, it does make sense to put it in a session, so that you don't have to pass it around your pages and panels all the time. Eelco On 10/9/06, Nino Wael [EMAIL PROTECTED] wrote: Looks nice(just skimping the code through without running it though), however I can see that you have extended the session, do you really have a need to store the cart in session context? Why not just create it on PosPage? -regards Nino -Original Message- From: [EMAIL PROTECTED] on behalf of Scott Swank Sent: Mon 09-10-2006 18:30 To: wicket-user@lists.sourceforge.net Cc: Subject:[Wicket-user] proof of concept app I've been pushing to use Wicket as our new web UI framework.We currently have a custom template that resembles Velocity.The broad concensus is to go with JSF.While I'm convinced that JSF will work for us it always seems so cumbersome. I've convinced by boss to give Wicket a 2nd look, and so this weekend I threw together the attached.If anyone is inclined to give it a quick glance for best practices type considerations I'd certainly be appreciative. The only relevant files are the jetty config, web.xml the java/html. There are two apps that both sub-class an abstract app.The Concierge version is for retail sales while the C3 version is for our call center. The urls are below. Thank you, Scott -- Forwarded message -- From: Scott Swank [EMAIL PROTECTED]Date: Oct 8, 2006 10:41 PM Subject: concierge/c3 in wicket To: Scott Swank [EMAIL PROTECTED], Scott Swank [EMAIL PROTECTED] http://localhost:8081/concierge/app http://localhost:8081/concierge/c3 -- Scott Swank reformed mathematician Power is not a means, it is an end. One does not establish a dictatorship in order to safeguard a revolution; one makes the revolution in order to establish the dictatorship. The object of persecution is persecution. The object of torture is torture. The object of power is power.-- George Orwell, 1984 -- Scott Swank reformed mathematician Power is not a means, it is an end. One does not establish a dictatorship in order to safeguard a revolution; one makes the revolution in order to establish the dictatorship. The object of persecution is persecution. The object of torture is torture. The object of power is power.-- George Orwell, 1984 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get