Re: Dirty read/edit problem.
If it's fairly unlikely that two people would be editing the same record at the same time, then it's probably okay to go with optimistic locking. On Mon, Jun 22, 2009 at 8:41 PM, satar wrote: > > Yep, that is what I thought from the reading I have done. I think I will do > it the way I have in the past but using an application-level edit table > instead of having to use a database. This feels more natural to me and I > have spent an absorbent amount of time learning Hibernate already and just > hoping that I get some return from all of the complexities it has > eventually. I do believe that will be the case because all you smart peeps > wouldn't be using it if there was nothing to gain. The dirty read problem > seems like such a normal condition for any application that has multiple > writers, so I thought I would see what is a typical approach within web > apps > -- something I am very new at. > -- > View this message in context: > http://www.nabble.com/Dirty-read-edit-problem.-tp24157057p24158076.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Dirty read/edit problem.
Yep, that is what I thought from the reading I have done. I think I will do it the way I have in the past but using an application-level edit table instead of having to use a database. This feels more natural to me and I have spent an absorbent amount of time learning Hibernate already and just hoping that I get some return from all of the complexities it has eventually. I do believe that will be the case because all you smart peeps wouldn't be using it if there was nothing to gain. The dirty read problem seems like such a normal condition for any application that has multiple writers, so I thought I would see what is a typical approach within web apps -- something I am very new at. -- View this message in context: http://www.nabble.com/Dirty-read-edit-problem.-tp24157057p24158076.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Dirty read/edit problem.
With optimistic locking, there's no real way to know that someone else is "thinking" about editing something. As Scott said, I think you want pessimistic locking. On Mon, Jun 22, 2009 at 7:24 PM, satar wrote: > > Hum, I may not have a complete understanding of optimistic locking. Bottom > line is that when someone wants to start editing, I want them to know > before > they start if someone else is already in the midths of editing a given > item. > I do not want to just hope that two people never edit the same thing and if > they do error out on the last to try to save if they didn't have the right > starting version. It seems like that is what could happen in the optimistic > approach but I could be wrong as I have never used the approach. I will > study the LockMode.UPGRADE, but if it doesn't give me a way to give user > feedback when someone else is in edit "thinking" mode, I don't think I > would > use it. > -- > View this message in context: > http://www.nabble.com/Dirty-read-edit-problem.-tp24157057p24157353.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: How to Make a Multiselect Drop Down or Check Box List Collapsible?
I find that putting tag.put("onfocus", "this.size = 5;"); > tag.put("onblur", "this.size = 1;"); > tag.put("size", "1"); > tag.put("multiple", "multiple"); into DropDownChoice.onComponentTag() does most of what you're looking for. You'll have to play around with it some, but that might help. On Mon, Jun 22, 2009 at 4:01 PM, Dane Laverty wrote: > I haven't tried it, but I imagine you could create a JavaScript onclick > event that changes the SIZE attribute on the . > > > On Mon, Jun 22, 2009 at 9:02 AM, Keith Bennett wrote: > >> We would like to have a multiselect component that only takes up a >> single line on the page when not active. For example, something that >> looks and behaves like the DropDownChoice, but that allows multiple >> selection when activated, would be nice. >> >> Is there such a thing in Wicket? >> >> Thanks, >> Keith >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >
Re: Dirty read/edit problem.
Hum, I may not have a complete understanding of optimistic locking. Bottom line is that when someone wants to start editing, I want them to know before they start if someone else is already in the midths of editing a given item. I do not want to just hope that two people never edit the same thing and if they do error out on the last to try to save if they didn't have the right starting version. It seems like that is what could happen in the optimistic approach but I could be wrong as I have never used the approach. I will study the LockMode.UPGRADE, but if it doesn't give me a way to give user feedback when someone else is in edit "thinking" mode, I don't think I would use it. -- View this message in context: http://www.nabble.com/Dirty-read-edit-problem.-tp24157057p24157353.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Dirty read/edit problem.
Why not just lock the relevant row of the relevant table? Versioning is for optimistic locking, but it sounds to me like you want plain old pessimistic locking. In Hibernate, check out LockMode.UPGRADE. Scott On Mon, Jun 22, 2009 at 3:58 PM, Steve Tarlton wrote: > I thought I would throw this one out to the user group and see if it makes > sense or am I over complicating things. I am implementing a check list > system using Wicket-Hibernate-Spring. There could potentially be more than > one person trying to edit a given check item within the list and I want to > be sure that two edits against the same check item cannot happen. > > I have implemented something like this before using two database tables one > for locking and one for writing who has the lock on a given object. Of > course, that wasn't a web application and it wasn't a client/server > application (well unless you consider the database the server, which is kind > of what I was doing). I would hold on to the transaction for a row id lock > table until the corresponding row that the user was editing was updated this > included the user think time as they had to press a button to edit, which > created this lock table entry as well as a entry in a lock info table that > was committed so that when user b tried to hit edit, it would pull a > transaction isolation exception and then go lookup who had the item locked. > > Okay, so I want to implement this same sort of mechanism for check items; > however, because there is a common application-level that everyone connected > shares (I will only have one webserver as opposed to a farm), I was thinking > that I implement a edit-in-progress table as a data source in the > application-layer. Then, when someone clicks the edit button on a selected > check item, I use the edit-in-progress table to make sure someone else isn't > editing the given item. Is this a typical or at least a good approach to > solve such a problem or is there something within Hibernate that I am > unaware of that handles this. I have read about the mult-versioning but how > would you tell the user BEFORE they start to edit something that someone > else has it locked? > > Sorry, I know this was a long post but I have to believe that others may > wonder about this kind of user interaction as well and I haven't seen > anything on the topic with the searches I did. > > Thanks, > -Steve > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to Make a Multiselect Drop Down or Check Box List Collapsible?
I haven't tried it, but I imagine you could create a JavaScript onclick event that changes the SIZE attribute on the . On Mon, Jun 22, 2009 at 9:02 AM, Keith Bennett wrote: > We would like to have a multiselect component that only takes up a > single line on the page when not active. For example, something that > looks and behaves like the DropDownChoice, but that allows multiple > selection when activated, would be nice. > > Is there such a thing in Wicket? > > Thanks, > Keith > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Dirty read/edit problem.
I thought I would throw this one out to the user group and see if it makes sense or am I over complicating things. I am implementing a check list system using Wicket-Hibernate-Spring. There could potentially be more than one person trying to edit a given check item within the list and I want to be sure that two edits against the same check item cannot happen. I have implemented something like this before using two database tables one for locking and one for writing who has the lock on a given object. Of course, that wasn't a web application and it wasn't a client/server application (well unless you consider the database the server, which is kind of what I was doing). I would hold on to the transaction for a row id lock table until the corresponding row that the user was editing was updated this included the user think time as they had to press a button to edit, which created this lock table entry as well as a entry in a lock info table that was committed so that when user b tried to hit edit, it would pull a transaction isolation exception and then go lookup who had the item locked. Okay, so I want to implement this same sort of mechanism for check items; however, because there is a common application-level that everyone connected shares (I will only have one webserver as opposed to a farm), I was thinking that I implement a edit-in-progress table as a data source in the application-layer. Then, when someone clicks the edit button on a selected check item, I use the edit-in-progress table to make sure someone else isn't editing the given item. Is this a typical or at least a good approach to solve such a problem or is there something within Hibernate that I am unaware of that handles this. I have read about the mult-versioning but how would you tell the user BEFORE they start to edit something that someone else has it locked? Sorry, I know this was a long post but I have to believe that others may wonder about this kind of user interaction as well and I haven't seen anything on the topic with the searches I did. Thanks, -Steve
Re: Wicket + Spring DM + Hibernate
Sorry, that's IWebApplicationFactory, not IWicketApplicationFactory. Long day. On Mon, Jun 22, 2009 at 5:05 PM, James Carman wrote: > You will probably need to make your application class a singleton > (with a getInstance() method and stuff) and specify that in the spring > configuration: > > class="com.myco.myapp.MyWicketApplication" > factory-method="getInstance" /> > > Also, you will probably need to implement your own > IWicketApplicationFactory to return the singleton instance since you > won't have access to the Spring ApplicationContext to lookup your > "application" object. > > On Mon, Jun 22, 2009 at 3:57 PM, Igor Vaynberg wrote: >> you have to create wicketapplication instance as a spring bean in >> order for setapplicationcontext to be called. >> >> -igor >> >> On Mon, Jun 22, 2009 at 12:47 PM, Daniel Dominik >> Holúbek wrote: >>> I tried implementing the ApplicationContextAware interface, it looked like a >>> good idea, but the "setApplicationContext" method is never called. >>> >>> On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek < >>> dankodo...@gmail.com> wrote: >>> For now, only in eclipse. But when it goes to production (or further testing) it will run in equinox bridge. On Mon, Jun 22, 2009 at 5:14 PM, James Carman < jcar...@carmanconsulting.com> wrote: > That's what I'd try, perhaps. How are you starting this application? > Only in eclipse? > > On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik > Holúbek wrote: > > Well, I don't know :)I > > > > On Mon, Jun 22, 2009 at 12:32 PM, James Carman < > jcar...@carmanconsulting.com > >> wrote: > > > >> Can you have your Application object created as a Spring bean and make > >> it context "aware" and let the container inject the context into it? > >> > >> On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik > >> Holúbek wrote: > >> > But as far as I understand this, Spring DM is built upon the idea > that I > >> > can't build ApplicationContext, as it is built by Spring DM Extender. > Am > >> I > >> > right? > >> > > >> > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < > >> jcar...@carmanconsulting.com > >> >> wrote: > >> > > >> >> Try using the other SpringComponentInjector constructor (the one > that > >> >> takes an ApplicationContext object). Construct your > >> >> ApplicationContext however you want. > >> >> > >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek > >> >> wrote: > >> >> > > >> >> > Well, no.I'll explain: > >> >> > It's an OSGi app running in equinox-bridge. In my bundles there is > no > >> >> > web.xml, and that's why I can't configure ContextLoaderListener. > >> >> > And because of this, when i add @SpringBean into my code, then add > >> >> > "addComponentInstantiationListener(new > SpringComponentInjector(this))" > >> >> into > >> >> > WebApplication's init method and then run the application, the > only > >> thing > >> >> I > >> >> > get is this exception: java.lang.IllegalStateException: No > >> >> > WebApplicationContext found: no ContextLoaderListener registered? > >> >> > > >> >> > But if there is a way how to set up that listener, I would be > happy :) > >> >> > > >> >> > > >> >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman > >> >> > wrote: > >> >> > > >> >> > > You can't use @SpringBean? > >> >> > > > >> >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik > >> >> > > Holúbek wrote: > >> >> > > > Hello everyone :)So, I solved the Spring DM problems > >> successfully... > >> >> but > >> >> > > > there is still one problem left, and this time I am absolutely > >> sure > >> >> that > >> >> > > > it's a Wicket related problem :) > >> >> > > > > >> >> > > > I want to inject my "userDao" bean into Panel class. To do > that, I > >> >> nead > >> >> > > to > >> >> > > > create a bean from that Panel class - like this: > >> >> > > > > >> >> > > > > >> >> > > > >> >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" > >> >> > > > init-method="init"> > >> >> > > > > >> >> > > > > >> >> > > > > >> >> > > > > >> >> > > > But when I try this, I get an exception: > >> >> > > > > >> >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is > no > >> >> > > application > >> >> > > > attached to current thread SpringOsgiExtenderThread-4 > >> >> > > > This happens when Spring is trying to instantiate the Panel > class. > >> >> > > > > >> >> > > > I tried this with ordinary class and everything worked fine. > The > >> idea > >> >> was > >> >> > > > that I will instantiate a normal class, and then I will access > it > >> >> from > >> >> > > the > >> >> > > > Panel class,
Oli's Presentation - Learn More About Wicket and, Contribute
We've posted Oliver Evans' great presentation from our June 2009 London Wicket Event to http://jweekend.com/dev/ArticlesPage http://code.google.com/p/londonwicket . It's a must read if you're planning on getting right inside Wicket or preparing yourself to contribute some patches (ideally with tests where practical!). You can also see photos of some of the conspirators (Al Maw must have been taking ALL the pictures, so he's in none of them, this time!) from our first Wicket bug-fixing session in London. Check out the Wiki entry too at http://code.google.com/p/londonwicket/ . We're looking to run another Wicket Jira night at jWeekend soon so drop me a line via our site if you've looked at the presentation/read the Wiki entry, set up your environment and would like to get involved next time. Regards - Cemal jWeekend http://jWeekend.com PS If you missed Oli's talk, it's OK - I'm going to ask him to deliver it again as I know a lot of people who missed our June event would enjoy that as much as those there did. Same goes for Al's "Stateless Everything" talk from the same event, yet another classic! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring DM + Hibernate
You will probably need to make your application class a singleton (with a getInstance() method and stuff) and specify that in the spring configuration: Also, you will probably need to implement your own IWicketApplicationFactory to return the singleton instance since you won't have access to the Spring ApplicationContext to lookup your "application" object. On Mon, Jun 22, 2009 at 3:57 PM, Igor Vaynberg wrote: > you have to create wicketapplication instance as a spring bean in > order for setapplicationcontext to be called. > > -igor > > On Mon, Jun 22, 2009 at 12:47 PM, Daniel Dominik > Holúbek wrote: >> I tried implementing the ApplicationContextAware interface, it looked like a >> good idea, but the "setApplicationContext" method is never called. >> >> On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek < >> dankodo...@gmail.com> wrote: >> >>> For now, only in eclipse. But when it goes to production (or further >>> testing) it will run in equinox bridge. >>> >>> >>> On Mon, Jun 22, 2009 at 5:14 PM, James Carman < >>> jcar...@carmanconsulting.com> wrote: >>> That's what I'd try, perhaps. How are you starting this application? Only in eclipse? On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik Holúbek wrote: > Well, I don't know :)I > > On Mon, Jun 22, 2009 at 12:32 PM, James Carman < jcar...@carmanconsulting.com >> wrote: > >> Can you have your Application object created as a Spring bean and make >> it context "aware" and let the container inject the context into it? >> >> On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik >> Holúbek wrote: >> > But as far as I understand this, Spring DM is built upon the idea that I >> > can't build ApplicationContext, as it is built by Spring DM Extender. Am >> I >> > right? >> > >> > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < >> jcar...@carmanconsulting.com >> >> wrote: >> > >> >> Try using the other SpringComponentInjector constructor (the one that >> >> takes an ApplicationContext object). Construct your >> >> ApplicationContext however you want. >> >> >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek >> >> wrote: >> >> > >> >> > Well, no.I'll explain: >> >> > It's an OSGi app running in equinox-bridge. In my bundles there is no >> >> > web.xml, and that's why I can't configure ContextLoaderListener. >> >> > And because of this, when i add @SpringBean into my code, then add >> >> > "addComponentInstantiationListener(new SpringComponentInjector(this))" >> >> into >> >> > WebApplication's init method and then run the application, the only >> thing >> >> I >> >> > get is this exception: java.lang.IllegalStateException: No >> >> > WebApplicationContext found: no ContextLoaderListener registered? >> >> > >> >> > But if there is a way how to set up that listener, I would be happy :) >> >> > >> >> > >> >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman >> >> > wrote: >> >> > >> >> > > You can't use @SpringBean? >> >> > > >> >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik >> >> > > Holúbek wrote: >> >> > > > Hello everyone :)So, I solved the Spring DM problems >> successfully... >> >> but >> >> > > > there is still one problem left, and this time I am absolutely >> sure >> >> that >> >> > > > it's a Wicket related problem :) >> >> > > > >> >> > > > I want to inject my "userDao" bean into Panel class. To do that, I >> >> nead >> >> > > to >> >> > > > create a bean from that Panel class - like this: >> >> > > > >> >> > > > >> >> > > > >>> >> >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" >> >> > > > init-method="init"> >> >> > > > >> >> > > > >> >> > > > >> >> > > > >> >> > > > But when I try this, I get an exception: >> >> > > > >> >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is no >> >> > > application >> >> > > > attached to current thread SpringOsgiExtenderThread-4 >> >> > > > This happens when Spring is trying to instantiate the Panel class. >> >> > > > >> >> > > > I tried this with ordinary class and everything worked fine. The >> idea >> >> was >> >> > > > that I will instantiate a normal class, and then I will access it >> >> from >> >> > > the >> >> > > > Panel class, but when I do: >> >> > > > >> >> > > > ServiceConsumer sc = new ServiceConsumer(); >> >> > > > >> >> > > > and then access userDao, I'll get a NullPointerException of >> course. >> >> > > > >> >> > > > So has anybody done this before? I think I need your help :) >> >> > > > >> >> > > > Thanks a lot! >
Re: How to add filter to palette component?
Sorry Fernando but it's not helpful. When i click in my search button (a button out of palette) i want to change all data from the left side of palette (Available itens). I don't want to interact with the palette buttons i want to use a button out of the component. Using PropertyModel availableItens = new PropertyModel(this, "listDirector"); or Model availableItens = new Model((Serializable) this.listDirector); .. form.add(new Palette("palette", selectedItens, availableItens, renderer, 10, true)); form.add(new(AjaxLink btFilterPaletteContent = new AjaxLink("btFilterPaletteContent"){ @Override public void onClick(AjaxRequestTarget target) { What i can put here to change my avaliable itens (the palette left list)? target.addComponent(this.form); } };) 2009/6/22 Fernando Wermus : > If I understood correctly you would want to do this (which It can be found > at Palette comments at the begining) > > Ajaxifying the palette: The palette itself cannot be > ajaxified because it is a > panel and therefore does not receive any javascript events. Instead ajax > behaviors can be > attached to the recorder component which supports the javascript > onchange event. The > recorder component can be retrieved via a call to {...@link > #getRecorderComponent()}. > > Example: > > > Form form=new Form(...); > Palette palette=new Palette(...); > palette.getRecorderComponent().add(new > AjaxFormComponentUpdatingBehavior("onchange") {...}); > > Then when someone click in any of the buttons you can take a decision over > the selected items or choiced items. You can do this without ajax replacing > the newUp, new newDown protected methods. > > I hope I help you a bit. > > On Mon, Jun 22, 2009 at 12:08 PM, Rangel Preis wrote: > >> Hi, how can i filter the possible choices in the palette component i >> read the topics below put it not helpful for me. >> >> >> http://www.nabble.com/how-to-add-filter-for-Palette-choice-td23269578.html#a23269578 >> >> http://www.nabble.com/changing-choices-component-in-Palette-td23982514.html#a23982514 >> >> I have this: >> >> final IChoiceRenderer renderer = new >> ChoiceRenderer("name", "name"); >> form.add(new Palette("paletteDiretores", selectedItens, >> availableItens, renderer, 10, true)); >> >> And a button: >> >> AjaxLink btFilterPaletteContent = new AjaxLink("btFilterPaletteContent"){ >> >> �...@override >> public void onClick(AjaxRequestTarget target) { >> availableItens = search new itens >> } >> }; >> >> I try this and don't work, if i inspect the objet the value is OK, but >> in the screen the palette become blank. >> >> i try to use propertymodel to avaliableitens... don't work too.. >> I just want to chance the content of the avaliable itens in the panel >> without affect the selecteds itens. >> >> Anyone can help me? >> >> Thanks. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > Fernando Wermus. > > www.linkedin.com/in/fernandowermus > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Apply Decorator Pattern to Panels
thats what borders do. -igor On Mon, Jun 22, 2009 at 1:20 PM, Pi Trash wrote: > Hi, > > is there a way to decorate a panel? with inheritance it doesn't work, because > you have to say explicitly in the super html where the child content will be > put into. > __ > GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://movieflat.web.de > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: redirect to mailto
Thanks, Erik. But I need to have this behavior initiated in response to an ajax event (say, on an onchange for a select drop down). On Mon, Jun 22, 2009 at 2:00 PM, Erik van Oosten wrote: > You can use ExternalLink with a mailto: url. > > Regards, > Erik. > > Aaron Dixon wrote: >> >> How do I redirect to a mailto: url? This doesn't seem to work: >> >> final String url = "mailto:...";; >> getRequestCycle().setRequestTarget(new IRequestTarget() >> { >> �...@override >> public void detach(RequestCycle requestCycle) {} >> �...@override >> public void respond(RequestCycle requestCycle) { >> Response response = requestCycle.getResponse(); >> response.reset(); >> response.redirect(url); >> } >> }); >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Apply Decorator Pattern to Panels
Hi, is there a way to decorate a panel? with inheritance it doesn't work, because you have to say explicitly in the super html where the child content will be put into. __ GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! Jetzt freischalten unter http://movieflat.web.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring DM + Hibernate
you have to create wicketapplication instance as a spring bean in order for setapplicationcontext to be called. -igor On Mon, Jun 22, 2009 at 12:47 PM, Daniel Dominik Holúbek wrote: > I tried implementing the ApplicationContextAware interface, it looked like a > good idea, but the "setApplicationContext" method is never called. > > On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek < > dankodo...@gmail.com> wrote: > >> For now, only in eclipse. But when it goes to production (or further >> testing) it will run in equinox bridge. >> >> >> On Mon, Jun 22, 2009 at 5:14 PM, James Carman < >> jcar...@carmanconsulting.com> wrote: >> >>> That's what I'd try, perhaps. How are you starting this application? >>> Only in eclipse? >>> >>> On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik >>> Holúbek wrote: >>> > Well, I don't know :)I >>> > >>> > On Mon, Jun 22, 2009 at 12:32 PM, James Carman < >>> jcar...@carmanconsulting.com >>> >> wrote: >>> > >>> >> Can you have your Application object created as a Spring bean and make >>> >> it context "aware" and let the container inject the context into it? >>> >> >>> >> On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik >>> >> Holúbek wrote: >>> >> > But as far as I understand this, Spring DM is built upon the idea >>> that I >>> >> > can't build ApplicationContext, as it is built by Spring DM Extender. >>> Am >>> >> I >>> >> > right? >>> >> > >>> >> > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < >>> >> jcar...@carmanconsulting.com >>> >> >> wrote: >>> >> > >>> >> >> Try using the other SpringComponentInjector constructor (the one >>> that >>> >> >> takes an ApplicationContext object). Construct your >>> >> >> ApplicationContext however you want. >>> >> >> >>> >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek >>> >> >> wrote: >>> >> >> > >>> >> >> > Well, no.I'll explain: >>> >> >> > It's an OSGi app running in equinox-bridge. In my bundles there is >>> no >>> >> >> > web.xml, and that's why I can't configure ContextLoaderListener. >>> >> >> > And because of this, when i add @SpringBean into my code, then add >>> >> >> > "addComponentInstantiationListener(new >>> SpringComponentInjector(this))" >>> >> >> into >>> >> >> > WebApplication's init method and then run the application, the >>> only >>> >> thing >>> >> >> I >>> >> >> > get is this exception: java.lang.IllegalStateException: No >>> >> >> > WebApplicationContext found: no ContextLoaderListener registered? >>> >> >> > >>> >> >> > But if there is a way how to set up that listener, I would be >>> happy :) >>> >> >> > >>> >> >> > >>> >> >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman >>> >> >> > wrote: >>> >> >> > >>> >> >> > > You can't use @SpringBean? >>> >> >> > > >>> >> >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik >>> >> >> > > Holúbek wrote: >>> >> >> > > > Hello everyone :)So, I solved the Spring DM problems >>> >> successfully... >>> >> >> but >>> >> >> > > > there is still one problem left, and this time I am absolutely >>> >> sure >>> >> >> that >>> >> >> > > > it's a Wicket related problem :) >>> >> >> > > > >>> >> >> > > > I want to inject my "userDao" bean into Panel class. To do >>> that, I >>> >> >> nead >>> >> >> > > to >>> >> >> > > > create a bean from that Panel class - like this: >>> >> >> > > > >>> >> >> > > > >>> >> >> > > > >> >> >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" >>> >> >> > > > init-method="init"> >>> >> >> > > > >>> >> >> > > > >>> >> >> > > > >>> >> >> > > > >>> >> >> > > > But when I try this, I get an exception: >>> >> >> > > > >>> >> >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is >>> no >>> >> >> > > application >>> >> >> > > > attached to current thread SpringOsgiExtenderThread-4 >>> >> >> > > > This happens when Spring is trying to instantiate the Panel >>> class. >>> >> >> > > > >>> >> >> > > > I tried this with ordinary class and everything worked fine. >>> The >>> >> idea >>> >> >> was >>> >> >> > > > that I will instantiate a normal class, and then I will access >>> it >>> >> >> from >>> >> >> > > the >>> >> >> > > > Panel class, but when I do: >>> >> >> > > > >>> >> >> > > > ServiceConsumer sc = new ServiceConsumer(); >>> >> >> > > > >>> >> >> > > > and then access userDao, I'll get a NullPointerException of >>> >> course. >>> >> >> > > > >>> >> >> > > > So has anybody done this before? I think I need your help :) >>> >> >> > > > >>> >> >> > > > Thanks a lot! >>> >> >> > > > >>> >> >> > > > On Tue, Jun 16, 2009 at 2:01 AM, djo mos < >>> djo.mli...@gmail.com> >>> >> >> wrote: >>> >> >> > > > >>> >> >> > > >> Hi, >>> >> >> > > >> >>> >> >> > > >> On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek < >>> >> >> > > >> dankodo...@gmail.com> wrote: >>> >> >> > > >> >>> >> >> > > >> > Well, may be, but won't they send me back to this >>> mailinglist? >>> >> >> :)To be >>> >> >> > > >> > honest, I have only a little problem with Spring DM itself >>> >> (there >>> >> >> are >>> >> >> > > >> > couple >>> >> >> > >
Re: Wicket + Spring DM + Hibernate
I tried implementing the ApplicationContextAware interface, it looked like a good idea, but the "setApplicationContext" method is never called. On Mon, Jun 22, 2009 at 8:25 PM, Daniel Dominik Holúbek < dankodo...@gmail.com> wrote: > For now, only in eclipse. But when it goes to production (or further > testing) it will run in equinox bridge. > > > On Mon, Jun 22, 2009 at 5:14 PM, James Carman < > jcar...@carmanconsulting.com> wrote: > >> That's what I'd try, perhaps. How are you starting this application? >> Only in eclipse? >> >> On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik >> Holúbek wrote: >> > Well, I don't know :)I >> > >> > On Mon, Jun 22, 2009 at 12:32 PM, James Carman < >> jcar...@carmanconsulting.com >> >> wrote: >> > >> >> Can you have your Application object created as a Spring bean and make >> >> it context "aware" and let the container inject the context into it? >> >> >> >> On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik >> >> Holúbek wrote: >> >> > But as far as I understand this, Spring DM is built upon the idea >> that I >> >> > can't build ApplicationContext, as it is built by Spring DM Extender. >> Am >> >> I >> >> > right? >> >> > >> >> > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < >> >> jcar...@carmanconsulting.com >> >> >> wrote: >> >> > >> >> >> Try using the other SpringComponentInjector constructor (the one >> that >> >> >> takes an ApplicationContext object). Construct your >> >> >> ApplicationContext however you want. >> >> >> >> >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek >> >> >> wrote: >> >> >> > >> >> >> > Well, no.I'll explain: >> >> >> > It's an OSGi app running in equinox-bridge. In my bundles there is >> no >> >> >> > web.xml, and that's why I can't configure ContextLoaderListener. >> >> >> > And because of this, when i add @SpringBean into my code, then add >> >> >> > "addComponentInstantiationListener(new >> SpringComponentInjector(this))" >> >> >> into >> >> >> > WebApplication's init method and then run the application, the >> only >> >> thing >> >> >> I >> >> >> > get is this exception: java.lang.IllegalStateException: No >> >> >> > WebApplicationContext found: no ContextLoaderListener registered? >> >> >> > >> >> >> > But if there is a way how to set up that listener, I would be >> happy :) >> >> >> > >> >> >> > >> >> >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman >> >> >> > wrote: >> >> >> > >> >> >> > > You can't use @SpringBean? >> >> >> > > >> >> >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik >> >> >> > > Holúbek wrote: >> >> >> > > > Hello everyone :)So, I solved the Spring DM problems >> >> successfully... >> >> >> but >> >> >> > > > there is still one problem left, and this time I am absolutely >> >> sure >> >> >> that >> >> >> > > > it's a Wicket related problem :) >> >> >> > > > >> >> >> > > > I want to inject my "userDao" bean into Panel class. To do >> that, I >> >> >> nead >> >> >> > > to >> >> >> > > > create a bean from that Panel class - like this: >> >> >> > > > >> >> >> > > > >> >> >> > > > > >> >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" >> >> >> > > > init-method="init"> >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > But when I try this, I get an exception: >> >> >> > > > >> >> >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is >> no >> >> >> > > application >> >> >> > > > attached to current thread SpringOsgiExtenderThread-4 >> >> >> > > > This happens when Spring is trying to instantiate the Panel >> class. >> >> >> > > > >> >> >> > > > I tried this with ordinary class and everything worked fine. >> The >> >> idea >> >> >> was >> >> >> > > > that I will instantiate a normal class, and then I will access >> it >> >> >> from >> >> >> > > the >> >> >> > > > Panel class, but when I do: >> >> >> > > > >> >> >> > > > ServiceConsumer sc = new ServiceConsumer(); >> >> >> > > > >> >> >> > > > and then access userDao, I'll get a NullPointerException of >> >> course. >> >> >> > > > >> >> >> > > > So has anybody done this before? I think I need your help :) >> >> >> > > > >> >> >> > > > Thanks a lot! >> >> >> > > > >> >> >> > > > On Tue, Jun 16, 2009 at 2:01 AM, djo mos < >> djo.mli...@gmail.com> >> >> >> wrote: >> >> >> > > > >> >> >> > > >> Hi, >> >> >> > > >> >> >> >> > > >> On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek < >> >> >> > > >> dankodo...@gmail.com> wrote: >> >> >> > > >> >> >> >> > > >> > Well, may be, but won't they send me back to this >> mailinglist? >> >> >> :)To be >> >> >> > > >> > honest, I have only a little problem with Spring DM itself >> >> (there >> >> >> are >> >> >> > > >> > couple >> >> >> > > >> > of tutorials out there), I was only curious about whether >> >> somebody >> >> >> has >> >> >> > > >> > successfully tried this. >> >> >> > > >> > For example, now it seems that the dependency is not being >> >> >> injected in >> >> >> > > my >> >> >> > > >> > code. And I can't do that via @SpringBean, because that >> nee
Re: How to add filter to palette component?
If I understood correctly you would want to do this (which It can be found at Palette comments at the begining) Ajaxifying the palette: The palette itself cannot be ajaxified because it is a panel and therefore does not receive any javascript events. Instead ajax behaviors can be attached to the recorder component which supports the javascript onchange event. The recorder component can be retrieved via a call to {...@link #getRecorderComponent()}. Example: Form form=new Form(...); Palette palette=new Palette(...); palette.getRecorderComponent().add(new AjaxFormComponentUpdatingBehavior("onchange") {...}); Then when someone click in any of the buttons you can take a decision over the selected items or choiced items. You can do this without ajax replacing the newUp, new newDown protected methods. I hope I help you a bit. On Mon, Jun 22, 2009 at 12:08 PM, Rangel Preis wrote: > Hi, how can i filter the possible choices in the palette component i > read the topics below put it not helpful for me. > > > http://www.nabble.com/how-to-add-filter-for-Palette-choice-td23269578.html#a23269578 > > http://www.nabble.com/changing-choices-component-in-Palette-td23982514.html#a23982514 > > I have this: > > final IChoiceRenderer renderer = new > ChoiceRenderer("name", "name"); > form.add(new Palette("paletteDiretores", selectedItens, > availableItens, renderer, 10, true)); > > And a button: > > AjaxLink btFilterPaletteContent = new AjaxLink("btFilterPaletteContent"){ > >@Override >public void onClick(AjaxRequestTarget target) { >availableItens = search new itens >} > }; > > I try this and don't work, if i inspect the objet the value is OK, but > in the screen the palette become blank. > > i try to use propertymodel to avaliableitens... don't work too.. > I just want to chance the content of the avaliable itens in the panel > without affect the selecteds itens. > > Anyone can help me? > > Thanks. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Fernando Wermus. www.linkedin.com/in/fernandowermus
How to add filter to palette component?
Hi, how can i filter the possible choices in the palette component i read the topics below put it not helpful for me. http://www.nabble.com/how-to-add-filter-for-Palette-choice-td23269578.html#a23269578 http://www.nabble.com/changing-choices-component-in-Palette-td23982514.html#a23982514 I have this: final IChoiceRenderer renderer = new ChoiceRenderer("name", "name"); form.add(new Palette("paletteDiretores", selectedItens, availableItens, renderer, 10, true)); And a button: AjaxLink btFilterPaletteContent = new AjaxLink("btFilterPaletteContent"){ @Override public void onClick(AjaxRequestTarget target) { availableItens = search new itens } }; I try this and don't work, if i inspect the objet the value is OK, but in the screen the palette become blank. i try to use propertymodel to avaliableitens... don't work too.. I just want to chance the content of the avaliable itens in the panel without affect the selecteds itens. Anyone can help me? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: redirect to mailto
You can use ExternalLink with a mailto: url. Regards, Erik. Aaron Dixon wrote: How do I redirect to a mailto: url? This doesn't seem to work: final String url = "mailto:...";; getRequestCycle().setRequestTarget(new IRequestTarget() { @Override public void detach(RequestCycle requestCycle) {} @Override public void respond(RequestCycle requestCycle) { Response response = requestCycle.getResponse(); response.reset(); response.redirect(url); } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring DM + Hibernate
For now, only in eclipse. But when it goes to production (or further testing) it will run in equinox bridge. On Mon, Jun 22, 2009 at 5:14 PM, James Carman wrote: > That's what I'd try, perhaps. How are you starting this application? > Only in eclipse? > > On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik > Holúbek wrote: > > Well, I don't know :)I > > > > On Mon, Jun 22, 2009 at 12:32 PM, James Carman < > jcar...@carmanconsulting.com > >> wrote: > > > >> Can you have your Application object created as a Spring bean and make > >> it context "aware" and let the container inject the context into it? > >> > >> On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik > >> Holúbek wrote: > >> > But as far as I understand this, Spring DM is built upon the idea that > I > >> > can't build ApplicationContext, as it is built by Spring DM Extender. > Am > >> I > >> > right? > >> > > >> > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < > >> jcar...@carmanconsulting.com > >> >> wrote: > >> > > >> >> Try using the other SpringComponentInjector constructor (the one that > >> >> takes an ApplicationContext object). Construct your > >> >> ApplicationContext however you want. > >> >> > >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek > >> >> wrote: > >> >> > > >> >> > Well, no.I'll explain: > >> >> > It's an OSGi app running in equinox-bridge. In my bundles there is > no > >> >> > web.xml, and that's why I can't configure ContextLoaderListener. > >> >> > And because of this, when i add @SpringBean into my code, then add > >> >> > "addComponentInstantiationListener(new > SpringComponentInjector(this))" > >> >> into > >> >> > WebApplication's init method and then run the application, the only > >> thing > >> >> I > >> >> > get is this exception: java.lang.IllegalStateException: No > >> >> > WebApplicationContext found: no ContextLoaderListener registered? > >> >> > > >> >> > But if there is a way how to set up that listener, I would be happy > :) > >> >> > > >> >> > > >> >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman > >> >> > wrote: > >> >> > > >> >> > > You can't use @SpringBean? > >> >> > > > >> >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik > >> >> > > Holúbek wrote: > >> >> > > > Hello everyone :)So, I solved the Spring DM problems > >> successfully... > >> >> but > >> >> > > > there is still one problem left, and this time I am absolutely > >> sure > >> >> that > >> >> > > > it's a Wicket related problem :) > >> >> > > > > >> >> > > > I want to inject my "userDao" bean into Panel class. To do > that, I > >> >> nead > >> >> > > to > >> >> > > > create a bean from that Panel class - like this: > >> >> > > > > >> >> > > > > >> >> > > > >> >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" > >> >> > > > init-method="init"> > >> >> > > > > >> >> > > > > >> >> > > > > >> >> > > > > >> >> > > > But when I try this, I get an exception: > >> >> > > > > >> >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is > no > >> >> > > application > >> >> > > > attached to current thread SpringOsgiExtenderThread-4 > >> >> > > > This happens when Spring is trying to instantiate the Panel > class. > >> >> > > > > >> >> > > > I tried this with ordinary class and everything worked fine. > The > >> idea > >> >> was > >> >> > > > that I will instantiate a normal class, and then I will access > it > >> >> from > >> >> > > the > >> >> > > > Panel class, but when I do: > >> >> > > > > >> >> > > > ServiceConsumer sc = new ServiceConsumer(); > >> >> > > > > >> >> > > > and then access userDao, I'll get a NullPointerException of > >> course. > >> >> > > > > >> >> > > > So has anybody done this before? I think I need your help :) > >> >> > > > > >> >> > > > Thanks a lot! > >> >> > > > > >> >> > > > On Tue, Jun 16, 2009 at 2:01 AM, djo mos > > >> >> wrote: > >> >> > > > > >> >> > > >> Hi, > >> >> > > >> > >> >> > > >> On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek < > >> >> > > >> dankodo...@gmail.com> wrote: > >> >> > > >> > >> >> > > >> > Well, may be, but won't they send me back to this > mailinglist? > >> >> :)To be > >> >> > > >> > honest, I have only a little problem with Spring DM itself > >> (there > >> >> are > >> >> > > >> > couple > >> >> > > >> > of tutorials out there), I was only curious about whether > >> somebody > >> >> has > >> >> > > >> > successfully tried this. > >> >> > > >> > For example, now it seems that the dependency is not being > >> >> injected in > >> >> > > my > >> >> > > >> > code. And I can't do that via @SpringBean, because that > needs > >> to > >> >> be > >> >> > > set > >> >> > > >> in > >> >> > > >> > web.xml, and I have no web.xml in my OSGi bundle. > >> >> > > >> > >> >> > > >> > >> >> > > >> Actually with Spring DM you do have web.xml in web bundles, as > >> >> described > >> >> > > in > >> >> > > >> their reference documentation. > >> >> > > >> I'v been able to use Wicket with Spring DM without problems. > No > >> >> > > Hibernate > >> >> > > >> though : it
[OT] wicket stuff rome. How to persist an rss in a file
Hi all, I am developing a soft with the examples of wicketstuff-rome-examples. But I cannot find any example on how to persist in disk a rss feed. It is really poor what I found in Rome site. Does anyone have this experience and could lead me a little? Thanks in advance. -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: Trying to add string literal to Javascript for Google Analytics
Have you Try using a http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/util/template/TextTemplateHeaderContributor.html HeaderContribution , factoring out that JavaScript into a separate .js and then do variable Interpolation. See the following example at http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ Eelco Hillenius blog's Hope this is what you need. Neil Ferguson-2 wrote: > > Thanks for the reply. I'd rather keep the script in my markup if > possible. Is there any way to do this so that I don't have to output > the entire Javascript block from my Java code? > > Thanks. > > Neil. > > On Mon, Jun 22, 2009 at 6:24 AM, Igor Vaynberg > wrote: >> output the entire javascript block as a string using new >> label().setescapemodelstrings(false) >> >> -igor >> >> On Sun, Jun 21, 2009 at 11:18 AM, Neil Ferguson >> wrote: >>> Hi all. >>> >>> I'm trying to set a string literal in some Javascript, in order to try >>> and pass a page URL to Google Analytics. I've tried creating a panel >>> with the following markup, and putting it just before the end of my >>> body tag: >>> >>> >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> >>> http://www.w3.org/1999/xhtml"; >>> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"; >>> >>> >>> >>> var gaJsHost = (("https:" == >>> document.location.protocol) ? >>> "https://ssl."; : "http://www.";); >>> document.write(unescape("%3Cscript src='" >>> + gaJsHost + >>> "google-analytics.com/ga.js' >>> type='text/javascript'%3E%3C/script%3E")); >>> >>> >>> try { >>> var pageTracker = >>> _gat._getTracker("TRACKINGID"); >>> pageTracker._trackPageview(''); >>> } catch(err) {} >>> >>> >>> >>> >>> >>> As you can see, I'm trying to set the parameter of the _trackPageview >>> method (or function, whatever it's called in Javascript). I've tried >>> doing this using a span tag, as you can see, but it doesn't work, and >>> I get the following message: >>> >>> "WicketMessage: The component(s) below failed to render. A common >>> problem is that you have added a component in code but forgot to >>> reference it in the markup (thus the component will never be >>> rendered)." >>> >>> The Java code for my panel looks like the following: >>> >>> public class FooterPanel extends Panel { >>> >>> private static final long serialVersionUID = >>> 9196070061210793618L; >>> >>> public FooterPanel(String id, String analyticsPagename) { >>> super(id); >>> Label label = new Label("analyticspagename", >>> analyticsPagename); >>> label.setRenderBodyOnly(true); >>> add(label); >>> } >>> >>> } >>> >>> I didn't really expect this to work, but I can't think of a better >>> way. I'm sure that I'm missing something really obvious here, so can >>> anyone help? >>> >>> BTW, I'm really enjoying using Wicket. I have a severe allergy to XML, >>> so it's brilliant. >>> >>> Thanks. >>> >>> Neil. >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Trying-to-add-string-literal-to-Javascript-for-Google-Analytics-tp24137280p24152508.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
redirect to mailto
How do I redirect to a mailto: url? This doesn't seem to work: final String url = "mailto:...";; getRequestCycle().setRequestTarget(new IRequestTarget() { @Override public void detach(RequestCycle requestCycle) {} @Override public void respond(RequestCycle requestCycle) { Response response = requestCycle.getResponse(); response.reset(); response.redirect(url); } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Surround a panel with legend
in wicket you can factor this out using a border. -igor On Mon, Jun 22, 2009 at 10:43 AM, Alexander Elsholz wrote: > hi, > > i want surround my components with titled boarders. the html-way to do this is > legend. i have a page wich controls different panels the user adds. > so the user can surround his component with legend. because of different > reasons > the page should surround the comoponent with titled border. > > is there a possibility to do this with behavior or subclass panel? > > thanks alex > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Surround a panel with legend
hi, i want surround my components with titled boarders. the html-way to do this is legend. i have a page wich controls different panels the user adds. so the user can surround his component with legend. because of different reasons the page should surround the comoponent with titled border. is there a possibility to do this with behavior or subclass panel? thanks alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Trying to add string literal to Javascript for Google Analytics
Thanks for the reply. I'd rather keep the script in my markup if possible. Is there any way to do this so that I don't have to output the entire Javascript block from my Java code? Thanks. Neil. On Mon, Jun 22, 2009 at 6:24 AM, Igor Vaynberg wrote: > output the entire javascript block as a string using new > label().setescapemodelstrings(false) > > -igor > > On Sun, Jun 21, 2009 at 11:18 AM, Neil Ferguson wrote: >> Hi all. >> >> I'm trying to set a string literal in some Javascript, in order to try >> and pass a page URL to Google Analytics. I've tried creating a panel >> with the following markup, and putting it just before the end of my >> body tag: >> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> >> http://www.w3.org/1999/xhtml"; >> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"; >>> >> >> >> >> var gaJsHost = (("https:" == >> document.location.protocol) ? >> "https://ssl."; : "http://www.";); >> document.write(unescape("%3Cscript src='" + >> gaJsHost + >> "google-analytics.com/ga.js' >> type='text/javascript'%3E%3C/script%3E")); >> >> >> try { >> var pageTracker = >> _gat._getTracker("TRACKINGID"); >> pageTracker._trackPageview('> wicket:id="analyticspagename">'); >> } catch(err) {} >> >> >> >> >> >> As you can see, I'm trying to set the parameter of the _trackPageview >> method (or function, whatever it's called in Javascript). I've tried >> doing this using a span tag, as you can see, but it doesn't work, and >> I get the following message: >> >> "WicketMessage: The component(s) below failed to render. A common >> problem is that you have added a component in code but forgot to >> reference it in the markup (thus the component will never be >> rendered)." >> >> The Java code for my panel looks like the following: >> >> public class FooterPanel extends Panel { >> >> private static final long serialVersionUID = 9196070061210793618L; >> >> public FooterPanel(String id, String analyticsPagename) { >> super(id); >> Label label = new Label("analyticspagename", >> analyticsPagename); >> label.setRenderBodyOnly(true); >> add(label); >> } >> >> } >> >> I didn't really expect this to work, but I can't think of a better >> way. I'm sure that I'm missing something really obvious here, so can >> anyone help? >> >> BTW, I'm really enjoying using Wicket. I have a severe allergy to XML, >> so it's brilliant. >> >> Thanks. >> >> Neil. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to Make a Multiselect Drop Down or Check Box List Collapsible?
We would like to have a multiselect component that only takes up a single line on the page when not active. For example, something that looks and behaves like the DropDownChoice, but that allows multiple selection when activated, would be nice. Is there such a thing in Wicket? Thanks, Keith - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring DM + Hibernate
That's what I'd try, perhaps. How are you starting this application? Only in eclipse? On Mon, Jun 22, 2009 at 11:09 AM, Daniel Dominik Holúbek wrote: > Well, I don't know :)I > > On Mon, Jun 22, 2009 at 12:32 PM, James Carman > wrote: > >> Can you have your Application object created as a Spring bean and make >> it context "aware" and let the container inject the context into it? >> >> On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik >> Holúbek wrote: >> > But as far as I understand this, Spring DM is built upon the idea that I >> > can't build ApplicationContext, as it is built by Spring DM Extender. Am >> I >> > right? >> > >> > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < >> jcar...@carmanconsulting.com >> >> wrote: >> > >> >> Try using the other SpringComponentInjector constructor (the one that >> >> takes an ApplicationContext object). Construct your >> >> ApplicationContext however you want. >> >> >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek >> >> wrote: >> >> > >> >> > Well, no.I'll explain: >> >> > It's an OSGi app running in equinox-bridge. In my bundles there is no >> >> > web.xml, and that's why I can't configure ContextLoaderListener. >> >> > And because of this, when i add @SpringBean into my code, then add >> >> > "addComponentInstantiationListener(new SpringComponentInjector(this))" >> >> into >> >> > WebApplication's init method and then run the application, the only >> thing >> >> I >> >> > get is this exception: java.lang.IllegalStateException: No >> >> > WebApplicationContext found: no ContextLoaderListener registered? >> >> > >> >> > But if there is a way how to set up that listener, I would be happy :) >> >> > >> >> > >> >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman >> >> > wrote: >> >> > >> >> > > You can't use @SpringBean? >> >> > > >> >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik >> >> > > Holúbek wrote: >> >> > > > Hello everyone :)So, I solved the Spring DM problems >> successfully... >> >> but >> >> > > > there is still one problem left, and this time I am absolutely >> sure >> >> that >> >> > > > it's a Wicket related problem :) >> >> > > > >> >> > > > I want to inject my "userDao" bean into Panel class. To do that, I >> >> nead >> >> > > to >> >> > > > create a bean from that Panel class - like this: >> >> > > > >> >> > > > >> >> > > > > >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" >> >> > > > init-method="init"> >> >> > > > >> >> > > > >> >> > > > >> >> > > > >> >> > > > But when I try this, I get an exception: >> >> > > > >> >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is no >> >> > > application >> >> > > > attached to current thread SpringOsgiExtenderThread-4 >> >> > > > This happens when Spring is trying to instantiate the Panel class. >> >> > > > >> >> > > > I tried this with ordinary class and everything worked fine. The >> idea >> >> was >> >> > > > that I will instantiate a normal class, and then I will access it >> >> from >> >> > > the >> >> > > > Panel class, but when I do: >> >> > > > >> >> > > > ServiceConsumer sc = new ServiceConsumer(); >> >> > > > >> >> > > > and then access userDao, I'll get a NullPointerException of >> course. >> >> > > > >> >> > > > So has anybody done this before? I think I need your help :) >> >> > > > >> >> > > > Thanks a lot! >> >> > > > >> >> > > > On Tue, Jun 16, 2009 at 2:01 AM, djo mos >> >> wrote: >> >> > > > >> >> > > >> Hi, >> >> > > >> >> >> > > >> On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek < >> >> > > >> dankodo...@gmail.com> wrote: >> >> > > >> >> >> > > >> > Well, may be, but won't they send me back to this mailinglist? >> >> :)To be >> >> > > >> > honest, I have only a little problem with Spring DM itself >> (there >> >> are >> >> > > >> > couple >> >> > > >> > of tutorials out there), I was only curious about whether >> somebody >> >> has >> >> > > >> > successfully tried this. >> >> > > >> > For example, now it seems that the dependency is not being >> >> injected in >> >> > > my >> >> > > >> > code. And I can't do that via @SpringBean, because that needs >> to >> >> be >> >> > > set >> >> > > >> in >> >> > > >> > web.xml, and I have no web.xml in my OSGi bundle. >> >> > > >> >> >> > > >> >> >> > > >> Actually with Spring DM you do have web.xml in web bundles, as >> >> described >> >> > > in >> >> > > >> their reference documentation. >> >> > > >> I'v been able to use Wicket with Spring DM without problems. No >> >> > > Hibernate >> >> > > >> though : it really wasn't designed for a strictly controlled >> >> environment >> >> > > >> such as OSGi. >> >> > > >> >> >> > > >> So, I guess that your problem (not getting IoC to work) is not >> >> Wicket >> >> > > >> related but Spring DM related. >> >> > > >> >> >> > > >> Cheers >> >> > > >> >> >> > > >> > >> >> > > >> > >> >> > > >> > But yes, there is a chance that the problem has nothing to do >> with >> >> > > Wicket >> >> > > >> > itself. >> >> > > >> > >> >> > > >> > On Mon, Jun 15, 2009 a
Re: Wicket + Spring DM + Hibernate
On Mon, Jun 22, 2009 at 11:11 AM, Daniel Dominik Holúbek wrote: > I don't know :)I can create a Spring bean from Application object, but I > don't know what does it mean - make it context "aware". > That's why I am asking whether somebody has already tried this... Have your application class implement the ApplicationContextAware interface: http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/context/ApplicationContextAware.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring DM + Hibernate
I don't know :)I can create a Spring bean from Application object, but I don't know what does it mean - make it context "aware". That's why I am asking whether somebody has already tried this... On Mon, Jun 22, 2009 at 5:09 PM, Daniel Dominik Holúbek < dankodo...@gmail.com> wrote: > Well, I don't know :)I > > > On Mon, Jun 22, 2009 at 12:32 PM, James Carman < > jcar...@carmanconsulting.com> wrote: > >> Can you have your Application object created as a Spring bean and make >> it context "aware" and let the container inject the context into it? >> >> On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik >> Holúbek wrote: >> > But as far as I understand this, Spring DM is built upon the idea that I >> > can't build ApplicationContext, as it is built by Spring DM Extender. Am >> I >> > right? >> > >> > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < >> jcar...@carmanconsulting.com >> >> wrote: >> > >> >> Try using the other SpringComponentInjector constructor (the one that >> >> takes an ApplicationContext object). Construct your >> >> ApplicationContext however you want. >> >> >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek >> >> wrote: >> >> > >> >> > Well, no.I'll explain: >> >> > It's an OSGi app running in equinox-bridge. In my bundles there is no >> >> > web.xml, and that's why I can't configure ContextLoaderListener. >> >> > And because of this, when i add @SpringBean into my code, then add >> >> > "addComponentInstantiationListener(new >> SpringComponentInjector(this))" >> >> into >> >> > WebApplication's init method and then run the application, the only >> thing >> >> I >> >> > get is this exception: java.lang.IllegalStateException: No >> >> > WebApplicationContext found: no ContextLoaderListener registered? >> >> > >> >> > But if there is a way how to set up that listener, I would be happy >> :) >> >> > >> >> > >> >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman >> >> > wrote: >> >> > >> >> > > You can't use @SpringBean? >> >> > > >> >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik >> >> > > Holúbek wrote: >> >> > > > Hello everyone :)So, I solved the Spring DM problems >> successfully... >> >> but >> >> > > > there is still one problem left, and this time I am absolutely >> sure >> >> that >> >> > > > it's a Wicket related problem :) >> >> > > > >> >> > > > I want to inject my "userDao" bean into Panel class. To do that, >> I >> >> nead >> >> > > to >> >> > > > create a bean from that Panel class - like this: >> >> > > > >> >> > > > >> >> > > > > >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" >> >> > > > init-method="init"> >> >> > > > >> >> > > > >> >> > > > >> >> > > > >> >> > > > But when I try this, I get an exception: >> >> > > > >> >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is no >> >> > > application >> >> > > > attached to current thread SpringOsgiExtenderThread-4 >> >> > > > This happens when Spring is trying to instantiate the Panel >> class. >> >> > > > >> >> > > > I tried this with ordinary class and everything worked fine. The >> idea >> >> was >> >> > > > that I will instantiate a normal class, and then I will access it >> >> from >> >> > > the >> >> > > > Panel class, but when I do: >> >> > > > >> >> > > > ServiceConsumer sc = new ServiceConsumer(); >> >> > > > >> >> > > > and then access userDao, I'll get a NullPointerException of >> course. >> >> > > > >> >> > > > So has anybody done this before? I think I need your help :) >> >> > > > >> >> > > > Thanks a lot! >> >> > > > >> >> > > > On Tue, Jun 16, 2009 at 2:01 AM, djo mos >> >> wrote: >> >> > > > >> >> > > >> Hi, >> >> > > >> >> >> > > >> On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek < >> >> > > >> dankodo...@gmail.com> wrote: >> >> > > >> >> >> > > >> > Well, may be, but won't they send me back to this mailinglist? >> >> :)To be >> >> > > >> > honest, I have only a little problem with Spring DM itself >> (there >> >> are >> >> > > >> > couple >> >> > > >> > of tutorials out there), I was only curious about whether >> somebody >> >> has >> >> > > >> > successfully tried this. >> >> > > >> > For example, now it seems that the dependency is not being >> >> injected in >> >> > > my >> >> > > >> > code. And I can't do that via @SpringBean, because that needs >> to >> >> be >> >> > > set >> >> > > >> in >> >> > > >> > web.xml, and I have no web.xml in my OSGi bundle. >> >> > > >> >> >> > > >> >> >> > > >> Actually with Spring DM you do have web.xml in web bundles, as >> >> described >> >> > > in >> >> > > >> their reference documentation. >> >> > > >> I'v been able to use Wicket with Spring DM without problems. No >> >> > > Hibernate >> >> > > >> though : it really wasn't designed for a strictly controlled >> >> environment >> >> > > >> such as OSGi. >> >> > > >> >> >> > > >> So, I guess that your problem (not getting IoC to work) is not >> >> Wicket >> >> > > >> related but Spring DM related. >> >> > > >> >> >> > > >> Cheers >> >> > > >> >> >> > > >> > >> >> > > >> >
Re: Wicket + Spring DM + Hibernate
Well, I don't know :)I On Mon, Jun 22, 2009 at 12:32 PM, James Carman wrote: > Can you have your Application object created as a Spring bean and make > it context "aware" and let the container inject the context into it? > > On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik > Holúbek wrote: > > But as far as I understand this, Spring DM is built upon the idea that I > > can't build ApplicationContext, as it is built by Spring DM Extender. Am > I > > right? > > > > On Mon, Jun 22, 2009 at 12:37 AM, James Carman < > jcar...@carmanconsulting.com > >> wrote: > > > >> Try using the other SpringComponentInjector constructor (the one that > >> takes an ApplicationContext object). Construct your > >> ApplicationContext however you want. > >> > >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek > >> wrote: > >> > > >> > Well, no.I'll explain: > >> > It's an OSGi app running in equinox-bridge. In my bundles there is no > >> > web.xml, and that's why I can't configure ContextLoaderListener. > >> > And because of this, when i add @SpringBean into my code, then add > >> > "addComponentInstantiationListener(new SpringComponentInjector(this))" > >> into > >> > WebApplication's init method and then run the application, the only > thing > >> I > >> > get is this exception: java.lang.IllegalStateException: No > >> > WebApplicationContext found: no ContextLoaderListener registered? > >> > > >> > But if there is a way how to set up that listener, I would be happy :) > >> > > >> > > >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman > >> > wrote: > >> > > >> > > You can't use @SpringBean? > >> > > > >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik > >> > > Holúbek wrote: > >> > > > Hello everyone :)So, I solved the Spring DM problems > successfully... > >> but > >> > > > there is still one problem left, and this time I am absolutely > sure > >> that > >> > > > it's a Wicket related problem :) > >> > > > > >> > > > I want to inject my "userDao" bean into Panel class. To do that, I > >> nead > >> > > to > >> > > > create a bean from that Panel class - like this: > >> > > > > >> > > > > >> > > > >> class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" > >> > > > init-method="init"> > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > But when I try this, I get an exception: > >> > > > > >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is no > >> > > application > >> > > > attached to current thread SpringOsgiExtenderThread-4 > >> > > > This happens when Spring is trying to instantiate the Panel class. > >> > > > > >> > > > I tried this with ordinary class and everything worked fine. The > idea > >> was > >> > > > that I will instantiate a normal class, and then I will access it > >> from > >> > > the > >> > > > Panel class, but when I do: > >> > > > > >> > > > ServiceConsumer sc = new ServiceConsumer(); > >> > > > > >> > > > and then access userDao, I'll get a NullPointerException of > course. > >> > > > > >> > > > So has anybody done this before? I think I need your help :) > >> > > > > >> > > > Thanks a lot! > >> > > > > >> > > > On Tue, Jun 16, 2009 at 2:01 AM, djo mos > >> wrote: > >> > > > > >> > > >> Hi, > >> > > >> > >> > > >> On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek < > >> > > >> dankodo...@gmail.com> wrote: > >> > > >> > >> > > >> > Well, may be, but won't they send me back to this mailinglist? > >> :)To be > >> > > >> > honest, I have only a little problem with Spring DM itself > (there > >> are > >> > > >> > couple > >> > > >> > of tutorials out there), I was only curious about whether > somebody > >> has > >> > > >> > successfully tried this. > >> > > >> > For example, now it seems that the dependency is not being > >> injected in > >> > > my > >> > > >> > code. And I can't do that via @SpringBean, because that needs > to > >> be > >> > > set > >> > > >> in > >> > > >> > web.xml, and I have no web.xml in my OSGi bundle. > >> > > >> > >> > > >> > >> > > >> Actually with Spring DM you do have web.xml in web bundles, as > >> described > >> > > in > >> > > >> their reference documentation. > >> > > >> I'v been able to use Wicket with Spring DM without problems. No > >> > > Hibernate > >> > > >> though : it really wasn't designed for a strictly controlled > >> environment > >> > > >> such as OSGi. > >> > > >> > >> > > >> So, I guess that your problem (not getting IoC to work) is not > >> Wicket > >> > > >> related but Spring DM related. > >> > > >> > >> > > >> Cheers > >> > > >> > >> > > >> > > >> > > >> > > >> > > >> > But yes, there is a chance that the problem has nothing to do > with > >> > > Wicket > >> > > >> > itself. > >> > > >> > > >> > > >> > On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg < > >> > > igor.vaynb...@gmail.com > >> > > >> > >wrote: > >> > > >> > > >> > > >> > > isnt this a question for the spring dmserver forum? > >> > > >> > > > >> > > >> > > -igor > >> > > >> > > > >> > > >> > > On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik > >> > > >> > > Ho
Re: Upload preview before form submit
ok. i think i get it. can you point me to some code sample for clearing this mechanism. what seems to be missing for me is the "iframe submit to a servlet" part. Not sure I see how the file gets there and...thanks again. On Mon, Jun 22, 2009 at 5:12 PM, Igor Vaynberg wrote: > i wouldnt even use a form to submit it. i would have the iframe submit > to a servlet which would then receive the file and store it on disk in > a well known location. the wicket component can then provide a file > pointing to that location as its model. > > -igor > > On Mon, Jun 22, 2009 at 7:09 AM, Arie Fishler wrote: > > ok...thanks. this is the way to define the preview display. However I am > not > > sure you referred to the issue of submitting the preview which is the > bigger > > problem here. > > > > Is it supposed to work when the uploaded file has its own for within the > > main form? nested forms? Since I could not get the ajax-iframe thing to > work > > this way. > > > > If notI need a way to only submit the uploaded file for preview while > > the rest of the form is not changed. it is not the most convenient or > > elegant to have this as a totally separate form. If I want to make it a > > panel for example I want it to include the whole functionality. > > > > On Mon, Jun 22, 2009 at 4:44 PM, Igor Vaynberg >wrote: > > > >> when your inline frame is done getting the file it can send some > >> javascript to the browser to change an src of a hidden img tag to the > >> url of the uploaded file. thats one way to do this. another way is to > >> treat the hidden frame as an actual component and place it where you > >> want the preview to be, that way after the upload it can write out an > >> img tag. > >> > >> -igor > >> > >> On Mon, Jun 22, 2009 at 2:14 AM, Arie Fishler > wrote: > >> > Hi, > >> > > >> > I know this was handled many times here in a way but this is not > exactly > >> the > >> > regular kind of "ajax submit for an upload field". > >> > > >> > I have implemented the ajax submit using the inline frame solution. > >> > However...I want to have a preview of an uploaded file (image for > >> example) > >> > BEFORE submitting the form. > >> > > >> > I have several fields in a form one of which is an uploaded file > field. > >> > Clicking an upload link near the uploaded file field should load the > >> file > >> > and not submit the form. > >> > When the user sees the file, fills all the other fields he would like > to > >> > submit the form. > >> > > >> > This is pretty common use case I guess. > >> > > >> > Nested forms does not work here (inner form has only an upload field > with > >> > ajax submit method) so only separate form gowhich is not good for > me. > >> > > >> > Is there a descent way to implement this? > >> > > >> > Thanks, > >> > Arie > >> > > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Upload preview before form submit
i wouldnt even use a form to submit it. i would have the iframe submit to a servlet which would then receive the file and store it on disk in a well known location. the wicket component can then provide a file pointing to that location as its model. -igor On Mon, Jun 22, 2009 at 7:09 AM, Arie Fishler wrote: > ok...thanks. this is the way to define the preview display. However I am not > sure you referred to the issue of submitting the preview which is the bigger > problem here. > > Is it supposed to work when the uploaded file has its own for within the > main form? nested forms? Since I could not get the ajax-iframe thing to work > this way. > > If notI need a way to only submit the uploaded file for preview while > the rest of the form is not changed. it is not the most convenient or > elegant to have this as a totally separate form. If I want to make it a > panel for example I want it to include the whole functionality. > > On Mon, Jun 22, 2009 at 4:44 PM, Igor Vaynberg wrote: > >> when your inline frame is done getting the file it can send some >> javascript to the browser to change an src of a hidden img tag to the >> url of the uploaded file. thats one way to do this. another way is to >> treat the hidden frame as an actual component and place it where you >> want the preview to be, that way after the upload it can write out an >> img tag. >> >> -igor >> >> On Mon, Jun 22, 2009 at 2:14 AM, Arie Fishler wrote: >> > Hi, >> > >> > I know this was handled many times here in a way but this is not exactly >> the >> > regular kind of "ajax submit for an upload field". >> > >> > I have implemented the ajax submit using the inline frame solution. >> > However...I want to have a preview of an uploaded file (image for >> example) >> > BEFORE submitting the form. >> > >> > I have several fields in a form one of which is an uploaded file field. >> > Clicking an upload link near the uploaded file field should load the >> file >> > and not submit the form. >> > When the user sees the file, fills all the other fields he would like to >> > submit the form. >> > >> > This is pretty common use case I guess. >> > >> > Nested forms does not work here (inner form has only an upload field with >> > ajax submit method) so only separate form gowhich is not good for me. >> > >> > Is there a descent way to implement this? >> > >> > Thanks, >> > Arie >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Upload preview before form submit
ok...thanks. this is the way to define the preview display. However I am not sure you referred to the issue of submitting the preview which is the bigger problem here. Is it supposed to work when the uploaded file has its own for within the main form? nested forms? Since I could not get the ajax-iframe thing to work this way. If notI need a way to only submit the uploaded file for preview while the rest of the form is not changed. it is not the most convenient or elegant to have this as a totally separate form. If I want to make it a panel for example I want it to include the whole functionality. On Mon, Jun 22, 2009 at 4:44 PM, Igor Vaynberg wrote: > when your inline frame is done getting the file it can send some > javascript to the browser to change an src of a hidden img tag to the > url of the uploaded file. thats one way to do this. another way is to > treat the hidden frame as an actual component and place it where you > want the preview to be, that way after the upload it can write out an > img tag. > > -igor > > On Mon, Jun 22, 2009 at 2:14 AM, Arie Fishler wrote: > > Hi, > > > > I know this was handled many times here in a way but this is not exactly > the > > regular kind of "ajax submit for an upload field". > > > > I have implemented the ajax submit using the inline frame solution. > > However...I want to have a preview of an uploaded file (image for > example) > > BEFORE submitting the form. > > > > I have several fields in a form one of which is an uploaded file field. > > Clicking an upload link near the uploaded file field should load the > file > > and not submit the form. > > When the user sees the file, fills all the other fields he would like to > > submit the form. > > > > This is pretty common use case I guess. > > > > Nested forms does not work here (inner form has only an upload field with > > ajax submit method) so only separate form gowhich is not good for me. > > > > Is there a descent way to implement this? > > > > Thanks, > > Arie > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Help with design of application layout
from what you have shown here there doesnt seem anything common you can factor out. if i were you i would create something like this: class zonepage extends webpage { private final repatingview zones; public zonepage() { add(zones=new repeatingview("zones")); } public void addzone(component c) {zones.add(c);} public int nextzoneid() { return zones.newchildid(); } } [html][body][wicket:container wicket:id="zones"][/wicket:container][/body][/html] then you can factor out common things like layout into panels so your code looks like this: class mypage extends zonepage { class mypage { component leftcolcontent=...; component rightcolcontent=..; component centercontent=..; addzone(new leftzonepanel(nextzoneid(), leftcolcontent)); addzone(new rightzonepanel(nextzoneid(), rightcolcontent)); addzone(new centerzonepanel(nextzoneid(), centerzonepanel)); }} -igor On Sun, Jun 21, 2009 at 11:20 PM, Petr Fejfar wrote: > On Mon, Jun 22, 2009 at 7:21 AM, Igor Vaynberg wrote: > >> i think you will get more help if you present a concrete usecase. > > Thanks for your reply. Ok, I'd like to design something like this: > > layer[0] > - zone.a (a banner, sometimes visible, sometimes not). > - zone.b (FeedbackPanel) > - zone.c (abstract. A content) > - zone.d (a footer) > - zone.e (debug output) > > layer[1] > - zone.c (overriden by) > - zone.c.a (header) > - zone.c.b (abstract. Left column ) > - zone c.c (abstract. Central column) > - zone c.d (abstract. Right column) > > layer[2] > - zone.c.d overriden by > - zone.c.d.a (user box i.e. login/logout panel etc...) > - zone.c.d.b (abstract. A content) > > layer[3a] > - zone.c.b overriden by > - zone c.b.a (ref box) > - zone.c.b.b (a content) > - zone.c.c overriden (content) > - zone.c.d.b overriden by > - zone c.d.b.a (content) > > layer[3b] > - zone.c.b overriden by > - zone c.b.a (status box) > - zone.c.b.b (menu) > - zone.c.c overriden (content) > - zone.c.d.b overriden by > - zone c.d.b.a (content) > > layer[3c] > ... > > My attempts to build something like this was unsuccessfull. From the > perspective of my current wicket's knowledge/experience it seems I > could achieve this using a base page fragmented down to the collection > of smallest zones of all top-most layers and override/show/hide them > in particular page. But it'd probably violate DRY principe: I'd have > to include common (inherited) panels in fragments in all ancestors... > > Thx, Petr > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Drag & Drop
Hello, I'm currently playing with AJAX in Wicket using WicketStuff YUI integration. Is there any way to refuse a drop ? There's a behavior called Droppable which includes an accept() method but I can't figure out how to add it to my component tree / call it. Here's a working code snippet : - final WebMarkupContainer list1; final List list1items = new ArrayList(); list1items.add("1.1"); list1items.add("1.2"); add(list1 = new WebMarkupContainer("list1")); list1.setOutputMarkupId(true); list1.add(new YuiDDTarget("LIST") { private static final long serialVersionUID = -62687283825213344L; @Override public void onDrop(AjaxRequestTarget target, Component component) { String newItem = ((ListItem) component).getModelObject(); list1items.add(newItem); target.addComponent(list1); } }); - But then, I'm trying to add a new Droppable() to my list1 component but neither onDrop() nor accept() are called : - Droppable d = new Droppable() { private static final long serialVersionUID = -3647700662771836452L; @Override protected boolean accept(Draggable draggable) { return super.accept(draggable); } @Override public void onDrop(AjaxRequestTarget target, Component component, int index) { } }; list1.add(d); - A clue, anyone ? Regards, Pierre -- Sans amis était le grand maître des mondes, Eprouvait manque, ce pour quoi il créa les esprits, Miroirs bienveillants de sa béatitude. Mais au vrai, il ne trouva aucun égal, Du calice du royaume total des âmes Ecume jusqu'à lui l'infinité. (Schiller, "l'amitié")
Re: Upload preview before form submit
when your inline frame is done getting the file it can send some javascript to the browser to change an src of a hidden img tag to the url of the uploaded file. thats one way to do this. another way is to treat the hidden frame as an actual component and place it where you want the preview to be, that way after the upload it can write out an img tag. -igor On Mon, Jun 22, 2009 at 2:14 AM, Arie Fishler wrote: > Hi, > > I know this was handled many times here in a way but this is not exactly the > regular kind of "ajax submit for an upload field". > > I have implemented the ajax submit using the inline frame solution. > However...I want to have a preview of an uploaded file (image for example) > BEFORE submitting the form. > > I have several fields in a form one of which is an uploaded file field. > Clicking an upload link near the uploaded file field should load the file > and not submit the form. > When the user sees the file, fills all the other fields he would like to > submit the form. > > This is pretty common use case I guess. > > Nested forms does not work here (inner form has only an upload field with > ajax submit method) so only separate form gowhich is not good for me. > > Is there a descent way to implement this? > > Thanks, > Arie > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Extending AutoLinkResolver
you can write your own tags that do what you want. changing a standard tag to work differently is a bad idea because it will affect all 3rd party components you use in your project in unexpected ways. -igor On Mon, Jun 22, 2009 at 6:15 AM, Luther Baker wrote: > Thoughts? > -Luther > > > On Sat, Jun 20, 2009 at 6:55 AM, Luther Baker wrote: > >> Is there a programmatic way to override or submit an AutoLink Resolver? >> >> For instance, I'd like to resolve something like > (e.g.: prepend the app context instead of prepending >> resources/classpath ... to look in the web root directory instead of the >> classpath). >> >> >> >> becomes >> >> >> >> Thanks, >> >> -Luther >> >> >> >> public AutoLinkResolver() >> { >> // register tag reference resolvers >> TagReferenceResolver hrefTagReferenceResolver = new >> TagReferenceResolver("href"); >> TagReferenceResolver srcTagReferenceResolver = new >> TagReferenceResolver("src"); >> tagNameToTagReferenceResolvers.put("a", hrefTagReferenceResolver); >> tagNameToTagReferenceResolvers.put("link", >> hrefTagReferenceResolver); >> tagNameToTagReferenceResolvers.put("script", >> srcTagReferenceResolver); >> tagNameToTagReferenceResolvers.put("img", srcTagReferenceResolver); >> tagNameToTagReferenceResolvers.put("input", >> srcTagReferenceResolver); >> tagNameToTagReferenceResolvers.put("embed", >> srcTagReferenceResolver); >> >> // register autolink resolver delegates >> tagNameToAutolinkResolverDelegates.put("a", new >> AnchorResolverDelegate()); >> * tagNameToAutolinkResolverDelegates.put("link", >> new ResourceReferenceResolverDelegate("href"));* >> ResourceReferenceResolverDelegate srcResRefResolver = new >> ResourceReferenceResolverDelegate( >> "src"); >> tagNameToAutolinkResolverDelegates.put("script", >> srcResRefResolver); >> tagNameToAutolinkResolverDelegates.put("img", srcResRefResolver); >> tagNameToAutolinkResolverDelegates.put("input", srcResRefResolver); >> tagNameToAutolinkResolverDelegates.put("embed", srcResRefResolver); >> } >> > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Extending AutoLinkResolver
Thoughts? -Luther On Sat, Jun 20, 2009 at 6:55 AM, Luther Baker wrote: > Is there a programmatic way to override or submit an AutoLink Resolver? > > For instance, I'd like to resolve something like (e.g.: prepend the app context instead of prepending > resources/classpath ... to look in the web root directory instead of the > classpath). > > > > becomes > > > > Thanks, > > -Luther > > > > public AutoLinkResolver() > { > // register tag reference resolvers > TagReferenceResolver hrefTagReferenceResolver = new > TagReferenceResolver("href"); > TagReferenceResolver srcTagReferenceResolver = new > TagReferenceResolver("src"); > tagNameToTagReferenceResolvers.put("a", hrefTagReferenceResolver); > tagNameToTagReferenceResolvers.put("link", > hrefTagReferenceResolver); > tagNameToTagReferenceResolvers.put("script", > srcTagReferenceResolver); > tagNameToTagReferenceResolvers.put("img", srcTagReferenceResolver); > tagNameToTagReferenceResolvers.put("input", > srcTagReferenceResolver); > tagNameToTagReferenceResolvers.put("embed", > srcTagReferenceResolver); > > // register autolink resolver delegates > tagNameToAutolinkResolverDelegates.put("a", new > AnchorResolverDelegate()); > *tagNameToAutolinkResolverDelegates.put("link", > new ResourceReferenceResolverDelegate("href"));* > ResourceReferenceResolverDelegate srcResRefResolver = new > ResourceReferenceResolverDelegate( > "src"); > tagNameToAutolinkResolverDelegates.put("script", > srcResRefResolver); > tagNameToAutolinkResolverDelegates.put("img", srcResRefResolver); > tagNameToAutolinkResolverDelegates.put("input", srcResRefResolver); > tagNameToAutolinkResolverDelegates.put("embed", srcResRefResolver); > } >
RE: ModalWindow.setResizable(false) no longer works in 1.4-rc5?
I had problems with ModalWindow also when converting from 1.3.5 I was able to use a percentage in setInitialHeight and Width, which no longer worked (for me) - I had to switch to pixels. And yes, the window is resizable even though it is set to false. -Original Message- From: Marcin Palka [mailto:marcin.pa...@gmail.com] Sent: Sunday, June 21, 2009 4:27 PM To: users@wicket.apache.org Subject: Re: ModalWindow.setResizable(false) no longer works in 1.4-rc5? James, thanks for the reply. The problem turns out to be more complex. Simple page with a modal window works like a charm with RC5 (I mean I can easily set modal window's resizability). My application's modal windows on the other hand don't. I will try to investigate it further and fill a JIRA report if needed. So far I compared the markup generated by both, my problematic application and simple quickstart application and it seems that style attributes are missing in the app that experiences resizability problem. The style attributes that are missing are "cursor: default;" (as below). Fixed size modal window: Resizable (but supposed to be fixed size) modal window: I will dig into the ModalWindow's code to find out when these atributes are added and when they don't. And the code I use to construct and show a modal window: final ModalWindow modal = new ModalWindow("modal"); modal.setContent(new DummyPanel(modal.getContentId())); //DummyPanel contains only static text modal.setTitle("Modal window"); modal.setHeightUnit("px"); modal.setWidthUnit("px"); modal.setInitialHeight(100); modal.setInitialWidth(300); modal.setResizable(false); add(modal); AjaxFallbackLink showModal = new AjaxFallbackLink("show_modal") { @Override public void onClick(AjaxRequestTarget target) { modal.show(target); } }; add(showModal); Marcin James Carman-3 wrote: > > The 1.4 release is all about "genericizing" Wicket. If you've got a > regression like this, it's probably not supposed to be happening. I > would file a JIRA and attach a quickstart. > -- View this message in context: http://www.nabble.com/ModalWindow.setResizable%28false%29-no-longer-works-in-1.4-rc5--tp24135317p24138498.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ EMAIL CONFIDENTIALITY NOTICE This Email message, and any attachments, may contain confidential patient health information that is legally protected. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party unless required to do so by law or regulation and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or action taken in reliance on the contents of this message is strictly prohibited. If you have received this information in error, please notify the sender immediately by replying to this message and delete the message from your system. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AJAX and Safari
sorry still no answers on this side, just questions. what does the implementation of the onSubmit method of the AjaxButton look like. Is the component that needs to be rerendered in the browser properly added to the AjaxRequestTarget? mf Am 22.06.2009 um 13:45 schrieb Wayne Pope: The buffer is empty. I see from the request the querystring is wicket:interface=: 7 :projectPagePanel:toolBox2 :inviteUserPanel:hiddenArea:invitePanel:inviteForm:inviteButton ::IActivePageBehaviorListener: 0:&wicket:ignoreIfNotActive=true&random=0.2301371863577515 the response is a http 200 adn ther redirectURL is set to ?wicket:interface=:7 - not sure if this is relavent. If I can the button to a norml button (not an AjaxButton) it works fine. Looks like I will need to do this. On Mon, Jun 22, 2009 at 1:29 PM, Wayne Pope wrote: Yes sorry - apologies to all. I'll have a look Martin. On Mon, Jun 22, 2009 at 1:11 PM, Martin Funk> wrote: uh, now that's a moving target. sorry but no solution out of my head, but next steps for me would be checking if it happens on the server or on its way to the browser. What does the response Buffer in the WicketFilter look like just before the doGet returns? mf Am 22.06.2009 um 12:58 schrieb Wayne Pope: It looks like we are using an AjaxButton. Sorry for 2 emails to describe the one problem. Any ideas? many thanks On Mon, Jun 22, 2009 at 12:49 PM, Wayne Pope> wrote: Sorry I just realised that its not ajax - just a normal form submit. We still have the same problem though Wayne Pope-2 wrote: Hi, not sure how to investigate this, but we have an issue with ajax and safari. Problem is it doesn't happen every time - only about 40% . Essentally we send a request: Request Accepttext/xml Content-Type application/x-www-form-urlencoded Referer http://foo1.glasscubesdev.com:8080/?wicket:interface=:5 User-AgentMozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/ 525.21 Wicket-Ajax true We receive this on the server/eclipse and the request is processed. However the response is received like this on safari (using the developer menu): Response Ajax-Location ?wicket:interface=:5 Content-Length1 ServerJetty(6.1.4) As you can see the content length is 1. The effect is that it appears that request never returns (there's nothing in the ajax debug window). It happens locally and on the server. We're on 1.4-rc2 of wicket. Any ideas? Anyone seen something like this before? many thanks Wayne - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/AJAX-and-Safari-tp24145113p24145166.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AJAX and Safari
The buffer is empty. I see from the request the querystring is wicket:interface=:7:projectPagePanel:toolBox2:inviteUserPanel:hiddenArea:invitePanel:inviteForm:inviteButton::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true&random=0.2301371863577515 the response is a http 200 adn ther redirectURL is set to ?wicket:interface=:7 - not sure if this is relavent. If I can the button to a norml button (not an AjaxButton) it works fine. Looks like I will need to do this. On Mon, Jun 22, 2009 at 1:29 PM, Wayne Pope wrote: > Yes sorry - apologies to all. > I'll have a look Martin. > > On Mon, Jun 22, 2009 at 1:11 PM, Martin Funk wrote: >> uh, now that's a moving target. >> >> sorry but no solution out of my head, but next steps for me would be >> checking if it happens on the server or on its way to the browser. >> What does the response Buffer in the WicketFilter look like just before the >> doGet returns? >> >> mf >> Am 22.06.2009 um 12:58 schrieb Wayne Pope: >> >>> It looks like we are using an AjaxButton. >>> Sorry for 2 emails to describe the one problem. >>> Any ideas? >>> >>> many thanks >>> >>> On Mon, Jun 22, 2009 at 12:49 PM, Wayne Pope >>> wrote: Sorry I just realised that its not ajax - just a normal form submit. We still have the same problem though Wayne Pope-2 wrote: > > Hi, > > not sure how to investigate this, but we have an issue with ajax and > safari. Problem is it doesn't happen every time - only about 40% . > Essentally we send a request: > > Request > Accept text/xml > Content-Type application/x-www-form-urlencoded > Referer > http://foo1.glasscubesdev.com:8080/?wicket:interface=:5 > User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) > AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/525.21 > Wicket-Ajax true > > We receive this on the server/eclipse and the request is processed. > However the response is received like this on safari (using the > developer menu): > Response > Ajax-Location ?wicket:interface=:5 > Content-Length 1 > Server Jetty(6.1.4) > > > As you can see the content length is 1. The effect is that it appears > that request never returns (there's nothing in the ajax debug window). > It happens locally and on the server. We're on 1.4-rc2 of wicket. > > Any ideas? Anyone seen something like this before? > > many thanks > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/AJAX-and-Safari-tp24145113p24145166.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: returning resource on ajax request
I would try to do something crazy like RequestCycle.get().setRequestTarget(new ResourceStreamRequestTarget(...)); during the onclick method of the ajaxlink, but I don't know if it would work. Anyway on the client side wicket ajax library may try to interpret the response as a regular ajax response. Wojciech Żaboklicki wrote: Hi, I want to do something like ResourceLink returning DynamicWebResource to the client, but I can use only AjaxLink. Any idea how to do it? Regards, Wojtek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AJAX and Safari
Yes sorry - apologies to all. I'll have a look Martin. On Mon, Jun 22, 2009 at 1:11 PM, Martin Funk wrote: > uh, now that's a moving target. > > sorry but no solution out of my head, but next steps for me would be > checking if it happens on the server or on its way to the browser. > What does the response Buffer in the WicketFilter look like just before the > doGet returns? > > mf > Am 22.06.2009 um 12:58 schrieb Wayne Pope: > >> It looks like we are using an AjaxButton. >> Sorry for 2 emails to describe the one problem. >> Any ideas? >> >> many thanks >> >> On Mon, Jun 22, 2009 at 12:49 PM, Wayne Pope >> wrote: >>> >>> Sorry I just realised that its not ajax - just a normal form submit. >>> We still have the same problem though >>> >>> >>> Wayne Pope-2 wrote: Hi, not sure how to investigate this, but we have an issue with ajax and safari. Problem is it doesn't happen every time - only about 40% . Essentally we send a request: Request Accept text/xml Content-Type application/x-www-form-urlencoded Referer http://foo1.glasscubesdev.com:8080/?wicket:interface=:5 User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/525.21 Wicket-Ajax true We receive this on the server/eclipse and the request is processed. However the response is received like this on safari (using the developer menu): Response Ajax-Location ?wicket:interface=:5 Content-Length 1 Server Jetty(6.1.4) As you can see the content length is 1. The effect is that it appears that request never returns (there's nothing in the ajax debug window). It happens locally and on the server. We're on 1.4-rc2 of wicket. Any ideas? Anyone seen something like this before? many thanks Wayne - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/AJAX-and-Safari-tp24145113p24145166.html >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AJAX and Safari
uh, now that's a moving target. sorry but no solution out of my head, but next steps for me would be checking if it happens on the server or on its way to the browser. What does the response Buffer in the WicketFilter look like just before the doGet returns? mf Am 22.06.2009 um 12:58 schrieb Wayne Pope: It looks like we are using an AjaxButton. Sorry for 2 emails to describe the one problem. Any ideas? many thanks On Mon, Jun 22, 2009 at 12:49 PM, Wayne Pope> wrote: Sorry I just realised that its not ajax - just a normal form submit. We still have the same problem though Wayne Pope-2 wrote: Hi, not sure how to investigate this, but we have an issue with ajax and safari. Problem is it doesn't happen every time - only about 40% . Essentally we send a request: Request Accepttext/xml Content-Type application/x-www-form-urlencoded Referer http://foo1.glasscubesdev.com:8080/?wicket:interface=:5 User-AgentMozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/525.21 Wicket-Ajax true We receive this on the server/eclipse and the request is processed. However the response is received like this on safari (using the developer menu): Response Ajax-Location ?wicket:interface=:5 Content-Length1 ServerJetty(6.1.4) As you can see the content length is 1. The effect is that it appears that request never returns (there's nothing in the ajax debug window). It happens locally and on the server. We're on 1.4-rc2 of wicket. Any ideas? Anyone seen something like this before? many thanks Wayne - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/AJAX-and-Safari-tp24145113p24145166.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AJAX and Safari
It looks like we are using an AjaxButton. Sorry for 2 emails to describe the one problem. Any ideas? many thanks On Mon, Jun 22, 2009 at 12:49 PM, Wayne Pope wrote: > > Sorry I just realised that its not ajax - just a normal form submit. > We still have the same problem though > > > Wayne Pope-2 wrote: >> >> Hi, >> >> not sure how to investigate this, but we have an issue with ajax and >> safari. Problem is it doesn't happen every time - only about 40% . >> Essentally we send a request: >> >> Request >> Accept text/xml >> Content-Type application/x-www-form-urlencoded >> Referer http://foo1.glasscubesdev.com:8080/?wicket:interface=:5 >> User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) >> AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/525.21 >> Wicket-Ajax true >> >> We receive this on the server/eclipse and the request is processed. >> However the response is received like this on safari (using the >> developer menu): >> Response >> Ajax-Location ?wicket:interface=:5 >> Content-Length 1 >> Server Jetty(6.1.4) >> >> >> As you can see the content length is 1. The effect is that it appears >> that request never returns (there's nothing in the ajax debug window). >> It happens locally and on the server. We're on 1.4-rc2 of wicket. >> >> Any ideas? Anyone seen something like this before? >> >> many thanks >> Wayne >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/AJAX-and-Safari-tp24145113p24145166.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AJAX and Safari
Sorry I just realised that its not ajax - just a normal form submit. We still have the same problem though Wayne Pope-2 wrote: > > Hi, > > not sure how to investigate this, but we have an issue with ajax and > safari. Problem is it doesn't happen every time - only about 40% . > Essentally we send a request: > > Request > Accepttext/xml > Content-Type application/x-www-form-urlencoded > Referer http://foo1.glasscubesdev.com:8080/?wicket:interface=:5 > User-AgentMozilla/5.0 (Windows; U; Windows NT 6.0; en-US) > AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/525.21 > Wicket-Ajax true > > We receive this on the server/eclipse and the request is processed. > However the response is received like this on safari (using the > developer menu): > Response > Ajax-Location ?wicket:interface=:5 > Content-Length1 > ServerJetty(6.1.4) > > > As you can see the content length is 1. The effect is that it appears > that request never returns (there's nothing in the ajax debug window). > It happens locally and on the server. We're on 1.4-rc2 of wicket. > > Any ideas? Anyone seen something like this before? > > many thanks > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/AJAX-and-Safari-tp24145113p24145166.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AJAX and Safari
Hi, not sure how to investigate this, but we have an issue with ajax and safari. Problem is it doesn't happen every time - only about 40% . Essentally we send a request: Request Accept text/xml Content-Typeapplication/x-www-form-urlencoded Referer http://foo1.glasscubesdev.com:8080/?wicket:interface=:5 User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2 Safari/525.21 Wicket-Ajax true We receive this on the server/eclipse and the request is processed. However the response is received like this on safari (using the developer menu): Response Ajax-Location ?wicket:interface=:5 Content-Length 1 Server Jetty(6.1.4) As you can see the content length is 1. The effect is that it appears that request never returns (there's nothing in the ajax debug window). It happens locally and on the server. We're on 1.4-rc2 of wicket. Any ideas? Anyone seen something like this before? many thanks Wayne - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring DM + Hibernate
Can you have your Application object created as a Spring bean and make it context "aware" and let the container inject the context into it? On Mon, Jun 22, 2009 at 2:02 AM, Daniel Dominik Holúbek wrote: > But as far as I understand this, Spring DM is built upon the idea that I > can't build ApplicationContext, as it is built by Spring DM Extender. Am I > right? > > On Mon, Jun 22, 2009 at 12:37 AM, James Carman > wrote: > >> Try using the other SpringComponentInjector constructor (the one that >> takes an ApplicationContext object). Construct your >> ApplicationContext however you want. >> >> On Sun, Jun 21, 2009 at 2:09 PM, Daniel Dominik Holúbek >> wrote: >> > >> > Well, no.I'll explain: >> > It's an OSGi app running in equinox-bridge. In my bundles there is no >> > web.xml, and that's why I can't configure ContextLoaderListener. >> > And because of this, when i add @SpringBean into my code, then add >> > "addComponentInstantiationListener(new SpringComponentInjector(this))" >> into >> > WebApplication's init method and then run the application, the only thing >> I >> > get is this exception: java.lang.IllegalStateException: No >> > WebApplicationContext found: no ContextLoaderListener registered? >> > >> > But if there is a way how to set up that listener, I would be happy :) >> > >> > >> > On Sun, Jun 21, 2009 at 7:28 PM, James Carman >> > wrote: >> > >> > > You can't use @SpringBean? >> > > >> > > On Sun, Jun 21, 2009 at 11:03 AM, Daniel Dominik >> > > Holúbek wrote: >> > > > Hello everyone :)So, I solved the Spring DM problems successfully... >> but >> > > > there is still one problem left, and this time I am absolutely sure >> that >> > > > it's a Wicket related problem :) >> > > > >> > > > I want to inject my "userDao" bean into Panel class. To do that, I >> nead >> > > to >> > > > create a bean from that Panel class - like this: >> > > > >> > > > >> > > > > class="sk.ziwhat.megaweb.loginpanels.prvy.lPanel" >> > > > init-method="init"> >> > > > >> > > > >> > > > >> > > > >> > > > But when I try this, I get an exception: >> > > > >> > > > Caused by: org.apache.wicket.WicketRuntimeException: There is no >> > > application >> > > > attached to current thread SpringOsgiExtenderThread-4 >> > > > This happens when Spring is trying to instantiate the Panel class. >> > > > >> > > > I tried this with ordinary class and everything worked fine. The idea >> was >> > > > that I will instantiate a normal class, and then I will access it >> from >> > > the >> > > > Panel class, but when I do: >> > > > >> > > > ServiceConsumer sc = new ServiceConsumer(); >> > > > >> > > > and then access userDao, I'll get a NullPointerException of course. >> > > > >> > > > So has anybody done this before? I think I need your help :) >> > > > >> > > > Thanks a lot! >> > > > >> > > > On Tue, Jun 16, 2009 at 2:01 AM, djo mos >> wrote: >> > > > >> > > >> Hi, >> > > >> >> > > >> On Mon, Jun 15, 2009 at 9:28 PM, Daniel Dominik Holúbek < >> > > >> dankodo...@gmail.com> wrote: >> > > >> >> > > >> > Well, may be, but won't they send me back to this mailinglist? >> :)To be >> > > >> > honest, I have only a little problem with Spring DM itself (there >> are >> > > >> > couple >> > > >> > of tutorials out there), I was only curious about whether somebody >> has >> > > >> > successfully tried this. >> > > >> > For example, now it seems that the dependency is not being >> injected in >> > > my >> > > >> > code. And I can't do that via @SpringBean, because that needs to >> be >> > > set >> > > >> in >> > > >> > web.xml, and I have no web.xml in my OSGi bundle. >> > > >> >> > > >> >> > > >> Actually with Spring DM you do have web.xml in web bundles, as >> described >> > > in >> > > >> their reference documentation. >> > > >> I'v been able to use Wicket with Spring DM without problems. No >> > > Hibernate >> > > >> though : it really wasn't designed for a strictly controlled >> environment >> > > >> such as OSGi. >> > > >> >> > > >> So, I guess that your problem (not getting IoC to work) is not >> Wicket >> > > >> related but Spring DM related. >> > > >> >> > > >> Cheers >> > > >> >> > > >> > >> > > >> > >> > > >> > But yes, there is a chance that the problem has nothing to do with >> > > Wicket >> > > >> > itself. >> > > >> > >> > > >> > On Mon, Jun 15, 2009 at 4:38 PM, Igor Vaynberg < >> > > igor.vaynb...@gmail.com >> > > >> > >wrote: >> > > >> > >> > > >> > > isnt this a question for the spring dmserver forum? >> > > >> > > >> > > >> > > -igor >> > > >> > > >> > > >> > > On Mon, Jun 15, 2009 at 3:49 AM, Daniel Dominik >> > > >> > > Holúbek wrote: >> > > >> > > > Hello,has anybody here successfully used Spring DM with >> Hibernate >> > > >> (the >> > > >> > > OSGi >> > > >> > > > way) in Wicket? >> > > >> > > > I am totally hopeless about this... >> > > >> > > > >> > > >> > > > The goal is to create modular app with this features: >> > > >> > > > - every module (bundle) has its own applicationContext and DAO >> > > >> classes. >> > > >> >
returning resource on ajax request
Hi, I want to do something like ResourceLink returning DynamicWebResource to the client, but I can use only AjaxLink. Any idea how to do it? Regards, Wojtek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Upload preview before form submit
Hi, I know this was handled many times here in a way but this is not exactly the regular kind of "ajax submit for an upload field". I have implemented the ajax submit using the inline frame solution. However...I want to have a preview of an uploaded file (image for example) BEFORE submitting the form. I have several fields in a form one of which is an uploaded file field. Clicking an upload link near the uploaded file field should load the file and not submit the form. When the user sees the file, fills all the other fields he would like to submit the form. This is pretty common use case I guess. Nested forms does not work here (inner form has only an upload field with ajax submit method) so only separate form gowhich is not good for me. Is there a descent way to implement this? Thanks, Arie
Re: File upload without writing to temp file (on Google App Engine)
Hi, I know, how to store data, but I dont know, how to upload it without writing to file and spawning new threads.. >- >Od: Adrian Merrall >Přijato: 21.6.2009 9:35:25 >Předmět: Re: File upload without writing to temp file (on Google App Engine) > >On Sun, Jun 21, 2009 at 7:18 AM, Joe Fawzy wrote: > > > >> Hi split it into small chunks and store each as a blob in datastore entity > >> Joe > >> > >> On Sat, Jun 20, 2009 at 1:44 PM, Dolejs Vlastimil > >> wrote: > >> > >> > Hi, > >> > I´m trying write wicket application for Google App Engine. > >> > App Engine has some restrictions, one of them is, that you can´t work > >> with > >> > filesystem. > >> > I´m trying upload images with FileUploadField, but i get > >> > AccessControlException. > >> > Looking through source code i found there is DiskFileItemFactory, which > >> > puts large files (over 10kB) to temp files. > >> > Is there any way to redirect all data storing to memory? > >> > > >> > I also found, if I upload small file (smaller than 10kB) - > >> > DiskFileItemFactory store it in memory, but there is some FileCleaner > >> class > >> > which cleans temp files and spawns new Thread (which is also restricted > >> in > >> > App Engine). So it fails again on AccessControlException. > >> > > >> > Have you anybody solved problems with file uploads on App Engine? > >> > > >> > Thanks > >> > >
Re: how to split application properties file into several properties files
As usual it becomes pretty simple if you know how. in the init method you should add: getResourceSettings().addStringResourceLoader(new ClassStringResourceLoader(YourModule.class)); If ClassStringResourceLoader didn't called base class it would be more efficient implementation. Vladimir K wrote: > > I would like to split the application properties file into several > properties files. > I know that I can share resources of base component and page among their > descendants and at that I can use package propeties files. I just don't > want > to go this way because most of messages are organized in different way > than > components and pages. > I wanna just split one file into several distinct files. > > What is the best way? > > -- View this message in context: http://www.nabble.com/how-to-split-application-properties-file-into-several-properties--files-tp24121864p24143617.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org