Re: "go back" problem
you can pass the master page instance into the detail page, then in detail page simply go back class masterpage extends webpage { add(new link("detail") { onclick() { setresponsepage(new detailpage(masterpage.this));}}); } clas detailpage extends webpage { public detailpage(final page back) { add(new link("back") { oncick() { setresponsepage(back);}}); } -igor On Sun, Oct 19, 2008 at 9:04 AM, overseastars <[EMAIL PROTECTED]> wrote: > > > Hi all > I'm learning to use the library example on the wicket website. But I found > that once I got some results by search and I clicked one link to go into > that detail page, then I actually could go back to the previous page. The > example on the wicket website just provides a link to home, not a real > "Back" link. > > For example, I'm searching some hotels. I input a keyword in the search bar > and then get a list of accommodations. Then I click on one record and I get > a list of rooms of that accommodation. Now if I click on one room it will go > to the detail page of that room. What if I want to go back to the previous > page containing a list of rooms? Furthermore, what if I want to go back to > that page including a list of accommodation?? > > I just put a small piece of my code here. this is the method from the wicket > example page. How can I make a "back" link? > I really need this. otherwise my mentor will kill my marks..:-( Please > help me. Many thanks~~ > > > public static BookmarkablePageLink link(final String name, >final Accommodation accommodation) { >clickedAccommodation = accommodation; > >final BookmarkablePageLink link = new > BookmarkablePageLink(name, >RoomResultListPage.class); > >if (accommodation != null) { >link.setParameter("aid", accommodation.getAid()); > >link.add(new Label("name", new > Model(accommodation.getName(; >} else { >link.add(new Label("name", "No matched rooms - > xingxing")); >link.setEnabled(false); >} > >return link; > >} > -- > View this message in context: > http://www.nabble.com/%22go-back%22-problem-tp20057504p20057504.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: "go back" problem
Hi I dont know whether this question is too easy or hard??? Since I'm a newbie of wicket, I dont know whether there are built-in functions for the "Back" link like the browsers do. Could anyone give me, at least, some ideas?? I'm still trapped by this possibly fish quesion.Thanks a lot for any help. overseastars wrote: > > > Hi all > I'm learning to use the library example on the wicket website. But I found > that once I got some results by search and I clicked one link to go into > that detail page, then I actually could go back to the previous page. The > example on the wicket website just provides a link to home, not a real > "Back" link. > > For example, I'm searching some hotels. I input a keyword in the search > bar and then get a list of accommodations. Then I click on one record and > I get a list of rooms of that accommodation. Now if I click on one room it > will go to the detail page of that room. What if I want to go back to the > previous page containing a list of rooms? Furthermore, what if I want to > go back to that page including a list of accommodation?? > > I just put a small piece of my code here. this is the method from the > wicket example page. How can I make a "back" link? > I really need this. otherwise my mentor will kill my marks..:-( Please > help me. Many thanks~~ > > > public static BookmarkablePageLink link(final String name, > final Accommodation accommodation) { > clickedAccommodation = accommodation; > > final BookmarkablePageLink link = new BookmarkablePageLink(name, > RoomResultListPage.class); > > if (accommodation != null) { > link.setParameter("aid", accommodation.getAid()); > > link.add(new Label("name", new > Model(accommodation.getName(; > } else { > link.add(new Label("name", "No matched rooms - > xingxing")); > link.setEnabled(false); > } > > return link; > > } > -- View this message in context: http://www.nabble.com/%22go-back%22-problem-tp20057504p20104879.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 6
Argh just saw that I did a typo.. I of course meant start.java :) Everything's setup for you if you use wicket archetype, iolite or wickettopia.. Nino Saturnino Martinez Vazquez Wael wrote: Check you dependencies.. I just use jetty when running from eclipse, much simpler.. Just run start jar or debug start jar.. etc.. Leucht, Axel wrote: Hi, I'm currently trying to get a HelloWorld application running with wicket 1.3.4. I'm doing all my web development from within the Eclipse IDE (3.4 Ganymede), so I suspect setup of the project should be easy. When the server environment is set to tomcat 5.5.27 the HelloWorldApplication runs fine but NOT under tomcat 6.0.16! There is no clue in the logs stating that wicket is started in development mode which it is when started under tc 5.5.27. The application does run when I start tomcat 6.0.16 in standalone mode (outside Eclipse). Does someone knows what to do to make it run from within Eclipse? /Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket redirect issue on IE7
Hello, I have a problem in IE7 when i redirect wicket pages in javascript using location.href = ?wicket:interface=:3 ..i generate that url using RequestCycle.get().urlFor(new TestPage()). But it is working fine in firefox...Is this a browser problem? How can i solve this problem? Thanks a lot. Cheers. -- View this message in context: http://www.nabble.com/wicket-redirect-issue-on-IE7-tp20104115p20104115.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FireFox 3.x.x issue with wicket
Respected sir, "When I am writing in the search boxes I only see half of the text. This happens with FireFox 3.x.x" What can i do in this case?This is happening in some pcs. -- View this message in context: http://www.nabble.com/FireFox-3.x.x-issue-with-wicket-tp20104033p20104033.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax validating individual form fields
Thank you very much, I didn't realize that the AjaxFormComponentUpdatingBehavior submitted individual components, I guess i got it confused with AjaxFormValidatingBehavior. I think the only issue is when a form level validator needs to be used, for instance to compare that two fields are equal. Am I correct in assuming theres no way to attach a form component validator to a field and have it compare against the value of another component? If so I'm not sure if it would be possible to fire a form level validator on the onblur of the second component without submitting the entire form. Another issue I thought of is if you use a password text field you wouldn't be able to use AjaxFormComponentUpdatingBehavior because even if the input is valid it would erase immediately. Maybe there is a clever way to override the isPasswordReset so that it only is true when the form is submit through a button and not that behavior? Daan (StuQ) wrote: > > Hi fatefree, > > Check this blog post: > http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket > I think this achieves what you want. > > Regards, > > Daan > > -- View this message in context: http://www.nabble.com/Ajax-validating-individual-form-fields-tp20090299p20102724.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javascript error in internet explorer
On Tue, 21 Oct 2008, Srikanth.NT wrote: > My IE version is 6.0.2900.2180.xpxp_sp2_gdr.050301-1519 > > In wicket-ajax.js, I replaced > t.setRequestHeader("Wicket-FocusedElementId", Wicket.Focus.lastFocusId || > ""); > with > if (Wicket.Focus && Wicket.Focus.lastFocusId) { > t.setRequestHeader("Wicket-FocusedElementId", Wicket.Focus.lastFocusId > || ""); > } > else { > // t.setRequestHeader("Wicket-FocusedElementId", ""); > } > in both doGet and doPost methods. And now it works. Thanks, so this is the solution... but what exactly is the problem?-) Best wishes, Timo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 6
On Tue, 21 Oct 2008, Guðmundur Bjarni wrote: > If you decide to go for Jetty, you should try the run-jetty-run[1] plugin > that Eelco wrote. Basically if your project is set up right, i.e. web.xml in > the right place and so on. You can run it like any other Java Application > from Eclipse's run configurations. Jetty can also easily be run like any Java application, without any plugin, with about 20 lines of code. Wicket quickstart provides a working example. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Enconding a url returned by urlFor()
Hi all, We have a component that needs to create a dynamic resource (currently using a DynamicWebResource). The resource is tightly coupled with the component's model. Our component implements the IResourceListener interface so that we can generate a URL for the generated markup. The markup generated is an tag to which we assign the generated URL (using Component.urlFor() method). Works great! Except... that the darn plugin that is launched by the tag seems to have trouble with URLs that are not of a specific form. In other words its not liking the parameters on the URL (ie: /foo?wicket:interface[...]). My first thought was to encode the URL with a different strategy: using the IRequestTargetCodingStrategy. The problem is that I can't figure out how I'm supposed to do this. How can I use an encoding strategy for a component that implements the IResourceListener interface? I don't mind mounting all these on a specific prefixed path, but I can't mount a Page, it needs to be a Component (Panel to be more specific). Can someone point me in the right direction? Thanks Philippe -- View this message in context: http://www.nabble.com/Enconding-a-url-returned-by-urlFor%28%29-tp20102249p20102249.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to submit form to external page sending parameters by post, please Help
Perhaps one of the following: 1. Don't use wicket "Form" - use web markup containers of some sort and attribute modifiers to output a form that actually posts directly to the paypal site. (In other words - generate a real form with action= https://www.sandbox.paypal.com.) 2. OR - if you need to post back into Wicket and then submit the information to Paypal - use an HTTP client like Commons to post programmatically. (See http://www.java2s.com/Code/Java/Apache-Common/HttppostmethodExample.htm for example) If you want your user to actually end up at the posted paypal page, as I suspect you do from your details below, I definitely think number one is what you need. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 21, 2008 at 4:49 PM, Pablo Scagno <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to submit a form to Paypal but I don't know how I can do > this. > I have a wicket form with all the fields that I need to submit but when I > redirect the page to paypal I can't send the form fields. I can't put the > parameters in the querystring, I must send them by post. > This is my code to redirect in the button onSubmit() event > > RedirectPage redirectPage = new RedirectPage(" > https://www.sandbox.paypal.com/cgi-bin/webscr";); > setResponsePage(redirectPage); > ... > > Is there any way to send the values? > > My form must be wicket because It depends on a model... > > Thanks > Pablo > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Salve and Guice
i am not sure where exactly the documentation lacks...there is a wiki that shows how to configure everything. anyways, salve stuff is better taken to the salve discussion group so we dont pollute this list. -igor On Tue, Oct 21, 2008 at 4:02 PM, Edgar Merino <[EMAIL PROTECTED]> wrote: > Also, InjectorHolder.getInjector().inject(this) does not work with guice, > it returns an illegalstateexception saying there's no injector assigned for > the holder. It would be nice to have more documentation on how to use salve, > regards. > > Edgar Merino > > > > Guðmundur Bjarni escribió: > >> I agree that static injection is fugly, it makes unit tests very sad and >> >> kills puppies, but in some cases its a necessary evil. Lets say for >> example >> that it is only needed in a very few cases, then IMO pulling in Salve is a >> bit of an overkill. I've tried out Salve, liked it but it's a bit of a >> commitment to use compile time weaving/instrumentation. >> Last I checked, the InjectorHolder only worked with Spring and not with >> Guice. I looked into fixing that some time ago but didn't finish that >> work. >> I've got more time now if someone is interested? :) >> >> regards, >> Guðmundur Bjarni >> >> >> igor.vaynberg wrote: >> >> >>> there are cases where this approach plain old sucks. >>> >>> as you mentioned, if its not a component you have to use static injection >>> which is fugly >>> >>> class mydataprovider implements idataprovider { >>> public mydataprovider() { >>> InjectorHolder.getInjector().inject(this); >>> } >>> } >>> >>> another problem is that the injector creates a proxy which in certain >>> situations cant be done. eg your dependency is a class from a 3rd party >>> library that does not have a default constructor, thus cglib cannot >>> create >>> a >>> proxy. >>> >>> another advantage of salve is that it _removes_ the field from the class. >>> so >>> your classes are smaller and there are no serialization problems >>> whatsoever >>> as far as dependencies go. >>> >>> -igor >>> >>> >>> >> >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Salve and Guice
Also, InjectorHolder.getInjector().inject(this) does not work with guice, it returns an illegalstateexception saying there's no injector assigned for the holder. It would be nice to have more documentation on how to use salve, regards. Edgar Merino Guðmundur Bjarni escribió: I agree that static injection is fugly, it makes unit tests very sad and kills puppies, but in some cases its a necessary evil. Lets say for example that it is only needed in a very few cases, then IMO pulling in Salve is a bit of an overkill. I've tried out Salve, liked it but it's a bit of a commitment to use compile time weaving/instrumentation. Last I checked, the InjectorHolder only worked with Spring and not with Guice. I looked into fixing that some time ago but didn't finish that work. I've got more time now if someone is interested? :) regards, Guðmundur Bjarni igor.vaynberg wrote: there are cases where this approach plain old sucks. as you mentioned, if its not a component you have to use static injection which is fugly class mydataprovider implements idataprovider { public mydataprovider() { InjectorHolder.getInjector().inject(this); } } another problem is that the injector creates a proxy which in certain situations cant be done. eg your dependency is a class from a 3rd party library that does not have a default constructor, thus cglib cannot create a proxy. another advantage of salve is that it _removes_ the field from the class. so your classes are smaller and there are no serialization problems whatsoever as far as dependencies go. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to style Form feedback?
Never mind. The answer is to use Component.setEscapeModelStrings(boolean). On Tue, Oct 21, 2008 at 4:02 PM, nate roe <[EMAIL PROTECTED]> wrote: > I have a Form with a FeedbackPanel. When there is a problem in a validator > (subclass of AbstractFormValidator), the validator calls error(...) with a > message resource key. This all works as planned. However, I need to style > the text in these feedback messages (parts of some messages need to be > bold). How can this be accomplished? > > Thanks, > Nate Roe >
Re: Salve and Guice
As far as I know, salve will only modify bytecode, it should do that only once, after the JIT compiler comes in there should be no more overhead. Correct me if I'm wrong, regards. Edgar Merino Guðmundur Bjarni escribió: I agree that static injection is fugly, it makes unit tests very sad and kills puppies, but in some cases its a necessary evil. Lets say for example that it is only needed in a very few cases, then IMO pulling in Salve is a bit of an overkill. I've tried out Salve, liked it but it's a bit of a commitment to use compile time weaving/instrumentation. Last I checked, the InjectorHolder only worked with Spring and not with Guice. I looked into fixing that some time ago but didn't finish that work. I've got more time now if someone is interested? :) regards, Guðmundur Bjarni igor.vaynberg wrote: there are cases where this approach plain old sucks. as you mentioned, if its not a component you have to use static injection which is fugly class mydataprovider implements idataprovider { public mydataprovider() { InjectorHolder.getInjector().inject(this); } } another problem is that the injector creates a proxy which in certain situations cant be done. eg your dependency is a class from a 3rd party library that does not have a default constructor, thus cglib cannot create a proxy. another advantage of salve is that it _removes_ the field from the class. so your classes are smaller and there are no serialization problems whatsoever as far as dependencies go. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to style Form feedback?
I have a Form with a FeedbackPanel. When there is a problem in a validator (subclass of AbstractFormValidator), the validator calls error(...) with a message resource key. This all works as planned. However, I need to style the text in these feedback messages (parts of some messages need to be bold). How can this be accomplished? Thanks, Nate Roe
Re: Pages or components... how do u decide?
Their constructor :) Nav Che wrote: > > Ned, > > But then how do u pass parameters across the panels??? > > //nav > -- View this message in context: http://www.nabble.com/Pages-or-components...-how-do-u-decide--tp20016807p20100652.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Salve and Guice
I agree that static injection is fugly, it makes unit tests very sad and kills puppies, but in some cases its a necessary evil. Lets say for example that it is only needed in a very few cases, then IMO pulling in Salve is a bit of an overkill. I've tried out Salve, liked it but it's a bit of a commitment to use compile time weaving/instrumentation. Last I checked, the InjectorHolder only worked with Spring and not with Guice. I looked into fixing that some time ago but didn't finish that work. I've got more time now if someone is interested? :) regards, Guðmundur Bjarni igor.vaynberg wrote: > > there are cases where this approach plain old sucks. > > as you mentioned, if its not a component you have to use static injection > which is fugly > > class mydataprovider implements idataprovider { > public mydataprovider() { > InjectorHolder.getInjector().inject(this); > } > } > > another problem is that the injector creates a proxy which in certain > situations cant be done. eg your dependency is a class from a 3rd party > library that does not have a default constructor, thus cglib cannot create > a > proxy. > > another advantage of salve is that it _removes_ the field from the class. > so > your classes are smaller and there are no serialization problems > whatsoever > as far as dependencies go. > > -igor > -- View this message in context: http://www.nabble.com/Salve-and-Guice-tp20087649p20100143.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to submit form to external page sending parameters by post, please Help
Hi, I'm trying to submit a form to Paypal but I don't know how I can do this. I have a wicket form with all the fields that I need to submit but when I redirect the page to paypal I can't send the form fields. I can't put the parameters in the querystring, I must send them by post. This is my code to redirect in the button onSubmit() event RedirectPage redirectPage = new RedirectPage("https://www.sandbox.paypal.com/cgi-bin/webscr";); setResponsePage(redirectPage); ... Is there any way to send the values? My form must be wicket because It depends on a model... Thanks Pablo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket community traction / Wicket Web 2.0 experience
just some quick pros for wicket which helped us to make a decision (someone please correct me if i'm wrong on any of these): * wicket started from a professional background, ie people noticed there is a reason to develop it because no available framework met their needs * the architecture is indeed better than anything i've seen in the java web framework world for a long time, core and pure oo concepts done right, and every dependency to a "third party" technology in wicket core is seriously debated and only implemented if there really is need for it. * wicket has a lot of traction, it's just not as loud as GWT's, which is quite understandable if you remind yourself what the G in GWT stands for * serious wicket applications: Dertour.de and connected domains...a rather serious application, because of 2 things: load and transactions. It's easy to build a shiny web2.0 thingy with nearly every technology out there, but the real measurements are scalability (load) and reliability (number and consistency of transactions). in the end it boils down to the numbers, and wicket will help you keeping them down, as it integrates very well with the whole JEE world, be it spring, jpa, hibernate, ejb or whatnot. if used right (which, btw, should be a disclaimer for all arguments regarding any framework), it eases code maintenance and narrows the gap between prototyping and production. but whatever you decide, trust your gut as an architect. regards, martin 2008/10/21 <[EMAIL PROTECTED]>: > Hi Wicket users! > > At my company, we are currently evaluating technology choices for building > web user interfaces. We narrowed our candidate list down to two remaining > candidates: Wicket and GWT. We already did some prototyping with these > two. Our main conclusions are > - Wicket has the better architecture (by far). > - GWT allows to create Web 2.0 style user interfaces with fewer effort. > > I like Wicket because of the first argument. In our team, there are some > objections against Wicket because of the second point and because some > developers in the team think, that Wicket has not enough community > traction and that no serious Web 2.0 _application_ uses Wicket. > > Can you help me to invalidate these objections and to convince my team of > Wicket? > - Which Wicket success stories do you know of? > - Are there examples for serious Wicket applications? > - How can I prove that there is community traction for Wicket? > - Are there examples of a GWT style Wicket usage, that means lot of Web > 2.0 user interface features realized with Wicket? > > Regards, > Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pages or components... how do u decide?
Ned, But then how do u pass parameters across the panels??? //nav On Sun, Oct 19, 2008 at 5:55 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > I use markup inheritance for some pages, but I try to avoid making new > pages > (after all, what do they give you that a panel does not (other than an > URL)?) > > I do use markup inheritance for components A LOT!! > > > > jwcarman wrote: > > > > Are you using one page and just passing in your "content" component? > > Are you not using markup inheritance? > > > > On Thu, Oct 16, 2008 at 5:16 PM, Ned Collyer <[EMAIL PROTECTED]> > > wrote: > >> > >> The system I'm building at the moment has almost everything pushed down > >> into > >> components. Most of the functionality is achieved by a single base page > >> which takes a component in its constructor. > >> > >> For Bookmarkable pages, I extend this base page, and pass a component to > >> the > >> super. > >> > >> How do _you_ separate concerns? Is there a best practice? > >> > >> A benefit of using a page is that it can be accessed with "getPage()" > >> regardless of how deep in the hierarchy you are... so I guess it could > be > >> useful for storing the primary model for that section of the site. > >> > >> Anyway, I'm interested in hearing how others deal with Page vs > >> Components, > >> and how they structure their applications. > >> > >> So many ways of skinning a cat :) > >> > >> Rgds > >> > >> Ned > >> -- > >> View this message in context: > >> > http://www.nabble.com/Pages-or-components...-how-do-u-decide--tp20016807p20016807.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Pages-or-components...-how-do-u-decide--tp20016807p20060673.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
How to pass parameters to a BreadCrumbPanel
Hello All, How do i pass parameters between panels. Basically i have panels in my appilcation which use breadcrumb model. Say on panel A i display list of users and I want the user Id to be a link upon clickin it should show the edit panel ( panel B ) of user and for which it shld either pass user object or userid. Please advise. Thanks in advance Regards naveen
Re: Component hierarchy in a subclass situation
Thanks! That did the trick. On Tue, Oct 21, 2008 at 10:50 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > erm, override istransparentresolver() { return true; } > > -igor > > On Tue, Oct 21, 2008 at 10:43 AM, Tauren Mills <[EMAIL PROTECTED]> wrote: > > > Igor, > > > > Thanks for the help, but I'm not finding setTransparentResolver in > > WebMarkupContainer. Should I be using a Border? > > > > Thanks, > > Tauren > > > > > > On Sat, Oct 18, 2008 at 1:55 PM, Igor Vaynberg <[EMAIL PROTECTED] > > >wrote: > > > > > WebMarkupContainer body = new > > > WebMarkupContainer("pageStyle").setTransparentResolver(true); > > > > > > -igor > > > > > > > > > On Sat, Oct 18, 2008 at 1:51 PM, Tauren Mills <[EMAIL PROTECTED]> > wrote: > > > > > > > I'm looking for advice on how to deal with the component hierarchy > > below. > > > > I'm getting a MarkupException and think that the problem is that the > > > "body" > > > > defined in base page is a sibling of content, header, and footer > > instead > > > of > > > > their parent. Content, header, and footer should be children of > body. > > > > > > > > Any suggestions on a clean way to add them as children? I could > define > > > > body > > > > as a property and then in HomePage do getBody().add(new > > > > HomePanel("content") > > > > or some such, but is there a better way to do this? I suppose I > could > > > pull > > > > the body into the HomePage as well. > > > > > > > > I'm working on a site that has different color schemes for different > > > > sections. So my thought was to add a CSS class to the body so that I > > can > > > > use CSS selectors to specify colors based on which pageStyle the page > > is > > > > set > > > > to use. There are only a few color changes necessary, so I wanted > to > > > keep > > > > it all in one CSS file instead of adding wicket:head to each page > with > > > > customizations on a per page basis. > > > > > > > > I'd appreciate any suggestions on nice clean solutions to this, or > even > > > > ideas on completely different approaches to this problem. > > > > > > > > Thanks! > > > > Tauren > > > > > > > > > > > > BasePage > > > > > > > > > > > > private void init() { > > > >WebMarkupContainer body = new WebMarkupContainer("pageStyle"); > > > >body.add(new SimpleAttributeModifier("class",getPageStyle())); > > > >add(body); > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > HomePage extends BasePage > > > > - > > > > > > > > public void init() { > > > >add(new HomePanel("content")); > > > >add(new HeaderPanel("header")); > > > >add(new FooterPanel("footer")); > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Re: Returning XML to JS
for an example, see http://www.nabble.com/linking-to-a-text-ResourceReference-td19753402.html Maarten On Tue, Oct 21, 2008 at 12:07 PM, Peter Ertl <[EMAIL PROTECTED]> wrote: > have a look at XStream :-) > > > Am 21.10.2008 um 11:25 schrieb [EMAIL PROTECTED]: > > > Hi, >> >> What's the nice / correct way to do this in Wicket: >> >> I have a client side bit of JS that looks something like >> >> getData(URL); >> >> It expects to get back an XML document like >> >> >> foo >> bar >> >> >> On the wicket side, I want the Java object that spits back the XML to be >> part of a component. This parent component will have supplied the URL in >> question. >> >> Any ideas how I should do this? >> >> Thanks, >> >> Ambrose Wheatcroft >> Analyst / Programmer, JHC PLC >> >> +44 (0)20 7367 6500 >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Component hierarchy in a subclass situation
erm, override istransparentresolver() { return true; } -igor On Tue, Oct 21, 2008 at 10:43 AM, Tauren Mills <[EMAIL PROTECTED]> wrote: > Igor, > > Thanks for the help, but I'm not finding setTransparentResolver in > WebMarkupContainer. Should I be using a Border? > > Thanks, > Tauren > > > On Sat, Oct 18, 2008 at 1:55 PM, Igor Vaynberg <[EMAIL PROTECTED] > >wrote: > > > WebMarkupContainer body = new > > WebMarkupContainer("pageStyle").setTransparentResolver(true); > > > > -igor > > > > > > On Sat, Oct 18, 2008 at 1:51 PM, Tauren Mills <[EMAIL PROTECTED]> wrote: > > > > > I'm looking for advice on how to deal with the component hierarchy > below. > > > I'm getting a MarkupException and think that the problem is that the > > "body" > > > defined in base page is a sibling of content, header, and footer > instead > > of > > > their parent. Content, header, and footer should be children of body. > > > > > > Any suggestions on a clean way to add them as children? I could define > > > body > > > as a property and then in HomePage do getBody().add(new > > > HomePanel("content") > > > or some such, but is there a better way to do this? I suppose I could > > pull > > > the body into the HomePage as well. > > > > > > I'm working on a site that has different color schemes for different > > > sections. So my thought was to add a CSS class to the body so that I > can > > > use CSS selectors to specify colors based on which pageStyle the page > is > > > set > > > to use. There are only a few color changes necessary, so I wanted to > > keep > > > it all in one CSS file instead of adding wicket:head to each page with > > > customizations on a per page basis. > > > > > > I'd appreciate any suggestions on nice clean solutions to this, or even > > > ideas on completely different approaches to this problem. > > > > > > Thanks! > > > Tauren > > > > > > > > > BasePage > > > > > > > > > private void init() { > > >WebMarkupContainer body = new WebMarkupContainer("pageStyle"); > > >body.add(new SimpleAttributeModifier("class",getPageStyle())); > > >add(body); > > > } > > > > > > > > > > > > > > > > > > > > > HomePage extends BasePage > > > - > > > > > > public void init() { > > >add(new HomePanel("content")); > > >add(new HeaderPanel("header")); > > >add(new FooterPanel("footer")); > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Re: Component hierarchy in a subclass situation
Igor, Thanks for the help, but I'm not finding setTransparentResolver in WebMarkupContainer. Should I be using a Border? Thanks, Tauren On Sat, Oct 18, 2008 at 1:55 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > WebMarkupContainer body = new > WebMarkupContainer("pageStyle").setTransparentResolver(true); > > -igor > > > On Sat, Oct 18, 2008 at 1:51 PM, Tauren Mills <[EMAIL PROTECTED]> wrote: > > > I'm looking for advice on how to deal with the component hierarchy below. > > I'm getting a MarkupException and think that the problem is that the > "body" > > defined in base page is a sibling of content, header, and footer instead > of > > their parent. Content, header, and footer should be children of body. > > > > Any suggestions on a clean way to add them as children? I could define > > body > > as a property and then in HomePage do getBody().add(new > > HomePanel("content") > > or some such, but is there a better way to do this? I suppose I could > pull > > the body into the HomePage as well. > > > > I'm working on a site that has different color schemes for different > > sections. So my thought was to add a CSS class to the body so that I can > > use CSS selectors to specify colors based on which pageStyle the page is > > set > > to use. There are only a few color changes necessary, so I wanted to > keep > > it all in one CSS file instead of adding wicket:head to each page with > > customizations on a per page basis. > > > > I'd appreciate any suggestions on nice clean solutions to this, or even > > ideas on completely different approaches to this problem. > > > > Thanks! > > Tauren > > > > > > BasePage > > > > > > private void init() { > >WebMarkupContainer body = new WebMarkupContainer("pageStyle"); > >body.add(new SimpleAttributeModifier("class",getPageStyle())); > >add(body); > > } > > > > > > > > > > > > > > HomePage extends BasePage > > - > > > > public void init() { > >add(new HomePanel("content")); > >add(new HeaderPanel("header")); > >add(new FooterPanel("footer")); > > } > > > > > > > > > > > > > > > > > > >
Re: Wicket community traction / Wicket Web 2.0 experience
We have just started evaluating frameworks to migrate our Struts 1.x apps. We are considering Wicket, GWT, and Spring MVC (I know, they are quite a bit different). Having prototyped in Wicket and GWT, which do you think allows you to write code that is easier to maintain? There is a wiki page with sites using Wicket: http://cwiki.apache.org/WICKET/sites-using-wicket.html Also, the Wicket in Action forward by Jonathan Locke mentions that IBM, TomTom, Nikon, VeriSign, Amazon, and SAS use Wicket. Thanks, Richard Allen On Tue, Oct 21, 2008 at 11:49 AM, <[EMAIL PROTECTED]> wrote: > Hi Wicket users! > > At my company, we are currently evaluating technology choices for building > web user interfaces. We narrowed our candidate list down to two remaining > candidates: Wicket and GWT. We already did some prototyping with these > two. Our main conclusions are > - Wicket has the better architecture (by far). > - GWT allows to create Web 2.0 style user interfaces with fewer effort. > > I like Wicket because of the first argument. In our team, there are some > objections against Wicket because of the second point and because some > developers in the team think, that Wicket has not enough community > traction and that no serious Web 2.0 _application_ uses Wicket. > > Can you help me to invalidate these objections and to convince my team of > Wicket? > - Which Wicket success stories do you know of? > - Are there examples for serious Wicket applications? > - How can I prove that there is community traction for Wicket? > - Are there examples of a GWT style Wicket usage, that means lot of Web > 2.0 user interface features realized with Wicket? > > Regards, > Christoph
Re: ContextImage not generating path relative to context root
Al, do you have any idea? -Matej On Tue, Oct 21, 2008 at 10:18 AM, Gianni Doe <[EMAIL PROTECTED]> wrote: > I'm a bit confused about ContextImage; according to the javadocs the image > path "will be prefixed such that the image is relative to the context root". > > In my markup I've got: > > > Then I add the Context image to my WebPage: > add(new ContextImage("logo", "images/logos/mylogo.gif")); > > ... and I end up with: > > > My application is deployed with a context root of /myapp and this doesn't > work, it will only work if the application is deployed with a context root > of /. I've checked the source which ContextImage uses to get the context > root and in org.apache.wicket.Request it says: > > /** > * Gets a prefix to make this relative to the context root. > * > * For example, if your context root is http://server.com/myApp/ and the > request is for > * /myApp/mountedPage/, then the prefix returned might be "../../". > * > * For a particular technology, this might return either an absolute prefix > or a relative one. > * > * @return Prefix relative to this request required to back up to context > root. > */ > public abstract String getRelativePathPrefixToContextRoot(); > > To me this just seems plain wrong, here it clearly states that the context > root is "http://server.com/myApp/"; but the example prefix of "../../" > relative to "/myApp/mountedPage/" does not take you to the context root of > /myApp/ but to /. > > This is very confusing as I've always considered the context root of a java > web application to to be the path upon which it is deployed on the > application server, whether that be /, /myApp or /apps/myApp and in the > above case I do not end up with an image path relative to the context root. > Without hard-coding the name of my context root in the image path (bad idea > for portability) how can I reference static images stored in an images > directory under the context root? > > Should I file this as a bug or am I missing something? > Thanks > Gianni > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setObject( ), getObject( )
On Mon, Oct 20, 2008 at 11:02 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > whenever there is something nonfinal people will always find a way to misuse > it. > > model methods are not final because it gives you a simple base class > to subclass instead of starting from scratch with an imodel. Right. I've done this before myself. So, -1 (non-binding of course) from me for making Model final (or making the methods final). Besides, it breaks binary compatibility. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation Messages
log4j.logger.org.apache.wicket.resource=DEBUG should do it afair. -igor On Tue, Oct 21, 2008 at 8:16 AM, Kai Mütz <[EMAIL PROTECTED]> wrote: > Hi, > > I have some problems with validation messages. Normally I set my validation > messages within the property files like this: > > Required='${label}' is required > StringValidator.maximum='${label}' [...] ${maximum} [...] > > myform.myfield=My Field > > and got (as expected) "'My Field' is required" if I do not fill myfield. > > A problem occurs with a form which contains a tapped panel. The validator > does not find the resource and I got the message "'myfield' is required". > Is > there a possibility to find out which resource key the validator uses to > find the resource? And in which property files the validator is searching? > > Thanks in advance, > Kai > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: setObject( ), getObject( )
However setObject() doesn't work as well on AbstractReadOnlyModel as it does on Model, which is particularly important for immutable backing objects such as Strings. On Tue, Oct 21, 2008 at 2:35 AM, Johan Compagner <[EMAIL PROTECTED]> wrote: > we have also AbstractReadOnlyModel for that > so igor are you sure you dont want to have Model final? :) > > > On Mon, Oct 20, 2008 at 5:02 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > >> whenever there is something nonfinal people will always find a way to >> misuse it. >> >> model methods are not final because it gives you a simple base class >> to subclass instead of starting from scratch with an imodel. >> >> -igor >> >> On Mon, Oct 20, 2008 at 6:37 AM, Ricky <[EMAIL PROTECTED]> wrote: >> > Hi, >> > >> > Is there any reason getObject and setObject were not made final in Model >> > class? the reason why i am asking is that there might be the case when >> > people misuse this; for example (and i have seen this at my current >> > workplace); >> > >> >Model xModel = new Model(new Long(1)) { >> > >> >@Override >> >public Object getObject() { >> >// return super.getObject(); <-- not calling this, instead >> i >> > return null >> >return null; >> >} >> >}; >> > >> >// some lines afterwards ... i need this model ... i use it >> > (expecting to get back object i set) >> >// instead i get null. Original intent was to set object passed in >> > and get the same thing ... >> >System.out.println(xModel.getObject()); >> > >> > Here i get null as the result. >> > >> > Any suggestions? >> > >> > Regards >> > Vyas, Anirudh >> > >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket community traction / Wicket Web 2.0 experience
Hi Wicket users! At my company, we are currently evaluating technology choices for building web user interfaces. We narrowed our candidate list down to two remaining candidates: Wicket and GWT. We already did some prototyping with these two. Our main conclusions are - Wicket has the better architecture (by far). - GWT allows to create Web 2.0 style user interfaces with fewer effort. I like Wicket because of the first argument. In our team, there are some objections against Wicket because of the second point and because some developers in the team think, that Wicket has not enough community traction and that no serious Web 2.0 _application_ uses Wicket. Can you help me to invalidate these objections and to convince my team of Wicket? - Which Wicket success stories do you know of? - Are there examples for serious Wicket applications? - How can I prove that there is community traction for Wicket? - Are there examples of a GWT style Wicket usage, that means lot of Web 2.0 user interface features realized with Wicket? Regards, Christoph
Re: Salve and Guice
there are cases where this approach plain old sucks. as you mentioned, if its not a component you have to use static injection which is fugly class mydataprovider implements idataprovider { public mydataprovider() { InjectorHolder.getInjector().inject(this); } } another problem is that the injector creates a proxy which in certain situations cant be done. eg your dependency is a class from a 3rd party library that does not have a default constructor, thus cglib cannot create a proxy. another advantage of salve is that it _removes_ the field from the class. so your classes are smaller and there are no serialization problems whatsoever as far as dependencies go. -igor On Tue, Oct 21, 2008 at 4:15 AM, Guðmundur Bjarni < [EMAIL PROTECTED]> wrote: > > I haven't used Salve with Wicket, but I've been using the wicket-guice > integration quite extensively. The reason I'm answering this is that I feel > that many of the use cases of Salve can be solved with pure vanilla Guice. > In cases where you can't control the instantiation of objects, you can use > static injection, which is a bit dirty, but IMO cleaner than > instrumentation. :) So this post is maybe a tiny bit off topic. :) > > The way I've been doing it is by using the guice-servlet package which > allows you to extend a GuiceServletContextListener to create a Injector. To > tell your servlet container about this, put something similar into your > web.xml: > > > > > dk.dtu.kiosk.guice.MyGuiceServletContextListener > > > Then I use the wicket-guice integration for hooking the two together. To > bootstrap Wicket with Guice you simply use the following in your web.xml > > >myApplication > >org.apache.wicket.protocol.http.WicketFilter > > >applicationFactoryClassName > > > org.apache.wicket.guice.GuiceWebApplicationFactory > > > >injectorContextAttribute > > com.google.inject.Injector > > > > Voila! Now you can use the @Inject annotation in any Wicket component. You > also have the option of using Providers if you need something dep. injected > or in the difficult cases static injection. > > regards, > Guðmundur Bjarni > -- > View this message in context: > http://www.nabble.com/Salve-and-Guice-tp20087649p20088079.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: inmethod / grid website?
Jars: http://wicketstuff.org/maven/repository/com/inmethod/ Demo: http://wicketstuff.org/grid-examples/ Update your bookmarks. On Tue, 2008-10-21 at 11:53 +0200, Martin Voigt wrote: > Hi, > > this may be the wrong place to ask, but anyways. What happened to the > inmethod/ grid web site? > > http://www.inmethod.com/ > > is showing the tomcat welcome page for some time now. Did it move? > > Regards, > Martin > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation Messages
Hi, I have some problems with validation messages. Normally I set my validation messages within the property files like this: Required='${label}' is required StringValidator.maximum='${label}' [...] ${maximum} [...] myform.myfield=My Field and got (as expected) "'My Field' is required" if I do not fill myfield. A problem occurs with a form which contains a tapped panel. The validator does not find the resource and I got the message "'myfield' is required". Is there a possibility to find out which resource key the validator uses to find the resource? And in which property files the validator is searching? Thanks in advance, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @MountPath with same path
Thats the type of problem where you fight against a basic design descision. Happens a lot with Hibernate, too, and you always lose one way or the other... Jörn On Tue, Oct 21, 2008 at 5:04 PM, Cédric Thiébault <[EMAIL PROTECTED]> wrote: >> Jörn > Yes I could do something like that but I don't really like the idea of > a unique page that dispatch to panels depending on parameters... > >> David > It throws the same exception with @MountIndexedHybrid: > org.apache.wicket.WicketRuntimeException: products is already mounted > for HybridUrlCodingStrategy > > I tried to do it without annotations and I have exactly the same > problems (hopefully): > mountBookmarkablePage("products", ProductListPage.class); > mount(new IndexedHybridUrlCodingStrategy("products", > ProductDetailPage.class)); > > > Cedric > > > On Mon, Oct 20, 2008 at 5:46 PM, David Leangen <[EMAIL PROTECTED]> wrote: >> >> You can use IndexedHybridUrlCodingStrategy (or something like that... >> currently writing from [my poor] memory). >> >> >> Cheers, >> =dml >> >> >> >> >>> -Original Message- >>> From: Jorn Zaefferer [mailto:[EMAIL PROTECTED] >>> Sent: 21 October 2008 06:33 >>> To: users@wicket.apache.org >>> Subject: Re: @MountPath with same path >>> >>> >>> How about mounting that to just "products" and displaying different >>> content based on the presence of the parameter? You abstract the >>> content of both pages into panels and show one or the other based on >>> the paramter. >>> >>> Jörn >>> >>> On Mon, Oct 20, 2008 at 6:15 PM, Cédric Thiébault >>> <[EMAIL PROTECTED]> wrote: >>> > Hi, >>> > >>> > I want to use REST url for my application using wicketstuff-annotation >>> > but it seems that I can't use the same path for 2 pages. >>> > For example : >>> > - /products for the list of products >>> > @MountPath(path = "products") >>> > public class ProductListPage extends Webpage >>> > >>> > - /products/5 for the detail of product with id=5. >>> > @MountPath(path = "products") >>> > @MountMixedParam(parameterNames = { "id" }) >>> > public class ProductDetailPage extends Webpage >>> > >>> > It throws an "WicketRuntimeException: its is already mounted for >>> > BookmarkablePageEncoder" on start up. >>> > I tried to use the patch described in >>> > https://issues.apache.org/jira/browse/WICKET-1534 but it goes to first >>> > page with this path (ie /products displays the product detail page for >>> > id=null). >>> > >>> > I also tried: >>> > - /products for the list of products >>> > @MountPath(path = "products") >>> > public class ProductListPage extends Webpage >>> > >>> > - /products/detail/5 for the detail of product with id=5. >>> > @MountPath(path = "products/detail") >>> > @MountMixedParam(parameterNames = { "id" }) >>> > public class ProductDetailPage extends Webpage >>> > >>> > but /products/detail/5 displays the list page because the list page >>> > path is a subset of the detail page path. >>> > >>> > Dis someone used this kind of urls with Wicket ? >>> > >>> > - >>> > To unsubscribe, e-mail: [EMAIL PROTECTED] >>> > For additional commands, e-mail: [EMAIL PROTECTED] >>> > >>> > >>> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: @MountPath with same path
> Jörn Yes I could do something like that but I don't really like the idea of a unique page that dispatch to panels depending on parameters... > David It throws the same exception with @MountIndexedHybrid: org.apache.wicket.WicketRuntimeException: products is already mounted for HybridUrlCodingStrategy I tried to do it without annotations and I have exactly the same problems (hopefully): mountBookmarkablePage("products", ProductListPage.class); mount(new IndexedHybridUrlCodingStrategy("products", ProductDetailPage.class)); Cedric On Mon, Oct 20, 2008 at 5:46 PM, David Leangen <[EMAIL PROTECTED]> wrote: > > You can use IndexedHybridUrlCodingStrategy (or something like that... > currently writing from [my poor] memory). > > > Cheers, > =dml > > > > >> -Original Message- >> From: Jorn Zaefferer [mailto:[EMAIL PROTECTED] >> Sent: 21 October 2008 06:33 >> To: users@wicket.apache.org >> Subject: Re: @MountPath with same path >> >> >> How about mounting that to just "products" and displaying different >> content based on the presence of the parameter? You abstract the >> content of both pages into panels and show one or the other based on >> the paramter. >> >> Jörn >> >> On Mon, Oct 20, 2008 at 6:15 PM, Cédric Thiébault >> <[EMAIL PROTECTED]> wrote: >> > Hi, >> > >> > I want to use REST url for my application using wicketstuff-annotation >> > but it seems that I can't use the same path for 2 pages. >> > For example : >> > - /products for the list of products >> > @MountPath(path = "products") >> > public class ProductListPage extends Webpage >> > >> > - /products/5 for the detail of product with id=5. >> > @MountPath(path = "products") >> > @MountMixedParam(parameterNames = { "id" }) >> > public class ProductDetailPage extends Webpage >> > >> > It throws an "WicketRuntimeException: its is already mounted for >> > BookmarkablePageEncoder" on start up. >> > I tried to use the patch described in >> > https://issues.apache.org/jira/browse/WICKET-1534 but it goes to first >> > page with this path (ie /products displays the product detail page for >> > id=null). >> > >> > I also tried: >> > - /products for the list of products >> > @MountPath(path = "products") >> > public class ProductListPage extends Webpage >> > >> > - /products/detail/5 for the detail of product with id=5. >> > @MountPath(path = "products/detail") >> > @MountMixedParam(parameterNames = { "id" }) >> > public class ProductDetailPage extends Webpage >> > >> > but /products/detail/5 displays the list page because the list page >> > path is a subset of the detail page path. >> > >> > Dis someone used this kind of urls with Wicket ? >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax validating individual form fields
Hi fatefree, Check this blog post: http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket I think this achieves what you want. Regards, Daan On 21 okt 2008, at 15:28, fatefree wrote: I have been trying to fulfill a requirement of a form, where each field is validated one at a time after losing focus, and the entire form is validated when a user clicks submit. I can see that there are pieces of what I want to do thats possible, but I haven't been able to put them all together. What I have tried is using the AjaxFormValidatingBehavior.addToAllFormComponents(form, "onblur"), but as you probably know this causes the entire form to be validated on the onblur which is both confusing to a user who hasnt been able to put all values in, and also seems to be excessive load as id rather the rest of the form be ignored. Then I looked into nested forms with the hope that I could add the same behavior to a nested form, and then a user could submit a parent form which would submit its child forms. While i thought this could be a solution, it seems that when an inner form is submitted through the onblur behavior above, the parent form is submitted and validated as well so I have the same problem as I do in the first case. Keep in mind I have no button to submit an individual field (so i cant call setdefaultformprocessing). So finally I thought about making every field its own form without being nested, in which case I know the validating behavior will work for every form individually. The only problem (besides having a form for every input, but thats manageable) is that I don't know how to use a button outside of these forms, and force it to submit every form and proceed only if they are all valid. I tried using an AjaxLink and calling process on every form i have a reference to, but that seems to return true every time without any validation. Has anyone had a similar requirement or accomplished what I am trying to do? I would be very appreciative of any example or ideas or direction i should look into to accomplish this. Thanks in advance -- View this message in context: http://www.nabble.com/Ajax-validating-individual-form-fields-tp20090299p20090299.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ajax validating individual form fields
I have been trying to fulfill a requirement of a form, where each field is validated one at a time after losing focus, and the entire form is validated when a user clicks submit. I can see that there are pieces of what I want to do thats possible, but I haven't been able to put them all together. What I have tried is using the AjaxFormValidatingBehavior.addToAllFormComponents(form, "onblur"), but as you probably know this causes the entire form to be validated on the onblur which is both confusing to a user who hasnt been able to put all values in, and also seems to be excessive load as id rather the rest of the form be ignored. Then I looked into nested forms with the hope that I could add the same behavior to a nested form, and then a user could submit a parent form which would submit its child forms. While i thought this could be a solution, it seems that when an inner form is submitted through the onblur behavior above, the parent form is submitted and validated as well so I have the same problem as I do in the first case. Keep in mind I have no button to submit an individual field (so i cant call setdefaultformprocessing). So finally I thought about making every field its own form without being nested, in which case I know the validating behavior will work for every form individually. The only problem (besides having a form for every input, but thats manageable) is that I don't know how to use a button outside of these forms, and force it to submit every form and proceed only if they are all valid. I tried using an AjaxLink and calling process on every form i have a reference to, but that seems to return true every time without any validation. Has anyone had a similar requirement or accomplished what I am trying to do? I would be very appreciative of any example or ideas or direction i should look into to accomplish this. Thanks in advance -- View this message in context: http://www.nabble.com/Ajax-validating-individual-form-fields-tp20090299p20090299.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javascript error in internet explorer
My IE version is 6.0.2900.2180.xpxp_sp2_gdr.050301-1519 In wicket-ajax.js, I replaced t.setRequestHeader("Wicket-FocusedElementId", Wicket.Focus.lastFocusId || ""); with if (Wicket.Focus && Wicket.Focus.lastFocusId) { t.setRequestHeader("Wicket-FocusedElementId", Wicket.Focus.lastFocusId || ""); } else { // t.setRequestHeader("Wicket-FocusedElementId", ""); } in both doGet and doPost methods. And now it works. - http://ntsrikanth.blogspot.com/ -- View this message in context: http://www.nabble.com/javascript-error-in-internet-explorer-tp16732896p20090230.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session destruction due to timeout...
I passed the application key and it worked. Thanks a lot for the help. Johan Compagner wrote: > > no you cant and Application.get() will never work then because the auto > destruct of a container > doesnt do that in a request ofcourse but just somewhere on some thread. > > if you need an application object you could try: > > Application.get(String applicationKey) > > The session object is gone so you cant access it anymore. > > On Wed, Oct 15, 2008 at 10:40 AM, Mendeleev <[EMAIL PROTECTED]> wrote: > >> >> I need to add functionality to my Wicket application that allows me to >> record >> in the MySQL database the exact time a user logs out of the application. >> This includes recording the time the session is destroyed by the web >> container due to user inactivity. >> >> I tried: >> 1. An implementation of HttpSessionListener >> 2. Extending the HttpSessionStore class >> 3. WebApplication.sessionDestroyed(String sessionid) >> 4. An implementation of HttpSessionBindingListener >> >> All of these do not work in my case, because the methods are called AFTER >> the session is already destroyed. At that time, the hibernate session >> that >> connects to the database, does not exist anymore. I cannot reopen it, >> because the Application.get() method returns null at this time. >> >> My question is: is there any way that I can record the destruction right >> before it happens? Is there some sort of a listener I can implement? >> >> If not, how is the wicket application notified that the user navigates >> away >> from the page, starting a period of inactivity? If there is a way I can >> register that happening, I can solve the problem by adding a timer. >> >> Thanks, >> Drago >> -- >> View this message in context: >> http://www.nabble.com/Session-destruction-due-to-timeout...-tp19989230p19989230.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Session-destruction-due-to-timeout...-tp19989230p20088819.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inmethod / grid website?
Hi, I'm sorry about it, been a bit busy lately. The grid is in Wicket Stuff SVN. It's likely that it will get to Wicket 1.5 extension. I wanted to put info on wicketstuff wiki (where it imho belongs) but Wicket stuff firewall is blocking me. If anyone could do that for me it would be nice. -Matej On Tue, Oct 21, 2008 at 1:33 PM, Erik van Oosten <[EMAIL PROTECTED]> wrote: > We should really have a FAQ here. > > Anyways: you can find the inmethod stuff in wicket-stuff now. There is no > official release so you'll have to compile the sources yourself or grab a > recent jar from wicket-stuff's bamboo server. > > Regards, > Erik. > > > Martin Voigt wrote: >> >> Hi, >> >> this may be the wrong place to ask, but anyways. What happened to the >> inmethod/ grid web site? >> >> http://www.inmethod.com/ >> >> is showing the tomcat welcome page for some time now. Did it move? >> >> Regards, >> Martin >> >> >> > > > -- > Erik van Oosten > http://www.day-to-day-stuff.blogspot.com/ > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inmethod / grid website?
We should really have a FAQ here. Anyways: you can find the inmethod stuff in wicket-stuff now. There is no official release so you'll have to compile the sources yourself or grab a recent jar from wicket-stuff's bamboo server. Regards, Erik. Martin Voigt wrote: Hi, this may be the wrong place to ask, but anyways. What happened to the inmethod/ grid web site? http://www.inmethod.com/ is showing the tomcat welcome page for some time now. Did it move? Regards, Martin -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inmethod / grid website?
I second that, please get the site fixed! Jörn On Tue, Oct 21, 2008 at 12:27 PM, Martin Voigt <[EMAIL PROTECTED]> wrote: > Yea, was just that it's Matej who did the grid stuff (at least to my > knowledge), so I thought it would make sense to ask it here, as I'm > sure I'm not the only one using grid ;) > > Regards, > Martin > > 2008/10/21 Robby O'Connor <[EMAIL PROTECTED]>: >> They may have screwed up their context descriptor or perhaps just didn't >> deploy it? >> >> Best bet would be email their tech contect (see domain name whois for info.) >> --rob >> >> >> Martin Voigt wrote: >>> >>> Hi, >>> >>> this may be the wrong place to ask, but anyways. What happened to the >>> inmethod/ grid web site? >>> >>> http://www.inmethod.com/ >>> >>> is showing the tomcat welcome page for some time now. Did it move? >>> >>> Regards, >>> Martin >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Salve and Guice
I haven't used Salve with Wicket, but I've been using the wicket-guice integration quite extensively. The reason I'm answering this is that I feel that many of the use cases of Salve can be solved with pure vanilla Guice. In cases where you can't control the instantiation of objects, you can use static injection, which is a bit dirty, but IMO cleaner than instrumentation. :) So this post is maybe a tiny bit off topic. :) The way I've been doing it is by using the guice-servlet package which allows you to extend a GuiceServletContextListener to create a Injector. To tell your servlet container about this, put something similar into your web.xml: dk.dtu.kiosk.guice.MyGuiceServletContextListener Then I use the wicket-guice integration for hooking the two together. To bootstrap Wicket with Guice you simply use the following in your web.xml myApplication org.apache.wicket.protocol.http.WicketFilter applicationFactoryClassName org.apache.wicket.guice.GuiceWebApplicationFactory injectorContextAttribute com.google.inject.Injector Voila! Now you can use the @Inject annotation in any Wicket component. You also have the option of using Providers if you need something dep. injected or in the difficult cases static injection. regards, Guðmundur Bjarni -- View this message in context: http://www.nabble.com/Salve-and-Guice-tp20087649p20088079.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Salve and Guice
Hi Edgar, did you use either static weaving or the runtime agent as described at http://code.google.com/p/salve/wiki/ConfiguringInstrumentation ? Kristof On Tue, Oct 21, 2008 at 11:42 AM, Edgar Merino <[EMAIL PROTECTED]> wrote: > I've been searching for information on how to use guice to lookup > dependencies with salve, the wiki only mentions how to add the guice locator > but I believe that is not working (at least not by it self). I've got a > class in a wicket application that is not a component, but I need a service > injected, so I'm using salve for this, instead of using @Inject to inject > the service I use @Dependency, but I'm getting nullpointerexceptions, any > hint? > > Thank you, > Edgar Merino > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inmethod / grid website?
Yea, was just that it's Matej who did the grid stuff (at least to my knowledge), so I thought it would make sense to ask it here, as I'm sure I'm not the only one using grid ;) Regards, Martin 2008/10/21 Robby O'Connor <[EMAIL PROTECTED]>: > They may have screwed up their context descriptor or perhaps just didn't > deploy it? > > Best bet would be email their tech contect (see domain name whois for info.) > --rob > > > Martin Voigt wrote: >> >> Hi, >> >> this may be the wrong place to ask, but anyways. What happened to the >> inmethod/ grid web site? >> >> http://www.inmethod.com/ >> >> is showing the tomcat welcome page for some time now. Did it move? >> >> Regards, >> Martin >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Salve and Guice
I've been searching for information on how to use guice to lookup dependencies with salve, the wiki only mentions how to add the guice locator but I believe that is not working (at least not by it self). I've got a class in a wicket application that is not a component, but I need a service injected, so I'm using salve for this, instead of using @Inject to inject the service I use @Dependency, but I'm getting nullpointerexceptions, any hint? Thank you, Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to get bookmarkable-page-url in FeedResource
I'm using with in my Application subclass to mount the feed as implemented by MyFeedResource: getSharedResources().add("my-feed", new MyFeedResource()); mountSharedResource("/games/atom", new ResourceReference("my-feed").getSharedResourceKey()); And on my base page: add(FeedResource.autodiscoveryLink(new ResourceReference("games-feed"))); Jörn On Tue, Oct 21, 2008 at 12:04 PM, Oliver Mahnke <[EMAIL PROTECTED]> wrote: > Hi, > > i am trying to show links to bookmarkable pages in a news feed using > FeedResource from wicketstuff-rome. > > I can't get it to work because i don't know the urls. I tried to use > BookmarkablePageLink, but this fails > in the FeedResource because the link is not attached to any page. > > Thanks for any advice! > > Oliver > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Threading problem
Thank you very much for this explanation, Igor. Very much appreciated. - Kaspar On 16.10.2008, at 18:14, Igor Vaynberg wrote: requests from a single session are serialized. but what if your page is stateless and you click the two links fast? each click spins off a request that now needs a session and because they run concurrently two sessions are created because this is the first request that needs a session. try doing this in your page's constructor: Session.get().bind(); this will force wicket to create a http session when the page renders and will avoid this kind of problem. -igor On Thu, Oct 16, 2008 at 9:02 AM, Kaspar Fischer <[EMAIL PROTECTED]>wrote: I run into a concurrency issue: My pages load fine when I visit them slowly, one after the other with a pause between clicks. However, if I click on two links on my page very, very fast, an exception gets thrown. My session factory outputs the number of the thread and the hash code of the session created (in chronological order): [89213] New [EMAIL PROTECTED] [11349856] New [EMAIL PROTECTED] And after that, thread 89213 throws an exception: Access in thread 89213 to data in session @43f1c from a different thread (11349856)! It seems that thread 89213 is accessing a session that was created *later*. How can something like this happen in Wicket when it handles requests (from a single session) sequentially? Any ideas? Thanks for any pointer, Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Returning XML to JS
have a look at XStream :-) Am 21.10.2008 um 11:25 schrieb [EMAIL PROTECTED]: Hi, What's the nice / correct way to do this in Wicket: I have a client side bit of JS that looks something like getData(URL); It expects to get back an XML document like foo bar On the wicket side, I want the Java object that spits back the XML to be part of a component. This parent component will have supplied the URL in question. Any ideas how I should do this? Thanks, Ambrose Wheatcroft Analyst / Programmer, JHC PLC +44 (0)20 7367 6500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inmethod / grid website?
They may have screwed up their context descriptor or perhaps just didn't deploy it? Best bet would be email their tech contect (see domain name whois for info.) --rob Martin Voigt wrote: Hi, this may be the wrong place to ask, but anyways. What happened to the inmethod/ grid web site? http://www.inmethod.com/ is showing the tomcat welcome page for some time now. Did it move? Regards, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to get bookmarkable-page-url in FeedResource
Hi, i am trying to show links to bookmarkable pages in a news feed using FeedResource from wicketstuff-rome. I can't get it to work because i don't know the urls. I tried to use BookmarkablePageLink, but this fails in the FeedResource because the link is not attached to any page. Thanks for any advice! Oliver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inmethod / grid website?
It kinda is. --rob Martin Voigt wrote: Hi, this may be the wrong place to ask, but anyways. What happened to the inmethod/ grid web site? http://www.inmethod.com/ is showing the tomcat welcome page for some time now. Did it move? Regards, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
inmethod / grid website?
Hi, this may be the wrong place to ask, but anyways. What happened to the inmethod/ grid web site? http://www.inmethod.com/ is showing the tomcat welcome page for some time now. Did it move? Regards, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setObject( ), getObject( )
we have also AbstractReadOnlyModel for that so igor are you sure you dont want to have Model final? :) On Mon, Oct 20, 2008 at 5:02 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > whenever there is something nonfinal people will always find a way to > misuse it. > > model methods are not final because it gives you a simple base class > to subclass instead of starting from scratch with an imodel. > > -igor > > On Mon, Oct 20, 2008 at 6:37 AM, Ricky <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Is there any reason getObject and setObject were not made final in Model > > class? the reason why i am asking is that there might be the case when > > people misuse this; for example (and i have seen this at my current > > workplace); > > > >Model xModel = new Model(new Long(1)) { > > > >@Override > >public Object getObject() { > >// return super.getObject(); <-- not calling this, instead > i > > return null > >return null; > >} > >}; > > > >// some lines afterwards ... i need this model ... i use it > > (expecting to get back object i set) > >// instead i get null. Original intent was to set object passed in > > and get the same thing ... > >System.out.println(xModel.getObject()); > > > > Here i get null as the result. > > > > Any suggestions? > > > > Regards > > Vyas, Anirudh > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Returning XML to JS
Hi, What's the nice / correct way to do this in Wicket: I have a client side bit of JS that looks something like getData(URL); It expects to get back an XML document like foo bar On the wicket side, I want the Java object that spits back the XML to be part of a component. This parent component will have supplied the URL in question. Any ideas how I should do this? Thanks, Ambrose Wheatcroft Analyst / Programmer, JHC PLC +44 (0)20 7367 6500
Re: tomcat 6
If you decide to go for Jetty, you should try the run-jetty-run[1] plugin that Eelco wrote. Basically if your project is set up right, i.e. web.xml in the right place and so on. You can run it like any other Java Application from Eclipse's run configurations. regards, Guðmundur Bjarni [1] http://code.google.com/p/run-jetty-run/ -- View this message in context: http://www.nabble.com/tomcat-6-tp20064539p20086138.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ContextImage not generating path relative to context root
I'm a bit confused about ContextImage; according to the javadocs the image path "will be prefixed such that the image is relative to the context root". In my markup I've got: Then I add the Context image to my WebPage: add(new ContextImage("logo", "images/logos/mylogo.gif")); ... and I end up with: My application is deployed with a context root of /myapp and this doesn't work, it will only work if the application is deployed with a context root of /. I've checked the source which ContextImage uses to get the context root and in org.apache.wicket.Request it says: /** * Gets a prefix to make this relative to the context root. * * For example, if your context root is http://server.com/myApp/ and the request is for * /myApp/mountedPage/, then the prefix returned might be "../../". * * For a particular technology, this might return either an absolute prefix or a relative one. * * @return Prefix relative to this request required to back up to context root. */ public abstract String getRelativePathPrefixToContextRoot(); To me this just seems plain wrong, here it clearly states that the context root is "http://server.com/myApp/"; but the example prefix of "../../" relative to "/myApp/mountedPage/" does not take you to the context root of /myApp/ but to /. This is very confusing as I've always considered the context root of a java web application to to be the path upon which it is deployed on the application server, whether that be /, /myApp or /apps/myApp and in the above case I do not end up with an image path relative to the context root. Without hard-coding the name of my context root in the image path (bad idea for portability) how can I reference static images stored in an images directory under the context root? Should I file this as a bug or am I missing something? Thanks Gianni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to get return value from javascript
You could use a wicket HiddenField and let your js function write his result to this field. At the next (ajax) request you are able to read the value from this field. Jaap -Original Message- From: Piller Sébastien [mailto:[EMAIL PROTECTED] Sent: dinsdag 21 oktober 2008 9:49 To: users@wicket.apache.org Subject: Re: How to get return value from javascript js is client side, and wicket is server side. to pass a value from js to wicket, you may do an ajax query. see wicketAjaxGet and AbstractDefaultAjaxBehavior freak182 a écrit : > Hello, > > My problem is how can i get the return value of a javascript function: e.g > > init.js > > funtion userExist(id) > { > > return true; > } > > how can i get the returned value "true" from wicket. > > Thanks a lot...Cheers > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTextField, format not valid, message key
It works, thanks :) dateTextField.IConverter.Date = The date is not valid custom message Serkan Camurcuoglu wrote: > > Wicket in Action book says that IConverter.Date should work.. > > *** > > -- View this message in context: http://www.nabble.com/DateTextField%2C-format-not-valid%2C-message-key-tp20069519p20085182.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get return value from javascript
js is client side, and wicket is server side. to pass a value from js to wicket, you may do an ajax query. see wicketAjaxGet and AbstractDefaultAjaxBehavior freak182 a écrit : Hello, My problem is how can i get the return value of a javascript function: e.g init.js funtion userExist(id) { return true; } how can i get the returned value "true" from wicket. Thanks a lot...Cheers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to redirect wicket pages using javascript
Thanks Michael ...i could hardly detect that...hehehe cheers.. Thanks... Michael Sparer wrote: > > looks like something's wrong in your service, check the random stuff at > com.ccti.digibanker.arcot.service.ArcotUserQAServiceImpl.get3QA(ArcotUserQAServiceImpl.java:72) > ;-) ... don't think it's anything related to the headercontributor > > > freak182 wrote: >> >> Hello, >> >> I have a project which uses mostly javascript because it is a client base >> part. My problem is when i cannot redirect wicket pages in javascript. I >> already try this in behavior: >> >> . >> init.js >> >> function clientReady() { >> >> location.href = '${url}'; >> >> } >> >> in behavior... >> >> final Map params = >> >> map.put("url" , RequestCycle.get().urlFor(new TestPage()); >> >> component.add(TextTemplateHeaderContributor.forJavaScript(InitBehavior.class, >> "init.js", params)); >> super.bind(component); >> >> i get an error: >> Caused by: java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> at >> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) >> at >> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) >> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) >> at >> org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:149) >> ... 29 more >> Caused by: java.lang.IllegalArgumentException: Upper bound for nextInt >> must be positive >> at org.apache.commons.lang.math.JVMRandom.nextInt(JVMRandom.java:104) >> at org.apache.commons.lang.math.RandomUtils.nextInt(RandomUtils.java:88) >> at org.apache.commons.lang.math.RandomUtils.nextInt(RandomUtils.java:74) >> at >> com.ccti.digibanker.arcot.service.ArcotUserQAServiceImpl.get3QA(ArcotUserQAServiceImpl.java:72) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) >> at >> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) >> at >> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) >> at >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) >> at >> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) >> at $Proxy20.get3QA(Unknown Source) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) >> at org.apache.wicket.proxy.$Proxy23.get3QA(Unknown Source) >> at >> com.ccti.digibanker.arcot.process.ArcotNoIdPage.(ArcotNoIdPage.java:49) >> ... 34 more >> >> any idea...Thanks a lot...Cheers. >> > > -- View this message in context: http://www.nabble.com/how-to-redirect-wicket-pages-using-javascript-tp20083835p20084989.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get return value from javascript
Hello, My problem is how can i get the return value of a javascript function: e.g init.js funtion userExist(id) { return true; } how can i get the returned value "true" from wicket. Thanks a lot...Cheers -- View this message in context: http://www.nabble.com/How-to-get-return-value-from-javascript-tp20084787p20084787.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]