Re: Re: Re: Basic JUnit Test
Hi Vineet, thanks for the reply. The line "tester.getServletRequest().setParameter("myParam", "testParam");" But now Im breaking my head with the next issue. If you look at my first post, Im trying to do a test where a second page is rendered after a submit on an AjaxButton. The test code looks like this: 1. FirstPage page = (FirstPage) tester.startPage(FirstPage.class, pageParameters); 2. tester.assertRenderedPage(FirstPage.class); 3. page.getActionForm().setType(1); // where actionForm is a property/attribute of FirstPage. 4. FormTester formTester = tester.newFormTester("myForm"); 5. tester.getServletRequest().setParameter("myParam", "testParam"); 6. tester.executeAjaxEvent("myForm:myAjaxButton", "onclick"); 7. tester.assertRenderedPage(SecondPage.class); The the test fails within the "onSubmit(AjaxRequestTarget target, Form form)" saying that the attribute/property actionForm is null... Obviously the second (Ajax-) request is not shipped with the attribute/property values of his containing panel. Is this correct? Who can help me out here? Regards, Yusuf - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Should I really go for LoadableDetachableModel ?
Hi, Thank you for clarifying me. Removing the reference can help me out. Let me try it :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Should-I-really-go-for-LoadableDetachableModel-tp4651353p4651359.html Sent from the Users forum 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: Add page feedback to every AjaxRequestTarget
The main problem I am facing is that in Wicket 1.4.x I can't figure out how to access ART from the component that was not added to this ART, e.g. during ajax form submission. I tried to add AjaxFormSubmitBehavior to every Form child of the page but that overrode those form ajax-submit functionality and basically broke them all. Now I am thinking about adding an onclick behavior which will add my component to ART to every AjaxSubmitLink child of the page. But this seems to be pretty ugly. Thoughts? Thanks, Ale On Fri, Aug 17, 2012 at 4:22 PM, Alec Swan wrote: > Hello, > > Thank you for the link. I used your code to register an > ART.addListener(new AjaxFeedbackPanelUpdater()) when the page is > created, but it does not get called when the form is submitted and > hence it never adds the FeedbackPanel to ART of form submission. > > Where should I add this listener? > > Thanks, > > Alec > > On Wed, Aug 15, 2012 at 4:14 PM, procrastinative.developer > wrote: >> Hello Alec, >> Could you take a look on this: >> >> https://github.com/procrastinativedeveloper/ToolsClasses/blob/master/src/main/java/com/utils/wicket/ajax/AjaxFeedbackPanelUpdater.java >> >> >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Add-page-feedback-to-every-AjaxRequestTarget-tp4651257p4651262.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Should I really go for LoadableDetachableModel ?
Hi, yes the listDataProvider doesnt help for minimize memory usage. The DataProvider will be stored in Component and therefore all fields are also stored in component/session. For e.g. 2000 Session you have 2000 times the same list in memory. This is not what you want. First optimization: Cache the list in one list (static or cacheprovider), that only one session is referenced in all dataprovider. Later optimization: dont hold a reference to the list und load the list on every request in dataprovider but with limiting the e.g. SQL-Query to the (first, count) Range given in DataProvider. The list and items will be detached on end of request (which means removed from memory) SQL-Query caching is also recommended. MySql supports this by "limit" . Note: Hibernate and JDO supports rangequeries DB independent. Every Request will be in Young-Gen Memory and shortly removed after requests ends. You have full controll what will stored in memory(Caches) cya Martin kshitiz schrieb: Hi, Thanks for the reply. I am trying t achieve what you suggested me. But one thing I want to ask. In listDataProvider, you will anyway provide list of data to get rendered. You may render it in any manner but that list will be stored as final or class variable. Wont that take up the session ? I mean what difference will it make to use dataview instead of simple list with listview in terms of memory? I am trying to understand its concept so please ignore my mistake...:) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Should-I-really-go-for-LoadableDetachableModel-tp4651353p4651356.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Should I really go for LoadableDetachableModel ?
Hi, Thanks for the reply. I am trying t achieve what you suggested me. But one thing I want to ask. In listDataProvider, you will anyway provide list of data to get rendered. You may render it in any manner but that list will be stored as final or class variable. Wont that take up the session ? I mean what difference will it make to use dataview instead of simple list with listview in terms of memory? I am trying to understand its concept so please ignore my mistake...:) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Should-I-really-go-for-LoadableDetachableModel-tp4651353p4651356.html Sent from the Users forum 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: wicket multi-window app
Martin, Thanks for your input. Chuck From Chuck's iPad iPad: (502) 713-3283 On Aug 18, 2012, at 7:06 AM, Martin Grigorov wrote: > Hi, > > Writing web apps requires writing JavaScript code ... > Even if you use components like Wicket-extensions' ModalWindow or > wicket-bootstrap's Modal, or wicket-jquery-ui's Dialog, or any other > similar component you will still need to add some custom JS to make it > working as you need it. And this is where Wicket shines - it doesn't > mandate specific solutions, it allows you to make dynamic apps by > reusing components and by making it easier to extend them for your > specific needs. > > On Sat, Aug 18, 2012 at 5:22 AM, Chuck Brinkman > wrote: >> Hi, >> >> I have a desktop application that I need to move to the web. The desktop >> app supports multiple windows. I'm told it wouldn't be unusual to have as >> many as 30 windows open. All of the windows can be moved, resized, expanded >> to full screen (fill the original app window) and minimize. The user >> community doesn't want to lose any look and feel of the desktop app. >> >> Here are the hurdles that I see >> >> -) keeping the child windows on top of the parent window. > that should be easy with CSS (z-index) > >> -) expanding a child window to fill the parent window > Use JavaScript that manipulates the child's CSS properties > >> -) can I create a modal window? A few of the desktop windows are modal. > See wicket-extensions' ModalWindow > >> -) is there a limit to the number of child windows > No > >> -) concerns about multi-window support in wicket > Most of the time this just works > >> >> So, >> -) Will wicket support any of this without me having to resort to writing >> javascript? >> -) What issues have I overlooked that will preclude the use of wicket >> >> Thanks for your input >> >> I looked at wicket a few years ago. I'm a fan of the just java and just >> html aspect not to mention reusable components. I would really like to hear >> that wicket will support this multi-window environment. If not it looks >> like jquery which means lots of javascript and I think large amounts of >> javascript are unmanageable. > > This is true but lately there are many good JS testing frameworks > which make this more manageable. > >> >> >> >> Chuck >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Should I really go for LoadableDetachableModel ?
Probably better to use a DataView with a dataprovider for populating the list. The dataprovider has a way to create a model for each item. In that you can use a LDM for just populating one item. The dataview will only populate the dataprovider for rendering. For actions the individual LDM will be used. Martijn On Sun, Aug 19, 2012 at 9:57 AM, kshitiz wrote: > Hi, > > Please help me out here. In my web app, I have to show a list of data. > Previously I was using simple arraylist in listview. To deal with any memory > concern in future, I moved from arraylist to loadabledetachablemodal list. > But now, in any operation like delete, update etc, whole list is being > uploaded from database which is a bit time consuming. I know this is pretty > obvious. So, its like i have to compromise on one issue. So what should I > do? For highly traffic websites, is ldm necessary? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Should-I-really-go-for-LoadableDetachableModel-tp4651353.html > Sent from the Users forum 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 > -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Should I really go for LoadableDetachableModel ?
Hi, Please help me out here. In my web app, I have to show a list of data. Previously I was using simple arraylist in listview. To deal with any memory concern in future, I moved from arraylist to loadabledetachablemodal list. But now, in any operation like delete, update etc, whole list is being uploaded from database which is a bit time consuming. I know this is pretty obvious. So, its like i have to compromise on one issue. So what should I do? For highly traffic websites, is ldm necessary? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Should-I-really-go-for-LoadableDetachableModel-tp4651353.html Sent from the Users forum 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