Re: Serialization and Form Models
RaBe wrote: > > I found Igors post on smart entity models very helpful on that matter: > > http://wicketinaction.com/2008/09/building-a-smart-entitymodel/ > > basically, it attaches/detaches only if an Id is set (hence, it can be > fetched > from the backend) > I had read that blog entry several times before but the significance of that last part hadn't stuck with me. I adapted my entity model (using Neo4J not Hibernate) and it looks like a good solution. Thanks for the pointer! -- View this message in context: http://old.nabble.com/Serialization-and-Form-Models-tp27738959p27751745.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: Pre-built wicket sample app for a starter to copy?
David Brown-48 wrote: > > Hello, please excuse if the wicket-security project is readily visible. > Otherwise, reply with the link. Much appreciated. Regards, David. > Google is your friend :) http://lmgtfy.com/?q=wicket+security -- View this message in context: http://www.nabble.com/Pre-built-wicket-sample-app-for-a-starter-to-copy--tp23487461p23534408.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: Pre-built wicket sample app for a starter to copy?
Maarten Bosteels wrote: > > Are you sure you want to mix Wicket with DisplayTag ? > I am not saying it's impossible, but when starting a Wicket project from > scratch, I wouldn't add a JSP tag library to the mix. > Truth. You should really reconsider throwing DisplayTag into this. Without going into paragraphs ans paragraphs of explanatory detail, Wicket just doesn't work like that. I'm not saying it couldn't be done if you were enough of a masochist, but the real question would be why? While not nearly as bad in terms of integration, you may want to rethink Acegi as well. Perhaps it has changed since the last project I used it on, but at the time I hated it. Wicket has some nice hooks for adding your own authorization/authentication schemes and there's a wicket-security project if you want a pre-built infrastructure. -Matt -- View this message in context: http://www.nabble.com/Pre-built-wicket-sample-app-for-a-starter-to-copy--tp23487461p23510113.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: Automatically adding a parameter to every link?
igor.vaynberg wrote: > > you can provide your own subclass of webresponse and override > encodeurl the same way. see WebApplication#newWebResponse > > -igor > Thanks. That's exactly the kind of thing I was looking for. I'll look into it. -Matt -- View this message in context: http://www.nabble.com/Automatically-adding-a-parameter-to-every-link--tp2338p23380118.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: Automatically adding a parameter to every link?
I'm not worried about the multiple window thing. FWIW I believe that value is set to true by default anyway. I'm just wondering if there's a way to add a parameter to each link on page to ensure that the next page stays in the same context. For instance, when I was trying to solve an unrelated problem, the servlet filter I was working with tied itself directly into the response.encodeUrl() method so that each call to that method would also use the filter's specific instructions as well. I was hoping that there might be something similar for links in Wicket where every link, no matter how it's generated (except manually in HTML, of course) would be handled by a particular method that I could put a hook into to make sure my context specific request parameter got added. -Matt Martin Funk-3 wrote: > > maybe automatic multi window support might help you > > this can be turned on like this in the init method of your Application. > > /** >* @see org.apache.wicket.protocol.http.WebApplication#init() >*/ > @Override > protected void init() > { > super.init(); > getPageSettings().setAutomaticMultiWindowSupport(true); > } > > mf > > Am 03.05.2009 um 15:00 schrieb Matthew Welch: > >> The data in the application that I'm working on is divided in any >> number of >> different contexts. The pages displayed for each context are the >> same but >> the data shown on those pages will be different depending on the >> specific >> context. A logged in user might might have multiple pages (browser >> windows) >> open at one time from any one of these contexts, otherwise I would >> store the >> context in their session. As it stands I need to pass the context >> around >> from page to page as a parameter. Is there an easy way to have this >> parameter automatically appended to all links on page as they are >> rendered >> or generated? >> >> I suppose I could build my own set of Link components that look for >> the >> existing context of a page and append that to themselves, and use >> those >> links instead of the built in ones. Any other options? >> >> -Matt > > > -- View this message in context: http://www.nabble.com/Automatically-adding-a-parameter-to-every-link--tp2338p23376936.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: Tools for Managing a Wicket Project
Tools that our team is using (after some trial and error): IDE - Eclipse/IDEA Source Control - SVN Build - Maven Local Network Maven Repo - Nexus (after a year trying different ones) Build Server - TeamCity, which absolutely rocks (We actually purchased and used Bamboo for 9 months. I can't believe it comes from the same company as JIRA. Bamboo was terrible.) Story Mgmt/Defects - Rally (hosted commercial app for agile projects; not bad, but not fantastic either) Code Review - Code Collaborator (again not bad and I'd rather have it than nothing at all, but could be better) Our QA team has used various testing tools from expensive commercial tools like Mercury (now HP) Quality Center to Selenium. They use Rally for defect management. My highest recommendations are for TeamCity, Nexus, and SVN. -Matt -- View this message in context: http://www.nabble.com/Tools-for-Managing-a-Wicket-Project-tp23299396p23334970.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: AjaxLink causing a redirect
Jeremy Thomerson-5 wrote: > > Bummer - if you didn't throw in the towel, I'd be interested in seeing > the result. All session-relative wicket links are going to have a > very distinct pattern that should be fairly easy [sic] to get in the > pattern and not rewrite. > > Mind posting your rewrite code and maybe somebody can help with the > regex? I may not be able to help, but I have put together some pretty > hideous regex in my time. > Here's the link to the quickstart: http://www.nabble.com/file/p23208312/myproject.zip myproject.zip Some notes: 1) This won't work as written in Jetty. Jetty uses an unmodifiable map for request parameters so to make it work in Jetty, one would need to change the rewrite rule to set a request attribute instead of a request parameter. 2) I had to include the jar for the 3.2.0 version of the URL Rewrite filter as it isn't in the central Maven repo yet. 3) Instead of launching to the start page of the app I would recommend going straight to "http://localhost:8080/whateveryouwant/testpage1";. Replace "whateveryouwant" with anything. That's the value that will be rewritten out of the URL and set as a request parameter with the name "organization". 4) I'm using the HybridUrlCodingStrategy for URLs. You should be able to use any URL coding stratgy, but since this is what I'm using in my main app, it's what I've configured the rule for. -Matt -- View this message in context: http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23208312.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: AjaxLink causing a redirect
Liam Clarke-Hutchinson-3 wrote: > > What do you mean by processing? Form processing? Normal rendering? > Normal rendering, but as I mentioned later in the thread, even though it was Wicket issuing the redirect, it was somehow being caused by my attempts at URL rewriting and the redirects do not occur if the URL manipulation is disabled. -- View this message in context: http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23196451.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: AjaxLink causing a redirect
Jeremy Thomerson-5 wrote: > > Bummer - if you didn't throw in the towel, I'd be interested in seeing > the result. All session-relative wicket links are going to have a > very distinct pattern that should be fairly easy [sic] to get in the > pattern and not rewrite. > > Mind posting your rewrite code and maybe somebody can help with the > regex? I may not be able to help, but I have put together some pretty > hideous regex in my time. > Sure. When I get home today I'll attach or host a quickstart with my results so far. -Matt -- View this message in context: http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23196413.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: AjaxLink causing a redirect
Hmmm perhaps it was a byproduct of the URL rewriting. As it turns out, even with normal PageLinks this redirect occurs. BookmarkablePageLinks do not cause the redirect. What's odd is that the redirect doesn't actually change anything. With the URL rewriting disabled, there are no redirects. Anyway it's no big deal. I think I'm going to have to give up on this URL rewriting stuff anyway. I was trying out URL Rewrite Filter (http://tuckey.org/urlrewrite/) and I was getting pretty close to what I needed (see my original thread on this topic: http://www.nabble.com/Custom-URL-Handling-to23130367.html which you actually responded too. You're a busy fellow!). It rewrites both incoming and outgoing URLs. The incoming rewrites are fairly obvious, but the outbound ones are done by embedding itself as part of the response.encodeURL() call. I managed to get the incoming URL rewrites working perfectly but some of the outbound URLs refuse to cooperate. Things like Wicket ajax calls and these redirects were popping up as obstacles. Maybe if I were a little more of a regex expert I could get this to work, but I'm close to throwing in the towel at this point. -Matt Jeremy Thomerson-5 wrote: > > Do you mean while loading a page that has an ajax link you are > redirected to another? Please provide example (URLs and code). > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > > On Wed, Apr 22, 2009 at 9:25 PM, Matthew Welch > wrote: >> I've been playing around with URL rewriting a bit and have run across >> some >> promising techniques. While testing these techniques, I've been slowly >> loading up my pages with a number of different kinds of actions and >> links. >> Everything was working pretty smoothly until I got put my first AjaxLink >> on >> the page. For some reason, just the presence of an AjaxLink causes a >> redirect during the processing of the page. Remove the AjaxLink; no >> redirect. >> >> I'm not questioning the necessity of this as I'm sure there's a good >> reason. >> I am curious though. Why does this happen? >> >> Matt >> > > - > 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/AjaxLink-causing-a-redirect-tp23189186p23189693.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: Custom URL Handling
Jeremy Thomerson-5 wrote: > > In the past, I've accomplished something similar in a hack-ish sort of way > that may work for you. Basically, I extended the WicketFilter and > stripped > the first argument off, storing it in the request before Wicket used the > URL > to determine the requested page. Maybe you can go down a similar route? > Thanks. That's something to consider. How did you get wicket to write out the correct URL's for links though? -- View this message in context: http://www.nabble.com/Custom-URL-Handling-tp23130367p23145343.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: Custom URL Handling
David Leangen-8 wrote: > > What version are you using? > I'm using 1.4. It wouldn't have occurred to me that it would be so difficult. I know it may seem odd, but URL control is actually very important here because organization identity is vital in the domain that the app will serve. Hmmm Matt -- View this message in context: http://www.nabble.com/Custom-URL-Handling-tp23130367p23143850.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: Google App Engine and Wicket
Both articles avoid the DiskPageStore problem by using the HttpSessionStore, however if you do a search through the mailing list archives for HttpSessionStore you'll find numerous references to problems in using it in the long term and especially in a real, production application, so I don't think that's a good long term solution, so my original question still stands. Is there an alternative or is Wicket perhaps not well suited for use in the App Engine. Matt ptrthomas wrote: > > Here's another article about Wicket and GAE on DZone: > > http://www.dzone.com/links/rss/wicket_on_google_app_engine.html > > On Sat, Apr 11, 2009 at 8:22 AM, Sergey Podatelev < > brightnesslev...@gmail.com> wrote: > >> Here are a couple of pointers regarding Wicket on GAE: >> >> >> http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/ >> >> On Sat, Apr 11, 2009 at 6:15 PM, Matthew Welch >> wrote: >> > I've been experimenting a bit with Google App Engine and Wicket and >> things >> > seemed to work fairly well once I turned off the ModificationWatcher. >> > However, I realized that my simple tests were all stateless and that >> once >> > stateful, Wicket would use the DiskPageStore to write some files, which >> is >> > not allowed in the App Engine sandbox. Sure enough, once I added some >> > stateful pages, I started seeing exceptions related to the >> DiskPageStore. >> > >> > I'm a neophyte when it comes to the deep down Wicket internals so I'm >> not >> > sure what my other options might be. In a post Matej Knopp said, ""* >> > DiskPageStore*'s purpose is to store serialized pages on disk in order >> to >> > allow access to previous page versions and also to conserve session >> memory >> > usage." This leads me to believe that using the sassion for storing >> this >> > information isn't a preferred approach. What about the App Engine's >> > datastore (an abstration on BigTable)? That seems like it might be too >> slow >> > to adequately serve this need, but I'm not sure. A thread on >> > Wicket/Terracotta integration ended up with an alternative >> > "SecondLevelCacheSessionStore" but I'm not sure if that is only usable >> with >> > Terracotta or if it might might sense in other situations. Any other >> > options? >> > >> > Also, looking forward, with the knoledge that writing giles and >> spawning >> new >> > threads are not allowed in the App Engine sandbox, are there any other >> items >> > I should be onl the lookout for in Wicket that might make it a poor >> choice >> > for this situation? >> > >> > Matt >> > >> >> >> >> -- >> sp >> >> - >> 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/Google-App-Engine-and-Wicket-tp23001592p23007684.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: Turning off ModificationWatcher
Thanks. Matt Ryan Crumley wrote: > > Matt, > > Add this to your WebApplication.init() method: > > getResourceSettings().setResourcePollFrequency(null); > > Ryan > > On Wed, Apr 8, 2009 at 9:33 PM, Matthew Welch > wrote: >> I'm experimenting with Wicket inside Google's new Java support for its >> App >> Engine. My simple apps run fine if the configuration is set to >> DEPLOYMENT, >> however in development mode, I get an exception related to >> ModificationWatcher. Looking at the exception I think this >> ModificationWatcher is being used as part of a new thread which is a >> no-no >> inside the App Engine sandbox. Is there way way to just disbable this >> modification watcher without putting the entire app in deployment mode? >> There are a number of items I like about development mode but this one >> glitch is preventing me from using it. >> >> Matt >> > > - > 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/Turning-off-ModificationWatcher-tp22963478p22973975.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: Turning off ModificationWatcher
I have no intention of actually deploying it in development mode. I'm talking about the development sandbox provided by the Google App Engine Java SDK. Matt Martijn Dashorst wrote: > > Never *EVER* deploy your application in development mode. Use > deployment mode and turn those features you want on. > > Martijn > > On Thu, Apr 9, 2009 at 4:33 AM, Matthew Welch > wrote: >> I'm experimenting with Wicket inside Google's new Java support for its >> App >> Engine. My simple apps run fine if the configuration is set to >> DEPLOYMENT, >> however in development mode, I get an exception related to >> ModificationWatcher. Looking at the exception I think this >> ModificationWatcher is being used as part of a new thread which is a >> no-no >> inside the App Engine sandbox. Is there way way to just disbable this >> modification watcher without putting the entire app in deployment mode? >> There are a number of items I like about development mode but this one >> glitch is preventing me from using it. >> >> Matt >> > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > Apache Wicket 1.3.5 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. > > - > 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/Turning-off-ModificationWatcher-tp22963478p22973951.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: setResponsePage() and mounted URLs
jcompagner-2 wrote: > > what happens if you try this: > > add(new StatelessLink("statelessPage1" >> >> ) { >>public void onClick() { >>setResponsePage(StatelessPage1.class); > > RequestCycle.get().setRedirect(true) > >> >>} > While the link on the original page is still the long version, once it is clicked I do end up on page with the nicely mounted URL. Thanks! Are there any gotchas I need to look out for when using this approach? Matt -- View this message in context: http://www.nabble.com/setResponsePage%28%29-and-mounted-URLs-tp22890145p22901802.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: Trying to stay stateless but having some issues
Jeremy Thomerson-5 wrote: > > The continuation URL looks to only be stored if you arrived at the page by > a > call to PageMap#redirectToInterceptPage, which is called by > RestartResponseAtInterceptPage exception. It's also stored in the session > (or rather, the PageMap, which is stored in the session). So, yes, you > would need a session to store that info into. > > A suggestion might be to add the return URL to the sign in form as a > hidden > field, which you could redirect to in your onSubmit by throwing new > RedirectException(urlFromForm). That doesn't sound like the cleanest > solution. I'd have to think more to come up with something else. > Thank you for the reply. I guess I'm a little surprised to run into this as it seems like this would be a pretty common scenario for an application. I'm certain willing to consider any approach. If forced, I can probably live with the long, non-bookmarkable url after this login operation if I have to. -- View this message in context: http://www.nabble.com/Trying-to-stay-stateless-but-having-some-issues-tp22323101p22344092.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
Trying to stay stateless but having some issues
I'm trying to keep my app stateless wherever possible, especially on the pages that serve merely as an introduction to the app but have no heavy dynamic functionality. On many of these pages I have a sing-in panel. This sign-in panel contains a stateless username/password form. The onSubmit of the stateless form looks like this: @Override protected void onSubmit() { if (GVWebSession.get().authenticate(username, password)) { if (!continueToOriginalDestination()){ setResponsePage(getPage().getPageClass()); } } else { error(getLocalizer().getString("signin.failed", this)); } } This doesn't seem to work. The behavior I want pretty common. I want the same page displayed, but now with the user logged in and the sign-in form replaced with a "welcome " message or something like that. What actually occurs is (from the users' point of view) nothing. The page is redisplayed and the form comes back up. I can debug the form submission and I see that the users is being properly authenticated. I assume I'm doing something wrong with my setResponsePage() call. If I comment out that setResponsPage() call, the login works and the page is displayed correctly but I then have a long, ugly URL. I happen to go to a non-stateless page and a session is created, and then come back to a stateless page, this login procedure works correctly, so I assume that my problem has something to do with their not being a session created yet. That seems odd though, because one wouldn't think my situation would be that unusual. Any suggestions? -- View this message in context: http://www.nabble.com/Trying-to-stay-stateless-but-having-some-issues-tp22323101p22323101.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: LDM with Generics for DropDownChoice
Martijn Dashorst wrote: > >> Just to make sure I'm understanding this; yuo're saying I have to create >> a >> variable and then assign the variable instead of just being able to pass >> "new AllUsersModel()" to the DropDownChoice constructor? > > Nope, just change your model supertype from List to List Foo> > >> That just seems odd. > > Welcome to Java generics... > Thanks. It's working now. private class AllUsersModel extends LoadableDetachableModel>{ protected List load() { return userService.findAllUsers(); } } -- View this message in context: http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22164005.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: LDM with Generics for DropDownChoice
Just to make sure I'm understanding this; yuo're saying I have to create a variable and then assign the variable instead of just being able to pass "new AllUsersModel()" to the DropDownChoice constructor? That just seems odd. Jeremy Thomerson-5 wrote: > > IIRC, DropDownChoice requires a declaration like such: > > IModel> > > So, this should work: > > IModel> choices = new AllUserModel(); > > I've been meaning to ask on the dev list why that is. Being forced to > declare the "? extends User" for a model like yours seems to add > complexity, > and force a local variable. I haven't looked at it that much, but I know > that every time I've had to declare one, I always think "that's weird". > > On Sun, Feb 22, 2009 at 10:55 PM, Matt Welch wrote: > >> >> I'm sure I should know this but I can't seem to get it right. I have a >> LoadableDetachableModel as follows: >> >> >>private class AllUserModel extends >> LoadableDetachableModel>{ >>protected List load() { >>return userService().findAllUsers(); >>} >>} >> >> >> I'm trying to use this as the Choices model in a DropDownChoice, but no >> luck. I'm sure I'm missing an or a or a somewhere but I at a >> lost >> as to what the exact problem is. I've been a consumer of generics >> forever, >> but actually being on the creation side is a bit new to me. >> >> -- >> View this message in context: >> http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22155211.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 >> >> > > > -- > Jeremy Thomerson > http://www.wickettraining.com > > -- View this message in context: http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22161940.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
LDM with Generics for DropDownChoice
I'm sure I should know this but I can't seem to get it right. I have a LoadableDetachableModel as follows: private class AllUserModel extends LoadableDetachableModel>{ protected List load() { return userService().findAllUsers(); } } I'm trying to use this as the Choices model in a DropDownChoice, but no luck. I'm sure I'm missing an or a or a somewhere but I at a lost as to what the exact problem is. I've been a consumer of generics forever, but actually being on the creation side is a bit new to me. -- View this message in context: http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22155211.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: form - ajax submit and validation
I think more information is needed before someone can provide a useful response: Are you initializing the AjaxButton with the form (in the the constructor of the AjaxButton or with setter)? Is the form data being submitted? If not, this would indicate a problem somewhere other than in the validation itself. Can you show your actual code? Vitek.Tajzich wrote: > > Hi guys, > > I have form and AjaxButton as submit button for the form. If I use non > ajax > button validation is called and input fields are validated. But If I use > AjaxButton then validation are passedWhat should I do to get form > validated even If I use ajax button? > > thank you, > > Vitek > > -- View this message in context: http://www.nabble.com/form---ajax-submit-and-validation-tp22102523p22104799.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Making an invisible panel visible via AjaxLink
The key, as others have alluded to and you discovered yourself, is that setting a component's visibility to false will cause that component to not be rendered. I know in the back of some people minds (mine included) we think "invisible means it's there, we just can't see it). Well, in this case invisible means it's not rendered at all. This is all just semantics until you try to change that visibility on the client side (i.e. AJAX). Since it's not there to being with, you can't really do client side modifications of it. So, as Michael pointed out, you can instead put what you want to make invisible inside a container and then use the Ajax functionality to update that container and not the invisible item itself. The container will be re-rendered and now that the internal item is set to "visible" it will be rendered right along with its parent container. Matt -- Michael Sparer wrote: > > put the panel in an additional container and add this container > > WebmarkupContainer div = new WebmarkupContainer("cont"); > div.setOutputMarkupId(true); > div.add(registeredUserPanel.setVisible(false)); > > then in the onclick stuff > registeredUserPanel.setVisible(true); > target.addComponent(div); > > that should do the trick > > hth, > michael > > > rjilani wrote: >> >> Hi: Gurus I am trying to make an invisible panel visible via Ajax link, >> but got stuck at a point where I don't know how to proceed further. >> Please see the code snipet below >> >> final RegisteredUserPanel registeredUserPanel = new >> RegisteredUserPanel("registrationPanel"); >> >> add(registeredUserPanel); >> registeredUserPanel.setOutputMarkupId(true); >> registeredUserPanel.setVisible(false); >> >> add(new AjaxLink("registerLink") { >> >> @Override >> public void onClick(AjaxRequestTarget target) { >> registeredUserPanel.setVisible(true); >> target.addComponent(registeredUserPanel); >> } >> }); >> >> the problem is that when I call registeredUserPanel.setVisible(false), >> becuase by defualt I don't want this pannel to be visible; the wicket >> don't render the html markup for the pannel at all and hence the ajax >> calls fails becuase it don't find the markup to render the panel. Any >> suggestions how to tackle a situation like this. >> >> Regards, >> RJ >> > > -- View this message in context: http://www.nabble.com/Making-an-invisible-panel-visible-via-AjaxLink-tp22103906p22104664.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
Some SignInPanel Questions
I don't know if these are actually SignInPanel (from wicket-auth-roles) questions or if they're in fact more general "wicket" questions; probably the latter, but the SignInPanel class is where I noticed these things. 1) In the SignInPanel I notice that instead of having a couple of private String variables to represent the username and password, a ValueMap is used instead. I'm curious as to why. Is there some benefit to using a ValueMap? 2) When the values that are typed in the username and password fields are needed to pass to the signIn() method, they are retrieved in ways that I would not have normally considered. The username value is retrieved with the getDefaultModelObjectAsString() method of the username's TextField component and the password is retrieved with the getInput() method of the password's PasswordTextField component. Why are the values retrieved this way? I assume there's a good reason, but because I don't understand it, I'm a bit unsure as to where in my own application I should be using the same techniques. My first instinct for a panel like this would have been to add two String variables to the class to act as the model for the username and password TextFields and then to access those values with normal getter methods. I'd would find it quite instructive to know why these other approaches were used instead so that I can take similar actions in my own application. Thanks! I'll include some snippets from the SignInPanel class below so that it doesn't have to be looked up: - private final ValueMap properties = new ValueMap(); - add(username = new TextField("username", new PropertyModel(properties, "username"))); add(password = new PasswordTextField("password", new PropertyModel(properties, "password"))); - public String getPassword() { return password.getInput(); } - public String getUsername() { return username.getDefaultModelObjectAsString(); } - -- View this message in context: http://www.nabble.com/Some-SignInPanel-Questions-tp22094376p22094376.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: AjaxSubmitLink submitting twice
I finally did find the root of this problem and wanted to report back to other Wicket users in case they ever had a similar issue and found this thread in a search. It turns out that the problem is somehow related to the Firebug add-on for Firefox. Doing some searching, I can see that Firebug has had similar issue in the past, however they are supposed all fixed, but the issue was definitely related, at least in some way, to Firebug. Firebug has a feature that allows you put logging statements into your javascript code with console.log() statements. If that feature was turned on (i.e. the "Console" option was checked in the "Net" tab of Firebug) then I would get the behavior I described. Turned off? Everything was fine. I was using Firebug 1.3.2 with Firefox 3.0. For some reason Firefox had never prompted me for an update as it had on my other computers. When I updated to Firefox 3.0.6 I could not longer reproduce the issue. The moral, I guess, is to keep your browser up-to-date. Matt Matt Welch wrote: > > The Nabble posting process correctly escaped all of the HTML tags except > the which it rendered as HTML. I only just now figured out I needed to > use a "raw" tag. The raw HTML is below. > > As expected though, this same code works fine in a quickstart. I never > suspected that it was a bug, which is why I didn't post a JIRA issue. I > knew something this simple wouldn't have been missed. It's clearly a > problem with our configuration, but I don't know where to start looking. > > Using this simple test page, the final rendered page contains no extra > javascript beyond the wicket stuff to support the button submission which > I know works. This test page isn't going through our security framework > because I extended WebPage instead of our application's SecureWebPage > (using wicket-security). That leaves servlet filters (Spring's > OpenSessionInView and the normal WicketFilter), our session implementation > or the WebApplication itself. > > Does anyone have any suggestions about where I might plop down a > breakpoint in an attempt to debug this issue? > > -Matt > > >PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> > > > > # Search > > > > > -- View this message in context: http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p22087057.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: WicketForge 0.5.0 Available for IDEA 8
Perhaps I'm missing it, but I can't seem to get the intentions to work. So if I have: public class MyPage extends WebPage { } and the cursor is somewhere on "MyPage" I should be able to activate these intentions? The only intentions I'm seeing now are the built in Idea ones. Everything else, though, is working beautifully. No more exceptions when idea loads and having a shortcut key to toggle between the components and HTML and back is awesome. -Matt Nick Heudecker wrote: > > I've published WicketForge 0.5.1 to the IDEA plugins site. > >- Toggling between HTML and Java is fixed. Let me know if you're still >having problems with the cursor ending up at the correct location. > It's >work correctly here but your results may vary. >- The intentions are also fixed. Nobody mentioned the intentions not >working, so I'm guessing no one knew about them. There are intentions > to >create a markup page/panel/properties file if you alt-enter while the > cursor >is on the class name. > > > > On Fri, Jan 16, 2009 at 10:05 AM, Don Hass wrote: > >> >> Here is what I see in Diana #9647 build on Windows XP. >> >> >> Class/HTML Switching (WORKS) >> Alt + Shift + W switch between class and markup/html. >> >> >> Inspections (PARTLY WORKS) >> It seems to work in markup/html files, but not in source files for >> missing >> Wicket IDs. >> >> >> Goto (DOES NOT APPEAR TO WORK AT ALL) >> Control+Clicking on a Wicket ID in the Java or markup takes you to the >> corresponding Wicket ID in the accompanying file. Jumps between files, >> but >> not to correct locations. >> >> >> Completion (WORKS) >> When editing an HTML file, popup completion data provides Wicket IDs in >> the >> corresponding Java source file. >> >> >> Progress and thank you Nick. >> >> >> /Don >> >> >> >> Nick Heudecker wrote: >> > >> > Thanks for the feedback Maarten. I'm going to publish the plugin today >> to >> > the IDEA site then work on fixing that bug as soon as I can. >> > >> > On Fri, Jan 16, 2009 at 8:46 AM, Maarten Bosteels >> > wrote: >> > >> >> Hello Nick, >> >> >> >> The new plugin installs fine. This is what works on my systems: >> >> >> >> (a) ALT + SHIFT + W => switching between java and html files >> >> (b) in the html file clicking on a wicket:id value => jumps to >> >> corresponding >> >> Java code >> >> (c) CTRL + SPACEBAR when inside a wicket:id value in the html file => >> >> dropdown box for completion >> >> (d) in html file: warning "Wicket ID missing in Java source" when >> using >> >> an >> >> invalid wicket:id value >> >> >> >> not working: >> >> (e) clicking on a wicket:id in the Java code, expected to jump to >> >> correspondig wicket:id in html file, but nothing happens >> >> >> >> I saw same results on these two machines: >> >> >> >> Fedora 8 >> >> IDEA 8.0.1 EAP build 9164 >> >> JDK 1.6.0_11 >> >> >> >> Fedora 9 >> >> IDEA 8.0 build #9572 >> >> JDK 1.6.0_11 >> >> >> >> If I remember correctly, (e) used to work on IDEA 7. >> >> >> >> Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log >> >> Except maybe this: >> >> 2009-01-16 17:10:33,433 [ 3126] INFO - >> api.vfs.impl.local.FileWatcher >> >> - >> >> Native file watcher failed to startup. >> >> >> >> Let me know what I can do to help you fix this because your plugin >> >> totally >> >> rocks ! >> >> >> >> Thanks, >> >> Maarten >> >> >> >> On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker > >> >wrote: >> >> >> >> > That's what I get for trying to rush things. You can download it >> from >> >> > here: >> >> > >> >> > >> >> > http://www.systemmobile.com/code/WicketForge-0.5.0.zip >> >> > >> >> > And rename the zip to a jar. I'll update the instructions page >> next. >> >> > >> >> > On Wed, Jan 14, 2009 at 7:40 AM, Don Hass wrote: >> >> > >> >> > > >> >> > > Ditto. >> >> > > >> >> > > That's just teasing Nick! >> >> > > >> >> > > >> >> > > Maarten Bosteels wrote: >> >> > > > >> >> > > > Hello, >> >> > > > >> >> > > > I tried to download >> >> > > http://www.systemmobile.com/code/WicketForge-0.5.0.jar >> >> > > > but it's an empty file (zero bytes) >> >> > > > >> >> > > > Thanks, >> >> > > > Maarten >> >> > > > >> >> > > > On Wed, Jan 14, 2009 at 6:42 AM, Nick Heudecker >> >> > > > wrote: >> >> > > > >> >> > > >> I'm looking for some people to test WicketForge 0.5.0 with IDEA >> 8. >> >> As >> >> > > >> far >> >> > > >> as I can tell, everything seems to be working, but I'd like to >> get >> >> > more >> >> > > >> people testing before I publish it to the IDEA plugin site. >> >> > > >> >> >> > > >> Instructions and download here: >> >> > > http://www.systemmobile.com/?page_id=283 >> >> > > >> >> >> > > >> -- >> >> > > >> Nick Heudecker >> >> > > >> Professional Wicket Training & Consulting >> >> > > >> http://www.systemmobile.com >> >> > > >> >> >> > > >> Eventful - Intelligent Event Management >> >> > > >> http://www.eventfulhq.com >> >> > > >> >> >> > > > >> >> > > > >> >> > > >> >> > > -- >> >> > > View this message in c
Re: Intellij Idea Plugin Bounty
I hope I didn't give the wrong impression. I really appreciate the work you've done and looking at the code, it's a heck of a lot of work. If I hadn't tried wicketforge and saw the potential there I never would have been so motivated to start this process. I just didn't want to be that guy who just said "I want this" and "I want that" to someone who had already donated so much of their time. That's why I'm proposing the bounty. That way I can not feel like such a leech when I ask for specific things. -Matt Nick Heudecker wrote: > > Hi Matt, > > I'm sorry the IDEA plugin doesn't meet your needs. I've wanted to > implement > several of the features you mention, but like everyone else my time is > severely limited. > > That said, WicketForge is open source. I'm happy to accept patches or > even > turn the project over to someone else. > > On Wed, Feb 11, 2009 at 9:41 AM, Matt Welch wrote: > >> >> I use Intellij Idea for my Java development. In fact, that IDE is one of >> the >> main reasons I so often come back to using Java for many of my projects. >> I >> also use Wicket and am starting to work with it a lot more than I have in >> the past. While Wicket and Idea get along reasonably well, there's a lot >> of >> room for improvement in their relationship. That means a Wicket plugin >> for >> Idea. >> >> Nick Heudecker has done an admirable job with WicketForge >> (http://code.google.com/p/wicketforge/), however 1) when I try to use >> that >> plugin, I constantly get exceptions and 2) it doesn't do some of the the >> things I'm really interested in. This is no criticism of Nick. If I >> recall >> one of his messages correctly, he developed this plugin for his own use >> and >> it was extremely generous of him to publish the code as open source. He's >> even made pretty regular improvements to it, but at least for me >> personally, >> it doesn't meet my needs for a Wicket plugin. >> >> Now, I can't, in good conscience just pop on to this mailing list and ask >> someone out of the goodness of their heart to "get to it!", so I'm >> willing >> to start the ball rolling on an incentive in the form of a bounty; one >> that >> I hope other Wicket and Idea users will contribute to as well. First, >> though, I'd like to come to some kind of agreement about a feature set >> for >> such a plugin so that when I post the bounty I can be as specific as >> possible in its criteria. >> >> Here is a list of my most desired features in the order of priority: >> >> 1) Navigation between template and code - I would like the ability to >> move >> in both directions between a template and it's Java code. This means in >> an >> overall sense (e.g. moving back and forth between a top level page class >> and >> the HTML file) and in a more granular sense (e.g. moving back and forth >> between an HTML element with a wicket:id and the Wicket Java Component >> with >> the same id). I should be able to bind a keystroke to this action. It >> should >> preferably be the same keystroke in both directions. >> >> 2) Code completion for wicket:message keys - I would like code completion >> for the "key" attribute. It should work something like >> the >> XML code completion when there isn't a DTD or schema available. It would >> be >> based on other keys already available on the page. So for instance if I >> had >> already created a with a key of >> "userform.detailfieldset.username.label" I would expect that when I >> created >> another and started typing "us" in the key attribute, >> code >> completion would allow me to expand what I typed similar to what happens >> when typing package names. >> >> 3) Properties file intention - I would like an Idea intention that would >> allow me to automatically add keys to a resource >> properties >> file. By default this would add it to a properties file with the same >> name >> as the template (even creating the properties file if necessary), however >> it >> should be configurable to use an application-wide properties file if >> that's >> what the user prefers. When adding the key to the properties file it >> should >> be placed in a logical manner according to it's period separated name so >> the >> key "userform.detailfieldset.username.label" would be placed just after >> other ke
Intellij Idea Plugin Bounty
I use Intellij Idea for my Java development. In fact, that IDE is one of the main reasons I so often come back to using Java for many of my projects. I also use Wicket and am starting to work with it a lot more than I have in the past. While Wicket and Idea get along reasonably well, there's a lot of room for improvement in their relationship. That means a Wicket plugin for Idea. Nick Heudecker has done an admirable job with WicketForge (http://code.google.com/p/wicketforge/), however 1) when I try to use that plugin, I constantly get exceptions and 2) it doesn't do some of the the things I'm really interested in. This is no criticism of Nick. If I recall one of his messages correctly, he developed this plugin for his own use and it was extremely generous of him to publish the code as open source. He's even made pretty regular improvements to it, but at least for me personally, it doesn't meet my needs for a Wicket plugin. Now, I can't, in good conscience just pop on to this mailing list and ask someone out of the goodness of their heart to "get to it!", so I'm willing to start the ball rolling on an incentive in the form of a bounty; one that I hope other Wicket and Idea users will contribute to as well. First, though, I'd like to come to some kind of agreement about a feature set for such a plugin so that when I post the bounty I can be as specific as possible in its criteria. Here is a list of my most desired features in the order of priority: 1) Navigation between template and code - I would like the ability to move in both directions between a template and it's Java code. This means in an overall sense (e.g. moving back and forth between a top level page class and the HTML file) and in a more granular sense (e.g. moving back and forth between an HTML element with a wicket:id and the Wicket Java Component with the same id). I should be able to bind a keystroke to this action. It should preferably be the same keystroke in both directions. 2) Code completion for wicket:message keys - I would like code completion for the "key" attribute. It should work something like the XML code completion when there isn't a DTD or schema available. It would be based on other keys already available on the page. So for instance if I had already created a with a key of "userform.detailfieldset.username.label" I would expect that when I created another and started typing "us" in the key attribute, code completion would allow me to expand what I typed similar to what happens when typing package names. 3) Properties file intention - I would like an Idea intention that would allow me to automatically add keys to a resource properties file. By default this would add it to a properties file with the same name as the template (even creating the properties file if necessary), however it should be configurable to use an application-wide properties file if that's what the user prefers. When adding the key to the properties file it should be placed in a logical manner according to it's period separated name so the key "userform.detailfieldset.username.label" would be placed just after other keys with the name "userform.detailfieldset.username" or "userform.detailfieldset.username". The intention should leave the cursor after the "=" in the properties file. 4) Code completion on wicket tags and attributes - I would like code completion for all wicket tags (e.g. , , etc.) in HTML templates. This is something of a lower priority as Idea's "Live Template" functionality takes much of the pain out of not having code completion for items in the wicket namespace. This doesn't help with the error/warning issue, though. 5) Validation for wicket namespace and attributes in hTML template - In a similar vein, I would like wicket attributes like "wicket:id" and wicket tags like to not show up as either errors or warnings in my HTML templates. This is just off the top of my head. I'm sure there are more and perhaps even some that should be higher on the priority list. Once some kind of feature set is agreed by Idea users here in the mailing list, I'll kick off the bounty on one of the software bounty sites and contribute $200. I know it's not much but I'll try to get my company to pony up a few dollars as well. That along with whatever contributions anyone else would like to make will hopefully be an incentive for someone. Maybe there's someone out there who's been wanting to do this for a while and the bounty will simply be the motivation to finally do it. I don't know, but I don't figure there's any harm in trying. Please post your own ideas and list your preferred priority for the features. -Matt -- View this message in context: http://www.nabble.com/Intellij-Idea-Plugin-Bounty-tp21958284p21958284.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
Re: AjaxSubmitLink submitting twice
The Nabble posting process correctly escaped all of the HTML tags except the which it rendered as HTML. I only just now figured out I needed to use a "raw" tag. The raw HTML is below. As expected though, this same code works fine in a quickstart. I never suspected that it was a bug, which is why I didn't post a JIRA issue. I knew something this simple wouldn't have been missed. It's clearly a problem with our configuration, but I don't know where to start looking. Using this simple test page, the final rendered page contains no extra javascript beyond the wicket stuff to support the button submission which I know works. This test page isn't going through our security framework because I extended WebPage instead of our application's SecureWebPage (using wicket-security). That leaves servlet filters (Spring's OpenSessionInView and the normal WicketFilter), our session implementation or the WebApplication itself. Does anyone have any suggestions about where I might plop down a breakpoint in an attempt to debug this issue? -Matt http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> # Search igor.vaynberg wrote: > > your example markup does not contain "search" component. it is much > better to open a jira issue and attach a quickstart that reproduces > the problem. > > -igor > > On Tue, Feb 10, 2009 at 6:12 AM, Matt Welch wrote: >> >> I'm stumped. We have an AjaxSubmitLink and when clicked, the onSubmit of >> the >> link is being executed twice. This is causing havok in our app. I've >> winnowed it down to just the simplest example but I still see this taking >> place. I'm not sure how to proceed. Here's the example code: >> - >> >PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> >> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> >> >> >> >> # Search >> >> >> >> - >> public class TestAjaxSubmitLink extends WebPage { >>private String fieldValue; >> >>public TestAjaxSubmitLink() { >> >>Form form = new Form("testForm"); >>add(form); >>final TextField search = new TextField("keyword", new >> PropertyModel(this, >> "fieldValue")); >> >>form.add(search); >>form.add(new AjaxSubmitLink("search"){ >>protected void onSubmit(AjaxRequestTarget target, >> Form form) { >>System.out.println("Clicked Submit"); >>} >>}); >>} >> } >> - >> >> We're using an older version of Wicket, but I tested this in 1.3.5 also >> and >> got the same behavior. I find it hard to believe that we would be the >> first >> to experience this behavior so I assume we're doing something wrong, but >> I'm >> just not sure what it is. Any advice? >> >> -Matt >> -- >> View this message in context: >> http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p21934491.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 > > > -- View this message in context: http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p21944134.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
AjaxSubmitLink submitting twice
I'm stumped. We have an AjaxSubmitLink and when clicked, the onSubmit of the link is being executed twice. This is causing havok in our app. I've winnowed it down to just the simplest example but I still see this taking place. I'm not sure how to proceed. Here's the example code: - http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> # Search - public class TestAjaxSubmitLink extends WebPage { private String fieldValue; public TestAjaxSubmitLink() { Form form = new Form("testForm"); add(form); final TextField search = new TextField("keyword", new PropertyModel(this, "fieldValue")); form.add(search); form.add(new AjaxSubmitLink("search"){ protected void onSubmit(AjaxRequestTarget target, Form form) { System.out.println("Clicked Submit"); } }); } } - We're using an older version of Wicket, but I tested this in 1.3.5 also and got the same behavior. I find it hard to believe that we would be the first to experience this behavior so I assume we're doing something wrong, but I'm just not sure what it is. Any advice? -Matt -- View this message in context: http://www.nabble.com/AjaxSubmitLink-submitting-twice-tp21934491p21934491.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: Checkbox filtering a dataview
Thanks. That makes a lot of sense. Sometimes the simplest approaches are the ones I forget. Matt igor.vaynberg wrote: > > public mypage extends webpage { > private boolean filter; > > public mypage() { > add(new dataview("dataview", new dataprovider()) {}); > } > > private class dataprovider extends mydataprovider { >protected boolean getfilter() { return filter; } > } > } > > On Wed, Feb 4, 2009 at 1:51 PM, Matt Welch wrote: >> >> Thank you for your reply. Unfortunately (for this situation, anyway), we >> frequently reuse our dataproviders in more than one place in the >> application, so they are are always in their own class files. In any >> case, >> what we have will work for now. I'll look around through the examples for >> other use cases. >> >> Matt >> >> >> >> igor.vaynberg wrote: >>> >>> public mypage extends webpage { >>> private boolean filter; >>> >>>public mypage() { >>>add(new dataview("dataview", new dataprovider()) {}); >>>} >>> >>> private class dataprovider implements idataprovider() { >>> public int size() { return new query(filter).size(); } >>> public iterator iterator() { return new query(filter).iterator(); >>> } >>> } >>> } >>> >>> -igor >>> >>> >>> On Wed, Feb 4, 2009 at 12:55 PM, Matt Welch >>> wrote: >>>> >>>> I'm probably thinking about his all wrong, but for some reason I can't >>>> get my >>>> mind in the right frame here. I have a page with a dataview that is >>>> showing >>>> data in a table. That dataview needs to be filtered by a checkbox in a >>>> different place on same page. The model for that checkbox is an >>>> attribute >>>> of >>>> the page (using PropertyModel). When I click the checkbox the page >>>> needs >>>> to >>>> refresh and show filtered data. Obviously the dataview need to know the >>>> current value of that checkbox. The only way I can think to do that is >>>> to >>>> pass the page itself to the dataview so that it can call the getter for >>>> that >>>> property. This seems convoluted, however. Am I missing something? >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21839427.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 >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21840403.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 > > > -- View this message in context: http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21851525.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: Checkbox filtering a dataview
Thank you for your reply. Unfortunately (for this situation, anyway), we frequently reuse our dataproviders in more than one place in the application, so they are are always in their own class files. In any case, what we have will work for now. I'll look around through the examples for other use cases. Matt igor.vaynberg wrote: > > public mypage extends webpage { > private boolean filter; > >public mypage() { >add(new dataview("dataview", new dataprovider()) {}); >} > > private class dataprovider implements idataprovider() { > public int size() { return new query(filter).size(); } > public iterator iterator() { return new query(filter).iterator(); } > } > } > > -igor > > > On Wed, Feb 4, 2009 at 12:55 PM, Matt Welch wrote: >> >> I'm probably thinking about his all wrong, but for some reason I can't >> get my >> mind in the right frame here. I have a page with a dataview that is >> showing >> data in a table. That dataview needs to be filtered by a checkbox in a >> different place on same page. The model for that checkbox is an attribute >> of >> the page (using PropertyModel). When I click the checkbox the page needs >> to >> refresh and show filtered data. Obviously the dataview need to know the >> current value of that checkbox. The only way I can think to do that is to >> pass the page itself to the dataview so that it can call the getter for >> that >> property. This seems convoluted, however. Am I missing something? >> -- >> View this message in context: >> http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21839427.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 > > > -- View this message in context: http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21840403.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
Checkbox filtering a dataview
I'm probably thinking about his all wrong, but for some reason I can't get my mind in the right frame here. I have a page with a dataview that is showing data in a table. That dataview needs to be filtered by a checkbox in a different place on same page. The model for that checkbox is an attribute of the page (using PropertyModel). When I click the checkbox the page needs to refresh and show filtered data. Obviously the dataview need to know the current value of that checkbox. The only way I can think to do that is to pass the page itself to the dataview so that it can call the getter for that property. This seems convoluted, however. Am I missing something? -- View this message in context: http://www.nabble.com/Checkbox-filtering-a-dataview-tp21839427p21839427.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: Another Ajax back button question
Scott Swank wrote: > > If the ajax changes are reflected in the relevant model(s) then you > will see them when you go back to the page. > Hmmm... perhaps I shouldn't have abstracted my issue and instead discussed exactly what is happening. Let me change some steps. 1) On a page with a form I enter information and submit the form 2) The page refreshes (normal submit; not ajax) and a panel that was previously invisible is displayed as the form submission is processed in the background. This processing is background task because it can take a very long time (anywhere between 5 seconds to half an hour). There is an AjaxSelfUpdatingTimerBehavior with a 5 seconds time attached to the now visible panel. 3) The AjaxSelfUpdatingTimerBehavior checks the background process in it's onPostProcessTarget() method and when the background processing is done, the panel is made invisible again and new panel is made visible with a link to report on the processing that just took place. 4) Clicking that link takes one to the report and then clicking that browser back button brings one back to the form page, however, it apparently brings one back to the form page in the state it was just after the original submit was clicked. The actual background processing doesn't get kicked off again, but the "in progress" panel is visible and remains visible until one cycle of the AjaxSelfUpdatingTimerBehavior goes by and then the page returns to the expected state. I'd like to figure out a way keep that "in progress" panel from showing up when the back button is pressed. -Matt -- View this message in context: http://www.nabble.com/Another-Ajax-back-button-question-tp20843893p20844322.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]
Another Ajax back button question
I'm sure this has been asked and answered but after searching the list, I'm still not sure if there is something I can do to fix my situation. The general gist is this: 1) I make some changes to a page with ajax calls (i.e. replace panel contents) 2) Click a link to take me away from that page 3) Use browser back button to return to previous page 4) Original page is in the state that it was BEFORE the changes made with the ajax calls. Maybe this is a, "Well, duh.. of course it is. That's just the way it works" moment, but I could have sworn I've seen this work differently in other wicket examples and apps I've worked on. Any tips? -Matt -- View this message in context: http://www.nabble.com/Another-Ajax-back-button-question-tp20843893p20843893.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: @SpringBean vs @Configurable
Thank you. That makes sense to me now. It was a slow brain day day for me I guess. :) Matt igor.vaynberg wrote: > > class usersdataprovider implements dataprovider { > final userservice svc; > public int size() { return svc.size(); } > } > > @configurable class userspage extends webpage { > private userservce svc; >public userspage() { > add(new dataview("users", new dataprovider(svc))); > } > > this takes a reference of injected userservice svc and passes it to > the dataprovider. now dataprovider has a hard reference to the service > and is no longer serializable. > > if you use a @springbean generated proxy, this would still work fine. > > -igor > > On Mon, Jul 21, 2008 at 1:50 PM, Matt Welch <[EMAIL PROTECTED]> wrote: >> >> >> igor.vaynberg wrote: >>> >>> you have to be careful not to pass references to injected beans to >>> other objects. other than that i think you should be fine. >>> >> I know I should understand that, but my brain doesn't want to parse that >> sentence for some reason. >> >> references to injected beans - What does that mean? The domain object is >> an >> injected bean (if it was annotated with @Configurable) and a reference to >> it >> would presumably be passed to the Wicket component so that the that >> component could process it. Are you saying that this should be avoided? >> >> other objects - Can you maybe give an example of the "other objects" you >> have in mind? >> >> Matt >> >> -- >> View this message in context: >> http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18577287.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/%40SpringBean-vs-%40Configurable-tp18572291p18579719.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: @SpringBean vs @Configurable
igor.vaynberg wrote: > > you have to be careful not to pass references to injected beans to > other objects. other than that i think you should be fine. > I know I should understand that, but my brain doesn't want to parse that sentence for some reason. references to injected beans - What does that mean? The domain object is an injected bean (if it was annotated with @Configurable) and a reference to it would presumably be passed to the Wicket component so that the that component could process it. Are you saying that this should be avoided? other objects - Can you maybe give an example of the "other objects" you have in mind? Matt -- View this message in context: http://www.nabble.com/%40SpringBean-vs-%40Configurable-tp18572291p18577287.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]