Re: Getting the exception while starting a application in tomcat
Hi, Thanks a lot for all ur responses. I changed the compiler of eclipse and tomcat to 1.5 and now i am not getting the unsupportedVersionException. Now i am getting a different exception and log is given below WicketMessage: Markup of type 'html' for component 'guru.HelloWorld' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:[Page class = guru.HelloWorld, id = 0, version = 0]Root cause:org.apache.wicket.markup.MarkupNotFoundException: Markup not found. Component class: guru.HelloWorld Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:342) at org.apache.wicket.Page.onRender(Page.java:1435) at org.apache.wicket.Component.render(Component.java:2266) at org.apache.wicket.Page.renderPage(Page.java:891) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1100) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)Complete stack:org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'guru.HelloWorld' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:[Page class = guru.HelloWorld, id = 0, version = 0] at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:354) at org.apache.wicket.Page.onRender(Page.java:1435) at org.apache.wicket.Component.render(Component.java:2266) at org.apache.wicket.Page.renderPage(Page.java:891) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1100) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) Thanks Regards, Gurvinder Pal Singh igor.vaynberg wrote: erm...its a war... -igor On Jan 30, 2008 5:09 AM, Gurvinder Pal Singh [EMAIL PROTECTED] wrote: Is mvn package package compatible to tomcat...i mean will the war run on tomcat server? Thanks Regards Gurvinder Pal Singh igor.vaynberg wrote: the link i pointed to generates wicket 1.3.0 quickstarts. and if you dont want to use jetty then simply run mvn package and that will generate a war file in the target subdir. -igor On Jan 30, 2008 12:25 AM, Gurvinder Pal Singh [EMAIL PROTECTED] wrote: Hi , you are right, as the snippet i have given is from the exception sown in the wicket-examples project. Also the quick start example u have mentioned is of wicket1.2 version and that too for jetty server. But i have also tried to do create the HelloWorld example from given examples in the website which has given the following error log on starting the tomcat: 2008-01-29 11:19:57 StandardContext[/FirstWicketProject]: Exception starting filter HelloWorldApplication
Re: Workaround for AjaxEditableLabel yields java.lang.IllegalAccessError (WICKET-1239)?
i'm sorry this one slipped through. i commited Per's fix. Edvin, can you try with latest trunk to verify it's fixed? gerolf On Jan 31, 2008 8:53 AM, Edvin Syse [EMAIL PROTECTED] wrote: Advanced Technology(R) skrev: Check Per solution : http://www.nabble.com/AjaxEditableLabel-in-1.3.0-tp14675483p14687720.html Thanks! Worked like a charm. For some reason this didn't make it into 1.3.1, though.. -- Edvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Scrollbar in popup window?
yes.. http://www.google.com/search?hl=daq=scrollable+divbtnG=S%C3%B8glr= Andy Czerwonka wrote: Is there a way to do it within a div right on a page? palun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How do I get vertical scrollbar in a popup window with (too) long content? Popup is created like so: add(new BookmarkablePageLink(instrLink, InstructionsPopupPage.class, params).setPopupSettings(popupSettings)); The purpose is to show a rather long information text in a separate window whenever user clicks an info icon. Content is static html. If anyone has comments / suggestions on how to best do this from a wicket app, please let me know. Many thanks /ulf -- View this message in context: http://www.nabble.com/Scrollbar-in-popup-window--tp15182160p15182160.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] -- 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]
Re: Simple edit form and models
The reason is rather simple. We have already an in-house developed XUL-like framework which provides all necessary information needed to construct a gui form dynamically (Controls, Masks, Security etc). My first thought is to reuse these xml files to add() controls dynamically to a wicket form. So, if all controls (textfields, buttons etc) are created automatically from an abstract class then i need an abstract data wrapper, something like the FormData class, to hold the model's data(?). Then the only code remaining to be written would be dummy methods like populateFormData() and captureFormData(), which can be written easily by junior (or sometimes aged) programmers not so receptive to new techs. But maybe i' m wrong. I need to spend a lot more time with wicket to decide the right direction for my team. Fortunately wicket is really fun ! Edvin Syse wrote: First of all I want to congratulate Wicket guys for their work. Until today I have developed applications based mainly on SWT/RCP and JSP/Servlets. Currently we are evaluating various frameworks in order to initiate a new project, which will expose many of our in-house developed system (SWT/RCP) functions through web. It seems that Wicket is very close to what we are looking for, because more or less we have the same logic in our gui applications. I am trying to create a common template for edit forms responsible to edit properties of a single pojo. In general, I want to have fool control over the synchronization between the form’s data and pojo’s fields. I am posting some simple code. I would appreciate if anyone has the time to take a look and tell me if I am following a right approach about the models and the binding technique. Out of curiosity - what are you going to do that needs this fool control over the binding process? I find in most cases that using CompoundPropertyModel for the whole form and overriding some fields with another PropertyModel for example is sufficient in almost every usecase. I would do something like: public class InputForm extends Form { public InputForm(String id, IModel model) { super(id, model); add(new TextField(personCode)); add(new TextField(lastname)); add(new TextField(someSpecialField, new PropertyModel(someOtherObject, fieldname)); add(new Button(save) { @Override public void onSubmit() { // Save } }); } } Wicket takes care of all the manual labour concerning binding you are used to from RCP-programming, so why not just let it shine? :) Is it too memory expensive to keep instances of pojos inside the form? Does the session keeps information for all pages or just for the current page? Normally you supply the form with a IModel, and depending on the size/nature of the model object you would use a LoadableModel to avoid saving the whole object when you move on from that page. Wicket 1.3 now uses SecondLevelCacheSessionStore per default, and I think only the current page is in memory, and that subsequent pages are saved off to disk, so normally you don't need to think about optimizing for memory usage unless you have a very special case on your hands. -- Edvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Simple-edit-form-and-models-tp15186893p15200698.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]
Wrapping a POJO
Hi- I'm pretty new to wicket, so sorry if this is a dumb question: I have a POJO that stores some boolean values in a bit field. Now I'd like to display the POJO in a form with check boxes for each field. I'd still like to use a CompoundPropertyModel, so I thought that I'd wrap the POJO in a class that adds accessor methods for every possible value in the bit field. However this means that I'd have to provide accessor methods in the wrapper for all fields of the POJO that just delegate to the wrapped object's methods. So, is there a better way to do this? Would the Wrapper have to implement IModel? Thanks for any help, -markus This message was sent using IMP, the Internet Messaging Program. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting the exception while starting a application in tomcat
Hi , I have the HelloWorld Example working now. Thanks for all your responses as they are highly appreciated. The below mentioned exception (MarkupNotFoundException) is removed by renaming the index.html to HelloWorld.html. Thanks Regards, Gurvinder Pal Singh Gurvinder Pal Singh wrote: Hi, Thanks a lot for all ur responses. I changed the compiler of eclipse and tomcat to 1.5 and now i am not getting the unsupportedVersionException. Now i am getting a different exception and log is given below WicketMessage: Markup of type 'html' for component 'guru.HelloWorld' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:[Page class = guru.HelloWorld, id = 0, version = 0]Root cause:org.apache.wicket.markup.MarkupNotFoundException: Markup not found. Component class: guru.HelloWorld Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:342) at org.apache.wicket.Page.onRender(Page.java:1435) at org.apache.wicket.Component.render(Component.java:2266) at org.apache.wicket.Page.renderPage(Page.java:891) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1100) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)Complete stack:org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'guru.HelloWorld' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:[Page class = guru.HelloWorld, id = 0, version = 0] at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:354) at org.apache.wicket.Page.onRender(Page.java:1435) at org.apache.wicket.Component.render(Component.java:2266) at org.apache.wicket.Page.renderPage(Page.java:891) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1100) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) Thanks Regards, Gurvinder Pal Singh igor.vaynberg wrote: erm...its a war... -igor On Jan 30, 2008 5:09 AM, Gurvinder Pal Singh [EMAIL PROTECTED] wrote: Is mvn package package compatible to tomcat...i mean will the war run on tomcat server? Thanks Regards Gurvinder Pal Singh igor.vaynberg wrote: the link i pointed to generates wicket 1.3.0 quickstarts. and if you dont want to use jetty then simply run mvn package and that will generate a war file in the target subdir. -igor On Jan 30, 2008 12:25 AM, Gurvinder Pal Singh [EMAIL PROTECTED] wrote: Hi , you are right, as the snippet i have given is from the exception sown in the wicket-examples project.
Re: Wrapping a POJO
Hi Markus, you simply have to provide the POJO to the CompoundPropertyModel. Provide simple PropertyModels related to the compound model for the fields. You can imagine the whole concept as the path to the value. Pojo myPojo = new Pojo(); IModel model = new CompoundPropertyModel(myPojo); IModel aPropertyModel = new PropertyModel(model, theNameOfAccessorInPojo); Label myPojoProperty = new Label(aWicketId, new aPropertyModel); I use a label. Replace it by your component. Cheers Per PS: If you new to wicket - checkout the wiki and the examples. They explain alot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple edit form and models
You may be interested in something like the bean editor webcast linked from here http://herebebeasties.com/2007-08-17/wicket-bean-editor/ With a bit of customisation you should be able to bend it to suit your needs for any of your pojos. Rgds Ned Constantin Y wrote: First of all I want to congratulate Wicket guys for their work. Until today I have developed applications based mainly on SWT/RCP and JSP/Servlets. Currently we are evaluating various frameworks in order to initiate a new project, which will expose many of our in-house developed system (SWT/RCP) functions through web. It seems that Wicket is very close to what we are looking for, because more or less we have the same logic in our gui applications. I am trying to create a common template for edit forms responsible to edit properties of a single pojo. In general, I want to have fool control over the synchronization between the form’s data and pojo’s fields. I am posting some simple code. I would appreciate if anyone has the time to take a look and tell me if I am following a right approach about the models and the binding technique. -- View this message in context: http://www.nabble.com/Simple-edit-form-and-models-tp15186893p15201977.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: is there wicket had per-defined the Thread for the form component
ok..i changed the way to code. My report page is extend to a Common page. The common page got the leftmenu panel and a wicket child (which is those report page) So, the common page, i add one modal window component. And this component i had give the behavior to show it. Example code in parent class : /// modal window use panel.. add(modalWindow); // to auto pop up the modal window. ajaxLink = new AjaxLink(cancelReportModalLink){ @Override public void onClick(AjaxRequestTarget target) { cancelReportModal.show(target); } }; add(ajaxLink); // Fire the ajaxLink onclick function getBodyContainer().addOnLoadModifier(new ClickOnceOnLoadModel( ajaxLink ), null ); So, once i run the report page (child class), suppose the modal window should pop up then only run the report page. As we know the parent class should run first then only child .. can anyone help me? thanks in advance igor.vaynberg wrote: the order in which you add components in java seldom matters, the true ordering is defined by markup. -igor On Jan 30, 2008 9:34 PM, kenixwong [EMAIL PROTECTED] wrote: thanks for reply in a short time, igor But here , i found the problem,... In my page constructor, i defined the component modalWindow, feedbackPanel, a form in sequence. So, in common sense, it will call the modalWindow ( i wish to auto pop up once the page is load ) first follow by the other. The problem i faced here is the modal window run at the end once the page is finish loaded. Cnan i know the reason here... ? my page constructor : public LineChart() { /// modal window use panel.. add(modalWindow); // to auto pop up the modal window. ajaxLink = new AjaxLink(cancelReportModalLink){ @Override public void onClick(AjaxRequestTarget target) { cancelReportModal.show(target); } }; add(ajaxLink); // Fire the ajaxLink onclick function getBodyContainer().addOnLoadModifier(new ClickOnceOnLoadModel( ajaxLink ), null ); add(feedback); add(new LineChartForm(LineChartForm)); } private class LineChartForm extends Form { // execute query // result as in JFreeChart } From the above partial code, the modal window should call then only form. Can anyone give the explanation ? and is it possible i stop the form process if the user click the cancel button from the modal window ? thanks in advance igor.vaynberg wrote: it doesnt have anything to do with server side threading, but with how browser processes html and javascript. -igor On Jan 30, 2008 9:16 PM, kenixwong [EMAIL PROTECTED] wrote: hi, for the above case, for example... my page constructor: i add the component ( modal window, feedBackPanel, form ) . Once i load the page, why the modal window will only display when the page is finish loaded. Is that the wicket had default set the main thread for the form component? Thanks in advance -- View this message in context: http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198385.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/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198494.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/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15202310.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: Simple edit form and models
Nice work Ned! Actually this approach is very close to what i am trying to do. Thanks a lot Ned Collyer wrote: You may be interested in something like the bean editor webcast linked from here http://herebebeasties.com/2007-08-17/wicket-bean-editor/ With a bit of customisation you should be able to bend it to suit your needs for any of your pojos. Rgds Ned Constantin Y wrote: First of all I want to congratulate Wicket guys for their work. Until today I have developed applications based mainly on SWT/RCP and JSP/Servlets. Currently we are evaluating various frameworks in order to initiate a new project, which will expose many of our in-house developed system (SWT/RCP) functions through web. It seems that Wicket is very close to what we are looking for, because more or less we have the same logic in our gui applications. I am trying to create a common template for edit forms responsible to edit properties of a single pojo. In general, I want to have fool control over the synchronization between the form’s data and pojo’s fields. I am posting some simple code. I would appreciate if anyone has the time to take a look and tell me if I am following a right approach about the models and the binding technique. -- View this message in context: http://www.nabble.com/Simple-edit-form-and-models-tp15186893p15202600.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: Wrapping a POJO
And the label here with compoundmodel.. IModel model = new CompoundPropertyModel(myPojo); Page.setmodel(model) Label myPojoProperty = new Label(propertyName); add(myPojoProperty); Per Newgro wrote: Hi Markus, you simply have to provide the POJO to the CompoundPropertyModel. Provide simple PropertyModels related to the compound model for the fields. You can imagine the whole concept as the path to the value. Pojo myPojo = new Pojo(); IModel model = new CompoundPropertyModel(myPojo); IModel aPropertyModel = new PropertyModel(model, theNameOfAccessorInPojo); Label myPojoProperty = new Label(aWicketId, new aPropertyModel); I use a label. Replace it by your component. Cheers Per PS: If you new to wicket - checkout the wiki and the examples. They explain alot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
RE: Wrapping a POJO
Why insist on a CompoundPropertyModel? My first instinct would be to create a custom model for the checkboxes (which sets/unsets a single bit). Thomas -Original Message- From: Markus Strickler [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 31. Januar 2008 13:00 To: users@wicket.apache.org Subject: Re: Wrapping a POJO Hi- thanks for the quick reply. My description probably wasn't clear enough. My problem is that I have several checkboxes in the interface that all map to a single Integer in the POJO. So there is not accessor that accepts a boolean, which is why I need some way to translate between the POJO and the model that backs the form. The wiki actually has an example that is somewhat similar (http://cwiki.apache.org/WICKET/listview-with-checkboxes.html ) but only wraps a String. But coming to think of it, I can probably just access the POJO fields through the wrapper like this: wrapper.pojo.field. OK, I'll probably try this. Thanks again, -markus Zitat von Per Newgro [EMAIL PROTECTED]: Hi Markus, you simply have to provide the POJO to the CompoundPropertyModel. Provide simple PropertyModels related to the compound model for the fields. You can imagine the whole concept as the path to the value. Pojo myPojo = new Pojo(); IModel model = new CompoundPropertyModel(myPojo); IModel aPropertyModel = new PropertyModel(model, theNameOfAccessorInPojo); Label myPojoProperty = new Label(aWicketId, new aPropertyModel); I use a label. Replace it by your component. Cheers Per PS: If you new to wicket - checkout the wiki and the examples. They explain alot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message was sent using IMP, the Internet Messaging Program. - 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: Monitoring Wicket using JAMon
Hi thanks for the replies, Yes I want to do it per Page so I can monitor the performance per page. Here is how I implemented it, I am not sure if I always get the name of the Page name in the implementation of onEndRequest. (Allthough during tests I always got the name of the Page.) public class JAMonMonitoredWebRequestCycle extends WebRequestCycle { static final String UNIT = ms.; private ThreadLocalLong startTimes = new ThreadLocalLong(); public JAMonMonitoredWebRequestCycle(WebApplication application, WebRequest request, Response response) { super(application, request, response); } @Override protected void onBeginRequest() { super.onBeginRequest(); addStartTimeToThreadLocal(); } @Override protected void onEndRequest() { super.onEndRequest(); calculateDurationAndAddToMonitor(); } private void addStartTimeToThreadLocal() { startTimes.set(System.currentTimeMillis()); } private void calculateDurationAndAddToMonitor() { if(startTimes.get() != null) { Class? pageClass = null; if(getWebResponse().isAjax() getWebRequest().getPage() != null) { pageClass = getWebRequest().getPage().getClass(); } else { pageClass = getResponsePageClass(); } if(pageClass != null) { MonitorFactory.add(pageClass.toString(), UNIT, System.currentTimeMillis() - startTimes.get().doubleValue()); } startTimes.set(null); } } } I believe the Page to be rendered is not availble yet in the onBeginRequest so I use MonitorFactory.add() in the onEndRequest and store the startTime in a ThreadLocal. While typing this email I am thinking that WebRequestCycle is statefull so I probably do need the ThreadLocal right? Lars On Jan 30, 2008 8:22 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Jan 30, 2008 11:20 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: but per page... Why don't you just answer then. Eelco - 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: Wrapping a POJO
Hi- thanks for the quick reply. My description probably wasn't clear enough. My problem is that I have several checkboxes in the interface that all map to a single Integer in the POJO. So there is not accessor that accepts a boolean, which is why I need some way to translate between the POJO and the model that backs the form. The wiki actually has an example that is somewhat similar (http://cwiki.apache.org/WICKET/listview-with-checkboxes.html) but only wraps a String. But coming to think of it, I can probably just access the POJO fields through the wrapper like this: wrapper.pojo.field. OK, I'll probably try this. Thanks again, -markus Zitat von Per Newgro [EMAIL PROTECTED]: Hi Markus, you simply have to provide the POJO to the CompoundPropertyModel. Provide simple PropertyModels related to the compound model for the fields. You can imagine the whole concept as the path to the value. Pojo myPojo = new Pojo(); IModel model = new CompoundPropertyModel(myPojo); IModel aPropertyModel = new PropertyModel(model, theNameOfAccessorInPojo); Label myPojoProperty = new Label(aWicketId, new aPropertyModel); I use a label. Replace it by your component. Cheers Per PS: If you new to wicket - checkout the wiki and the examples. They explain alot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message was sent using IMP, the Internet Messaging Program. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Workaround for AjaxEditableLabel yields java.lang.IllegalAccessError (WICKET-1239)?
i'm sorry this one slipped through. i commited Per's fix. Edvin, can you try with latest trunk to verify it's fixed? Done. It works good :) -- Edvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Monitoring Wicket using JAMon
no you dont need the threadlocal WebRequestCycle is already a thread local thats only used for one request so in your WebRequestCycle you can have a start time. (onBeginRequest) and then in onEndRequest you do your calculation. The problem that i see is that that time covers 2 things. 1 the request phase on the page of the component that is clicked on and the response page that could be again that same page but could also be a completely different one. So at that time you are testing 2 pages johan On Jan 31, 2008 1:32 PM, lars vonk [EMAIL PROTECTED] wrote: Hi thanks for the replies, Yes I want to do it per Page so I can monitor the performance per page. Here is how I implemented it, I am not sure if I always get the name of the Page name in the implementation of onEndRequest. (Allthough during tests I always got the name of the Page.) public class JAMonMonitoredWebRequestCycle extends WebRequestCycle { static final String UNIT = ms.; private ThreadLocalLong startTimes = new ThreadLocalLong(); public JAMonMonitoredWebRequestCycle(WebApplication application, WebRequest request, Response response) { super(application, request, response); } @Override protected void onBeginRequest() { super.onBeginRequest(); addStartTimeToThreadLocal(); } @Override protected void onEndRequest() { super.onEndRequest(); calculateDurationAndAddToMonitor(); } private void addStartTimeToThreadLocal() { startTimes.set(System.currentTimeMillis()); } private void calculateDurationAndAddToMonitor() { if(startTimes.get() != null) { Class? pageClass = null; if(getWebResponse().isAjax() getWebRequest().getPage() != null) { pageClass = getWebRequest().getPage().getClass(); } else { pageClass = getResponsePageClass(); } if(pageClass != null) { MonitorFactory.add(pageClass.toString(), UNIT, System.currentTimeMillis() - startTimes.get().doubleValue()); } startTimes.set(null); } } } I believe the Page to be rendered is not availble yet in the onBeginRequest so I use MonitorFactory.add() in the onEndRequest and store the startTime in a ThreadLocal. While typing this email I am thinking that WebRequestCycle is statefull so I probably do need the ThreadLocal right? Lars On Jan 30, 2008 8:22 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Jan 30, 2008 11:20 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: but per page... Why don't you just answer then. Eelco - 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: Wrapping a POJO
On Thu, Jan 31, 2008 at 01:18:50PM +0100, Maeder Thomas wrote: Why insist on a CompoundPropertyModel? My first instinct would be to create a custom model for the checkboxes (which sets/unsets a single bit). Thomas Agreed. Here's a model that I use to solve the same problem: public class BitmappedFlagModel implements IModel { private IModel bitmapModel; private int mask; public BitmappedFlagModel(IModel bitmapModel, int mask) { this.bitmapModel = bitmapModel; this.mask = mask; } public Object getObject() { return (getBitmap() mask) 0; } public void setObject(Object object) { int bitmap = getBitmap(); boolean b = ((Boolean) object).booleanValue(); if (b) { bitmap |= mask; } else { bitmap = ~mask; } bitmapModel.setObject(bitmap); } public void detach() { bitmapModel.detach(); } private int getBitmap() { return ((Integer) bitmapModel.getObject()).intValue(); } } Note that you can still use the CompoundPropertyModel for other properties: Form myForm = new Form(myForm, new CompoundPropertyModel(pojo)); myForm.add(new TextField(name)); myForm.add(new CheckBox(enabled, new BitmappedFlagModel( new PropertyModel(pojo, flags), FLAG_ENABLED))); jk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: London Wicket Users Group Event
We are going to have another high turn-out this month. There are several people who have registered but have not yet followed the simple instructions in our automated reply to confirm their registration. We will be giving Google a list of confirmed registrants so people can get in; please make sure you confirm your booking (or cancel it if your plans have changed, using the same link in the same automated email) so we can effectively manage the space available to us and also not cause our generous hosts unnecessary headaches regarding admission to their building. Regards - Cemal http://jWeekend.co.uk http://jWeekend.co.uk neo anderson wrote: May I forward this message to other people? I think that would be great for developers who are also interested in such event. Thank you very much. - Original Message From: jweekend [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Sunday, 30 December, 2007 9:51:35 PM Subject: London Wicket User Event The next London Wicket Event will be on Wednesday, February 6th, 2008. Keep an eye on the http://www.jweekend.com/dev/LWUGReg/ registration page for the updates. http://herebebeasties.com/ Al Maw 's going to demonstrate creation of an AJAXified drag and drop list editor. Ian Godman will tell us about his new, soon to be open-sourced Wicket security toolkit. I will deliver another topical presentation (subject TBD) too. There will also be a free prize-draw for access to http://martijndashorst.com/blog/ Martijn and http://chillenious.wordpress.com/ Eelco 's http://manning.com/dashorst/ Wicket In Action (MEAP). Register early (and don't forget to click on the confirmation link in the automated email to confirm or cancel) as we expect a good turn out and need to arrange a suitable location in good time. Those of you that kindly offered to host us should contact us http://www.jweekend.co.uk/dev/ContactUsBody/ here if this date suits you. Regards - Cemal http://jWeekend.co.uk http://jWeekend.co.uk -- View this message in context: http://www.nabble.com/London-Wicket-User-Event-tp14547280p14547280.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] __ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/London-Wicket-User-Event-tp14547280p15204436.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: Monitoring Wicket using JAMon
Response inline On Jan 31, 2008 2:24 PM, Johan Compagner [EMAIL PROTECTED] wrote: no you dont need the threadlocal WebRequestCycle is already a thread local thats only used for one request so in your WebRequestCycle you can have a start time. (onBeginRequest) and then in onEndRequest you do your calculation. Thanks for the explanation. The problem that i see is that that time covers 2 things. 1 the request phase on the page of the component that is clicked on and the response page that could be again that same page but could also be a completely different one. So at that time you are testing 2 pages I am not sure if I follow you here. What do you mean by testing two pages? Here is how I think it works (and want it to work): 1. User clicks on component on Page1 that will result in navigating to Page2. In this case JAMon shows: Page2 30ms. 2. User clicks on component on Page2 that will result in a refresh (ajax or not) of Page2. IN this case JAMon shows: Page2 30 ms. In my understanding I measure the time it takes to handle a complete request-respone cycle. Lars johan On Jan 31, 2008 1:32 PM, lars vonk [EMAIL PROTECTED] wrote: Hi thanks for the replies, Yes I want to do it per Page so I can monitor the performance per page. Here is how I implemented it, I am not sure if I always get the name of the Page name in the implementation of onEndRequest. (Allthough during tests I always got the name of the Page.) public class JAMonMonitoredWebRequestCycle extends WebRequestCycle { static final String UNIT = ms.; private ThreadLocalLong startTimes = new ThreadLocalLong(); public JAMonMonitoredWebRequestCycle(WebApplication application, WebRequest request, Response response) { super(application, request, response); } @Override protected void onBeginRequest() { super.onBeginRequest(); addStartTimeToThreadLocal(); } @Override protected void onEndRequest() { super.onEndRequest(); calculateDurationAndAddToMonitor(); } private void addStartTimeToThreadLocal() { startTimes.set(System.currentTimeMillis()); } private void calculateDurationAndAddToMonitor() { if(startTimes.get() != null) { Class? pageClass = null; if(getWebResponse().isAjax() getWebRequest().getPage() != null) { pageClass = getWebRequest().getPage().getClass(); } else { pageClass = getResponsePageClass(); } if(pageClass != null) { MonitorFactory.add(pageClass.toString(), UNIT, System.currentTimeMillis() - startTimes.get().doubleValue()); } startTimes.set(null); } } } I believe the Page to be rendered is not availble yet in the onBeginRequest so I use MonitorFactory.add() in the onEndRequest and store the startTime in a ThreadLocal. While typing this email I am thinking that WebRequestCycle is statefull so I probably do need the ThreadLocal right? Lars On Jan 30, 2008 8:22 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Jan 30, 2008 11:20 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: but per page... Why don't you just answer then. Eelco - 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: Monitoring Wicket using JAMon
I am not sure if I follow you here. What do you mean by testing two pages? Here is how I think it works (and want it to work): 1. User clicks on component on Page1 that will result in navigating to Page2. In this case JAMon shows: Page2 30ms. 2. User clicks on component on Page2 that will result in a refresh (ajax or not) of Page2. IN this case JAMon shows: Page2 30 ms. yes in situation 2 you are testing page2 completely, so the request phase (handling of the click event) and the response phase (the render of page2) but in situation 1 you are testing the request phase of page1 (the click event) and then the rendering of pag2 (thats the respond) And it all depends what takes a lot of time, is it the render because loads of new data is queried from the db with loads of stuff on the page. Or is it the action that does a heavy query or other backend action? johan
Re: Sorting using a DataTable
On Wednesday 30 January 2008, Karen Schaper escreveu: Hello, I am using a SortableDataProvider with a DefaultDataTable. From my understanding, it seems that for every column that I wish to sort on, I need to add code to the iterator method of the data provider. None of the columns were sorting and when I added some code in the iterator method (see below) I was able to sort on the street column. Is this the best way to sort columns? I am using wicket 1.3. it might be better to use that sorting info to get the data from the db in the right sort order. Thanks Karen iterator method from a SortableDataProvider public Iterator iterator( int first, int count ){ final SortParam sp = getSort(); EventList list = getInterruptionList(); if ( sp.getProperty().equals(street) ){ Collections.sort(list, new Comparator() { public int compare(Object arg0, Object arg1){ if ( sp.isAscending() ) return ((Interrupt)arg0).getStreet().compareTo(((Interrupt)arg1).getStreet()); else return ((Interrupt)arg1).getStreet().compareTo(((Interrupt)arg0).getStreet()); } }); } return list.listIterator( first ); } - 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: Wrapping a POJO
Hi- thanks, that's just what I was looking for. Somehow all the wrapping of models inside of models still doesn't come naturally to me. -markus Am 31.01.2008 um 14:16 schrieb John Krasnay: On Thu, Jan 31, 2008 at 01:18:50PM +0100, Maeder Thomas wrote: Why insist on a CompoundPropertyModel? My first instinct would be to create a custom model for the checkboxes (which sets/unsets a single bit). Thomas Agreed. Here's a model that I use to solve the same problem: public class BitmappedFlagModel implements IModel { private IModel bitmapModel; private int mask; public BitmappedFlagModel(IModel bitmapModel, int mask) { this.bitmapModel = bitmapModel; this.mask = mask; } public Object getObject() { return (getBitmap() mask) 0; } public void setObject(Object object) { int bitmap = getBitmap(); boolean b = ((Boolean) object).booleanValue(); if (b) { bitmap |= mask; } else { bitmap = ~mask; } bitmapModel.setObject(bitmap); } public void detach() { bitmapModel.detach(); } private int getBitmap() { return ((Integer) bitmapModel.getObject()).intValue(); } } Note that you can still use the CompoundPropertyModel for other properties: Form myForm = new Form(myForm, new CompoundPropertyModel(pojo)); myForm.add(new TextField(name)); myForm.add(new CheckBox(enabled, new BitmappedFlagModel( new PropertyModel(pojo, flags), FLAG_ENABLED))); jk - 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: how to prevent session timeouts
1 yes make the form in your login page a statelessform. 2 use a ajax poller. Just poll the server once in every x minutes johan On Feb 1, 2008 2:36 AM, Maris Orbidans [EMAIL PROTECTED] wrote: hi I have created a small web application with wicket - http://cdzfmobile.bf.lu.lv There are some minor issues related with session timeouts: 1) If I open login page and wait until session expires then I get session expired error message if I try to login. How can I fix that ? Should I make login page stateless ? 2) And I would like to prevent session timeouts as long as user has web page opened in browser. Is there any ajax component that sends requests periodically to server thus refreshing session ? Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap
I have just started encountering this issue with one of my Wicket apps. Seems to have cropped up now that I am using the 1.3 rc1 (will be moving to release this Friday), but this could wholly be coincidence. What I have noticed is, for me at least, this only happens on my Weblogic servers (9.2) and not in my local dev environment running Jetty. The Weblogic logs reveal that after manually stopping a page load or after a page timeout, threads go into a [STUCK] status and, I am theorizing, locking the pagemap indefinitely. Thanks, -scott -Original Message- From: cemeterygate [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 10:51 AM To: users@wicket.apache.org Subject: Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap that's right, i am screwed anyway if request takes too long, but from the browser user decide to give up current search by click the stop button and fire a new search. Since the pagemap is still locked by previous request, the second request will have to wait. sounds like i will end up handle this senario by pulling. is it possible to have a page that's not single thread model? Can we have two interface, such as SingleThreadPage, and ConcurrentThreadPage? igor.vaynberg wrote: yeah, if it takes a while the browser will timeout and you are screwed anyways... what do you mean they cant start a new search? you mean they no longer for the results of the currently running search and just press the search button again? if they would open a new tab with the search page, and you had automultiwindowsupport option enabled that new opened page would be created in a new pagemap, and so you wouldnt have a locking problem... -igor On Jan 28, 2008 2:51 PM, Johan Compagner [EMAIL PROTECTED] wrote: shared resources are not synced thats one way of going round it. the other way is as igor describes. do the search in a seperate thread. If it really takes that long then you do know that browsers also can just time out after they don't get anything for a while? If it really takes that long then you should build a page where people can fire searches to the system and the page is just displayig the searches they did and then if the search is finished that page can bring them to the result johan On Jan 28, 2008 11:46 PM, cemeterygate [EMAIL PROTECTED] wrote: that's nice to have but is there a way to work around this issue? Our application for customer service and they perform a lot search on a huge database, in some cases, customer service would like to start new search. Since wicket is locked by page path, there is no way for CSR to start a new request until previous one is finished. igor.vaynberg wrote: the pages are locked on the pagemap. so you cannot have two concurrent requests from the same user to the same pagemap. this is so when you are coding your pages you can use the much simpler single-threaded model. every have fields in your servlet implementation? those have to be synchronized or you will run into threading issues. this is the stuff we make sure you dont have to worry about. the trade off is that if you have long running requests you should probably process them in a different thread and let the UI poll for status. -igor On Jan 28, 2008 2:08 PM, cemeterygate [EMAIL PROTECTED] wrote: So I developed my first wicket application and I kept getting exception below as soon as i point my application to production database. Can someone tell me why wicket can't handle concurrent request? to replicate this issue, i have a page with a form component and regular submit button. on the onSubmit method, protected void onSubmit() { try { Thread.sleep(3 * 60 * 1000); } catch (InterruptedException e) { } } i put the thread into sleep for 3 minutes. I hit submit, then stop the request on browser and submit another request. then result to a internal error page. Why can't wicket handle mutiple submit? i dont' get it, shouldn't wicket process the new require like how servlet works? Someone please tell me how to work around this issue. Thanks in advance. 2008-01-25 14:45:05,443 ERROR [org.apache.wicket.RequestCycle] - After 1 minute the Pagemap null is still locked by: Thread[resin-tcp-connection-*:8080-45,5,main], giving up trying to get the page for path: 5 org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is still locked by: Thread[resin-tcp-connection-*:8080-45,5,main], giving up trying to get the page for path: 5 at org.apache.wicket.Session.getPage(Session.java:734) at
Re: is there wicket had per-defined the Thread for the form component
how do you show the modal dialog?? Normally the modal dialog is only shown by an ajax link. I guess you show it on onload event. Then yes the page will first load itself then call onload and then the modal window will show itself johan On Jan 31, 2008 6:16 AM, kenixwong [EMAIL PROTECTED] wrote: hi, for the above case, for example... my page constructor: i add the component ( modal window, feedBackPanel, form ) . Once i load the page, why the modal window will only display when the page is finish loaded. Is that the wicket had default set the main thread for the form component? Thanks in advance -- View this message in context: http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198385.html Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to prevent session timeouts
hi I have created a small web application with wicket - http://cdzfmobile.bf.lu.lv There are some minor issues related with session timeouts: 1) If I open login page and wait until session expires then I get session expired error message if I try to login. How can I fix that ? Should I make login page stateless ? 2) And I would like to prevent session timeouts as long as user has web page opened in browser. Is there any ajax component that sends requests periodically to server thus refreshing session ? Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap
Ah, the wonders of Weblogic. My first Wicket app runs on Weblogic. A big problem was that the datasource connection fell away after some time of inactivity. We solved it by letting Weblogic run a test query every x minutes. We also ran into very long lasting queries. Where database optimizations didn't help, we solved that by simply not allowing complex queries. Anyway, you should never let the pagelock expire. Wicket 1.2.* blows up on you. I guess this is still the case. Regards, Erik. Weaver, Scott wrote: I have just started encountering this issue with one of my Wicket apps. Seems to have cropped up now that I am using the 1.3 rc1 (will be moving to release this Friday), but this could wholly be coincidence. What I have noticed is, for me at least, this only happens on my Weblogic servers (9.2) and not in my local dev environment running Jetty. The Weblogic logs reveal that after manually stopping a page load or after a page timeout, threads go into a [STUCK] status and, I am theorizing, locking the pagemap indefinitely. Thanks, -scott -Original Message- From: cemeterygate [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 29, 2008 10:51 AM To: users@wicket.apache.org Subject: Re: Pagemap null is still locked by blah exception, help!! why does wicket have to lock the pagemap that's right, i am screwed anyway if request takes too long, but from the browser user decide to give up current search by click the stop button and fire a new search. Since the pagemap is still locked by previous request, the second request will have to wait. sounds like i will end up handle this senario by pulling. is it possible to have a page that's not single thread model? Can we have two interface, such as SingleThreadPage, and ConcurrentThreadPage? igor.vaynberg wrote: yeah, if it takes a while the browser will timeout and you are screwed anyways... what do you mean they cant start a new search? you mean they no longer for the results of the currently running search and just press the search button again? if they would open a new tab with the search page, and you had automultiwindowsupport option enabled that new opened page would be created in a new pagemap, and so you wouldnt have a locking problem... -igor On Jan 28, 2008 2:51 PM, Johan Compagner [EMAIL PROTECTED] wrote: shared resources are not synced thats one way of going round it. the other way is as igor describes. do the search in a seperate thread. If it really takes that long then you do know that browsers also can just time out after they don't get anything for a while? If it really takes that long then you should build a page where people can fire searches to the system and the page is just displayig the searches they did and then if the search is finished that page can bring them to the result johan On Jan 28, 2008 11:46 PM, cemeterygate [EMAIL PROTECTED] wrote: that's nice to have but is there a way to work around this issue? Our application for customer service and they perform a lot search on a huge database, in some cases, customer service would like to start new search. Since wicket is locked by page path, there is no way for CSR to start a new request until previous one is finished. igor.vaynberg wrote: the pages are locked on the pagemap. so you cannot have two concurrent requests from the same user to the same pagemap. this is so when you are coding your pages you can use the much simpler single-threaded model. every have fields in your servlet implementation? those have to be synchronized or you will run into threading issues. this is the stuff we make sure you dont have to worry about. the trade off is that if you have long running requests you should probably process them in a different thread and let the UI poll for status. -igor On Jan 28, 2008 2:08 PM, cemeterygate [EMAIL PROTECTED] wrote: So I developed my first wicket application and I kept getting exception below as soon as i point my application to production database. Can someone tell me why wicket can't handle concurrent request? to replicate this issue, i have a page with a form component and regular submit button. on the onSubmit method, protected void onSubmit() { try { Thread.sleep(3 * 60 * 1000); } catch (InterruptedException e) { } } i put the thread into sleep for 3
Re: Simple edit form and models
there is wicketstuff-crud project in wicketstuff that generates all four crud views -igor On Jan 31, 2008 3:28 AM, Constantin Y [EMAIL PROTECTED] wrote: Nice work Ned! Actually this approach is very close to what i am trying to do. Thanks a lot Ned Collyer wrote: You may be interested in something like the bean editor webcast linked from here http://herebebeasties.com/2007-08-17/wicket-bean-editor/ With a bit of customisation you should be able to bend it to suit your needs for any of your pojos. Rgds Ned Constantin Y wrote: First of all I want to congratulate Wicket guys for their work. Until today I have developed applications based mainly on SWT/RCP and JSP/Servlets. Currently we are evaluating various frameworks in order to initiate a new project, which will expose many of our in-house developed system (SWT/RCP) functions through web. It seems that Wicket is very close to what we are looking for, because more or less we have the same logic in our gui applications. I am trying to create a common template for edit forms responsible to edit properties of a single pojo. In general, I want to have fool control over the synchronization between the form's data and pojo's fields. I am posting some simple code. I would appreciate if anyone has the time to take a look and tell me if I am following a right approach about the models and the binding technique. -- View this message in context: http://www.nabble.com/Simple-edit-form-and-models-tp15186893p15202600.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: how to prevent session timeouts
im working on the same thing. how to make form stateless? 1 yes make the form in your login page a statelessform. 2 use a ajax poller. Just poll the server once in every x minutes johan On Feb 1, 2008 2:36 AM, Maris Orbidans [EMAIL PROTECTED] wrote: hi I have created a small web application with wicket - http://cdzfmobile.bf.lu.lv There are some minor issues related with session timeouts: 1) If I open login page and wait until session expires then I get session expired error message if I try to login. How can I fix that ? Should I make login page stateless ? 2) And I would like to prevent session timeouts as long as user has web page opened in browser. Is there any ajax component that sends requests periodically to server thus refreshing session ? Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to prevent session timeouts
StatelessForm ? On Jan 31, 2008 5:14 PM, i ii [EMAIL PROTECTED] wrote: im working on the same thing. how to make form stateless? 1 yes make the form in your login page a statelessform. 2 use a ajax poller. Just poll the server once in every x minutes johan On Feb 1, 2008 2:36 AM, Maris Orbidans [EMAIL PROTECTED] wrote: hi I have created a small web application with wicket - http://cdzfmobile.bf.lu.lv There are some minor issues related with session timeouts: 1) If I open login page and wait until session expires then I get session expired error message if I try to login. How can I fix that ? Should I make login page stateless ? 2) And I would like to prevent session timeouts as long as user has web page opened in browser. Is there any ajax component that sends requests periodically to server thus refreshing session ? Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TreeTable icons and customization
Hi all i've found several threads about this subject, but none of them really helped me with the issue i'm dealing rigth now... I want to customize icons for the TreeTable, but i need to put images in a specific path and i would prefer not to hard code image names. So, question is: How can i reference an image with an specific path, _different_ from container-class package? My class is com.foo.LabelIconPanel and my image is in /images/icons/bla.gif I've looking in ResourceReference (the object used by LinkIconPanel) but i cant find a way to do this. About hard-code or not hard-code, i already solve a similar problem putting special/custom wicket tags in html. And, for example, to set alternate styles to different rows ina table, i wrote table tr wicket:id=myTable wicket:rowStyle=rowStyle wicket:alternateStyle=rowAlternateStyle td.../td /tr /table Then, in MyTable.java, i access the attributes with getMarkupAttributes().get(wicket:rowStyle) What do you think? Thanks in advance! Juan
RE: how to prevent session timeouts
i mean stateless page Date: Thu, 31 Jan 2008 18:00:58 +0100 From: [EMAIL PROTECTED] To: users@wicket.apache.org Subject: Re: how to prevent session timeouts StatelessForm ? On Jan 31, 2008 5:14 PM, i ii [EMAIL PROTECTED] wrote: im working on the same thing. how to make form stateless? 1 yes make the form in your login page a statelessform. 2 use a ajax poller. Just poll the server once in every x minutes johan On Feb 1, 2008 2:36 AM, Maris Orbidans [EMAIL PROTECTED] wrote: hi I have created a small web application with wicket - http://cdzfmobile.bf.lu.lv There are some minor issues related with session timeouts: 1) If I open login page and wait until session expires then I get session expired error message if I try to login. How can I fix that ? Should I make login page stateless ? 2) And I would like to prevent session timeouts as long as user has web page opened in browser. Is there any ajax component that sends requests periodically to server thus refreshing session ? Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Workaround for AjaxEditableLabel yields java.lang.IllegalAccessError (WICKET-1239)?
Nice! Thank you Gerolf. /Per Gerolf Seitz wrote: i'm sorry this one slipped through. i commited Per's fix. Edvin, can you try with latest trunk to verify it's fixed? gerolf On Jan 31, 2008 8:53 AM, Edvin Syse [EMAIL PROTECTED] wrote: Advanced Technology(R) skrev: Check Per solution : http://www.nabble.com/AjaxEditableLabel-in-1.3.0-tp14675483p14687720.html Thanks! Worked like a charm. For some reason this didn't make it into 1.3.1, though.. -- Edvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Workaround-for-%22AjaxEditableLabel-yields-java.lang.IllegalAccessError-%28WICKET-1239%29%22--tp15193816p15211776.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 prevent session timeouts
again use a statelessform as your form. if you use all stateless components on your page then you page is stateless On Jan 31, 2008 7:22 PM, i ii [EMAIL PROTECTED] wrote: i mean stateless page Date: Thu, 31 Jan 2008 18:00:58 +0100 From: [EMAIL PROTECTED] To: users@wicket.apache.org Subject: Re: how to prevent session timeouts StatelessForm ? On Jan 31, 2008 5:14 PM, i ii [EMAIL PROTECTED] wrote: im working on the same thing. how to make form stateless? 1 yes make the form in your login page a statelessform. 2 use a ajax poller. Just poll the server once in every x minutes johan On Feb 1, 2008 2:36 AM, Maris Orbidans [EMAIL PROTECTED] wrote: hi I have created a small web application with wicket - http://cdzfmobile.bf.lu.lv There are some minor issues related with session timeouts: 1) If I open login page and wait until session expires then I get session expired error message if I try to login. How can I fix that ? Should I make login page stateless ? 2) And I would like to prevent session timeouts as long as user has web page opened in browser. Is there any ajax component that sends requests periodically to server thus refreshing session ? Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TreeTable icons and customization
you can override LabelIconPanel#newImageComponent and create a WebMarkupContainer instead of an ImageContainer. on the WebMarkupContainer override onComponentTag and set the src attribute to where your image is. -Matej On Jan 31, 2008 7:03 PM, Juan Gabriel Arias [EMAIL PROTECTED] wrote: Hi all i've found several threads about this subject, but none of them really helped me with the issue i'm dealing rigth now... I want to customize icons for the TreeTable, but i need to put images in a specific path and i would prefer not to hard code image names. So, question is: How can i reference an image with an specific path, _different_ from container-class package? My class is com.foo.LabelIconPanel and my image is in /images/icons/bla.gif I've looking in ResourceReference (the object used by LinkIconPanel) but i cant find a way to do this. About hard-code or not hard-code, i already solve a similar problem putting special/custom wicket tags in html. And, for example, to set alternate styles to different rows ina table, i wrote table tr wicket:id=myTable wicket:rowStyle=rowStyle wicket:alternateStyle=rowAlternateStyle td.../td /tr /table Then, in MyTable.java, i access the attributes with getMarkupAttributes().get(wicket:rowStyle) What do you think? Thanks in advance! Juan -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Making your webapp thread safe
Ok, I’ve asked this at least twice already but I’m still incredibly unsure of how to make my webapp thread safe. So this time I thought I’d take a different approach. I wrote on the wiki a short, unrelated example: http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration Is this example thread safe? If it isn’t, please EDIT THE EXAMPLE TO MAKE IT SO. That way I can finally see a *complete* example of a thread safe webapp. Thanks a lot for any help ☺ Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making your webapp thread safe
that looks fine i would throw a RestartResponseException in youre forcelogin method On Jan 31, 2008 8:48 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Ok, I've asked this at least twice already but I'm still incredibly unsure of how to make my webapp thread safe. So this time I thought I'd take a different approach. I wrote on the wiki a short, unrelated example: http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration Is this example thread safe? If it isn't, please EDIT THE EXAMPLE TO MAKE IT SO. That way I can finally see a *complete* example of a thread safe webapp. Thanks a lot for any help ☺ Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
log4j and commons.digester on tomcat
Eclipse crashed, and afterwards I seem to be unable to deploy my wicket app on tomcat. During deployment the digester component complains about not being able to find its logger, and my application SummerProgram fails to start. The other deployed apps (non-wicket) seem ok. I've spent the past hour searching google and the mailing list archives. It seems to come up with tomcat occasionally, but the only suggestions have been to make sure that the log4j jar isn't in the tomcat shared/lib or common/lib directory, and in my case it's not. Any ideas? Arg, Alex The relevant tomcat log: INFO: Starting service Catalina Jan 31, 2008 3:58:09 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.25 Jan 31, 2008 3:58:09 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). log4j:WARN Please initialize the log4j system properly. Jan 31, 2008 3:58:10 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 31, 2008 3:58:10 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/SummerProgram] startup failed due to previous errors - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HybridURLCodingStrategies vs others
Thanks for the follow up Matej, it does clarify certain things..but commenting on your last point, as you said earlier..the links/buttons (bind to any event) have the pageId in them irrespective of whether the page is loaded through BUCS or HUCS, so even in case of BUCS we still would have the pageId on an event-invocation, so why cant the page (in session be retrieved based on the pageId with those links) and be forward to.. Matej Knopp-2 wrote: On Jan 30, 2008 1:36 AM, mfs [EMAIL PROTECTED] wrote: When u say it attempts to reuse existing page instance (when pageid in session matches the class specified by mount point). - you mean the pageid in the URL (and not session) matches the class specified by the mount path ? No. The pageId in url is of course used to retrieve page instance from session which is then tested to match the mount point. - So other strategies are there to provide relatively clean-er url ? (i.e. without pageId and version info) what other reasons would be there to use the non-HUCS, i wonder what happens to existing the page instances ? Nothing new page instance is created, that doesn't affect the old page instances at all. - Creating a new page-instance for every call, doesnt that break the back button support ? arent we compromising the wicket functionality of maintaining page-history by creating a new page instance every time and not using the existing ones ? What do you mean by every call? New page instance is created on every request with regular bookmarkable URL. That doesn't affect back button at all becaue all page instance relative urls (listener interface, e.g. clicking a link on page) are not bookmarkable and contain the page instance id. Only when you refresh the page (while still having the bookmarkable url in url bar) new page instance is created. - Last but not the least when i read that all other strategies other than HUCS doesnt preserve the mount path after a listener is invoked on that page sounded like a bug to me, i mean why cant the mount path be preserved using the same strategy ?, with that a person is bound to use HUCS although he prefers to keep to BookMarkableUCS since its more clean in terms of displayed url. That's the point. The regular URL conding strategies don't insert page instance in URL. So after clicking a link there is no way to redirect to bookmarkable URL while still displaying the same page. That's the whole reason for hybridurlcodingstrategy. -Matej Matej Knopp-2 wrote: Hi, the other strategies always create new page instance. The difference with hybridurlcodingstrategy is that it attempts to reuse existing page instance (when pageid in session matches the class specified by mount point). -Matej On Jan 29, 2008 11:36 PM, mfs [EMAIL PROTECTED] wrote: Guys, I believe its just the HybridURLCodingStrategy and its subclasses (IndexHUCS) which encodes the mount point, page parameters and page instance information into the URL whereas others strategies DO have the mount-point page-param in them (encoded in a different way) BUT the page-instance info (i.e. page-id/version) is not contained in the URL. I wonder why is this page-info not required by other strategies, wouldnt it be need to locate the older pages AND IF NOT how does it work for them...cant it work in a similar way for HUCS where we dont have those numbers in the url... Thanks in advance -- View this message in context: http://www.nabble.com/HybridURLCodingStrategies-vs-others-tp15171137p15171137.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] -- Resizable and reorderable grid components. http://www.inmethod.com -- View this message in context: http://www.nabble.com/HybridURLCodingStrategies-vs-others-tp15171137p15173060.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] -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/HybridURLCodingStrategies-vs-others-tp15171137p15214950.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]
Changing the HTML associated with a Page
By default, Wicket associates a page class Foo with the HTML in Foo.html. How can I change that? IOW, I want Foo.java to render Bar.html. Sri -- View this message in context: http://www.nabble.com/Changing-the-HTML-associated-with-a-Page-tp15214956p15214956.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Changing the HTML associated with a Page
See org.apache.wicket.examples.customresourceloading Eelco On Jan 31, 2008 1:26 PM, Sri Sankaran [EMAIL PROTECTED] wrote: By default, Wicket associates a page class Foo with the HTML in Foo.html. How can I change that? IOW, I want Foo.java to render Bar.html. Sri -- View this message in context: http://www.nabble.com/Changing-the-HTML-associated-with-a-Page-tp15214956p15214956.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: log4j and commons.digester on tomcat
Well, solved it at last. Finally looked in my output directory and saw that it was totally empty. That was the real problem -- no class files -- but the lack of tomcat logging (or selective logging to system.out) hid that well. Clean build didn't help. Replacing eclipse config files with older versions from CVS didn't help. Trashing my ~/.eclipse didn't help. Still no class files were generated by eclipse. Changing the output directory and then changing it back finally resolved it. Did I say arg? Alex On Jan 31, 2008, at 4:06 PM, Alex Jacoby wrote: Eclipse crashed, and afterwards I seem to be unable to deploy my wicket app on tomcat. During deployment the digester component complains about not being able to find its logger, and my application SummerProgram fails to start. The other deployed apps (non-wicket) seem ok. I've spent the past hour searching google and the mailing list archives. It seems to come up with tomcat occasionally, but the only suggestions have been to make sure that the log4j jar isn't in the tomcat shared/lib or common/lib directory, and in my case it's not. Any ideas? Arg, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Making your webapp thread safe
I've been told by many people that the Session object is not thread safe. If that's true, I don't think the example can be thread safe. RestartResponseException does not allow you to redirect to an external URL (that's what that method does). That's why I can't use it. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 12:18 PM To: users@wicket.apache.org Subject: Re: Making your webapp thread safe that looks fine i would throw a RestartResponseException in youre forcelogin method On Jan 31, 2008 8:48 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Ok, I've asked this at least twice already but I'm still incredibly unsure of how to make my webapp thread safe. So this time I thought I'd take a different approach. I wrote on the wiki a short, unrelated example: http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration Is this example thread safe? If it isn't, please EDIT THE EXAMPLE TO MAKE IT SO. That way I can finally see a *complete* example of a thread safe webapp. Thanks a lot for any help ☺ Dan - 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 delete an item from List view.
Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } can please help out ?? -- View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15217608.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]
Wicket Stuff examples website OOMEs (PermGen space)
Apologies if this isn't the right place to report it, but the Wicket Stuff examples JVM is currently throwing OutOfMemoryErrors. For example from http://wicketstuff.org/wicket13/helloworld/ : [..] description The server encountered an internal error () that prevented it from fulfilling this request. [..] exception javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.OutOfMemoryError: PermGen space [..] --Brad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can wicket application also generate JavaScript and Html files like GWT?
I am just wondering if Wicket applications also somehow capable of generating html/JavaScript files from code base, it can be great for people who want to write application which works in both .NET and J2EE world, any pointers will be appreciated here. -- Thanks Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Re: How to delete an item from List view.
show us how you populate your listview... -igor On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } can please help out ?? -- View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15217608.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: Wicket Stuff examples website OOMEs (PermGen space)
johan, can you bump up the permgen memory some more? we have too many damn things running on that tomcat instance... -igor On Jan 31, 2008 4:55 PM, Brad Fritz [EMAIL PROTECTED] wrote: Apologies if this isn't the right place to report it, but the Wicket Stuff examples JVM is currently throwing OutOfMemoryErrors. For example from http://wicketstuff.org/wicket13/helloworld/ : [..] description The server encountered an internal error () that prevented it from fulfilling this request. [..] exception javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.OutOfMemoryError: PermGen space [..] --Brad - 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: How to delete an item from List view.
Hi, Following is my code for rendering vehicle list- final VehiclesList vehicles = new VehiclesList(vehicledetails, ((RatingRequestAuto)getModelObject()).getVehicles()); vehicles.setOutputMarkupId(true); vehicles.setReuseItems(true); add(vehicles); private static class VehiclesList extends ListView { public VehiclesList (String id, List vehicles) { super (id, vehicles); } protected void populateItem(final ListItem item) { item.add(new TextField(vehicle.modelText, new PropertyModel(vehicle, model)).setRequired(true)); TextField registrationnumber = new TextField(vehicle.registrationnumber, new PropertyModel(vehicle, registrationNumber)); TextField engineNumber = new TextField(vehicle.enginenumber, new PropertyModel(vehicle, engineNumber)); final int index = item.getIndex(); Button remVehBtn = new Button(btn_removeVeh, new ResourceModel( removevehicle )) { public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } }); } } Thanks a lot for ur reply :) igor.vaynberg wrote: show us how you populate your listview... -igor On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } can please help out ?? -- View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15217608.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/How-to-delete-an-item-from-List-view.-tp15217608p15218960.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 delete an item from List view.
vehicles.setReuseItems(true); == that is what is causing your list to reuse old components -igor On Jan 31, 2008 5:36 PM, pnerkar [EMAIL PROTECTED] wrote: Hi, Following is my code for rendering vehicle list- final VehiclesList vehicles = new VehiclesList(vehicledetails, ((RatingRequestAuto)getModelObject()).getVehicles()); vehicles.setOutputMarkupId(true); vehicles.setReuseItems(true); add(vehicles); private static class VehiclesList extends ListView { public VehiclesList (String id, List vehicles) { super (id, vehicles); } protected void populateItem(final ListItem item) { item.add(new TextField(vehicle.modelText, new PropertyModel(vehicle, model)).setRequired(true)); TextField registrationnumber = new TextField(vehicle.registrationnumber, new PropertyModel(vehicle, registrationNumber)); TextField engineNumber = new TextField(vehicle.enginenumber, new PropertyModel(vehicle, engineNumber)); final int index = item.getIndex(); Button remVehBtn = new Button(btn_removeVeh, new ResourceModel( removevehicle )) { public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } }); } } Thanks a lot for ur reply :) igor.vaynberg wrote: show us how you populate your listview... -igor On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } can please help out ?? -- View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15217608.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/How-to-delete-an-item-from-List-view.-tp15217608p15218960.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: How to delete an item from List view.
Hi igor, But If I remove setReuseItems(true), it'll remove all field values which user has entered will be removed. Bcz default processing is false for Remove button (Sorry forget to tell you) I just want to remove vehicle2, but the values entered for vehicle1 vehicle3 should not be lost. - Pnerkar igor.vaynberg wrote: vehicles.setReuseItems(true); == that is what is causing your list to reuse old components -igor On Jan 31, 2008 5:36 PM, pnerkar [EMAIL PROTECTED] wrote: Hi, Following is my code for rendering vehicle list- final VehiclesList vehicles = new VehiclesList(vehicledetails, ((RatingRequestAuto)getModelObject()).getVehicles()); vehicles.setOutputMarkupId(true); vehicles.setReuseItems(true); add(vehicles); private static class VehiclesList extends ListView { public VehiclesList (String id, List vehicles) { super (id, vehicles); } protected void populateItem(final ListItem item) { item.add(new TextField(vehicle.modelText, new PropertyModel(vehicle, model)).setRequired(true)); TextField registrationnumber = new TextField(vehicle.registrationnumber, new PropertyModel(vehicle, registrationNumber)); TextField engineNumber = new TextField(vehicle.enginenumber, new PropertyModel(vehicle, engineNumber)); final int index = item.getIndex(); Button remVehBtn = new Button(btn_removeVeh, new ResourceModel( removevehicle )) { public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } }); } } Thanks a lot for ur reply :) igor.vaynberg wrote: show us how you populate your listview... -igor On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } can please help out ?? -- View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15217608.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/How-to-delete-an-item-from-List-view.-tp15217608p15218960.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/How-to-delete-an-item-from-List-view.-tp15217608p15219402.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: Article: Introducing Apache Wicket
Question on detachable models: You use detachable models in the contact edit page. It seems like this would cause your changes to be lost if the edit process takes more than one request to complete. If you use the no-arg constructor, the loadableDetachableModel creates a new contact at the beginning of every request. If you enter a name that's too long, a validation message is displayed. Then the detach() is called on the model, and a new Contact is loaded on the next request, erasing your temporary changes. I may well be misunderstanding something, I'm fairly new to this stuff. It seems that for edit pages you want a non-detachable model, which gets serialized to the session. Thanks for taking the time to write this article, and thanks in advance for any clarification on this topic. -- Sam Barnum 360 Works http://www.360works.com 415.865.0952 On Jan 28, 2008, at 11:02 AM, Nick Heudecker wrote: It's finally up: http://www.theserverside.com/news/thread.tss?thread_id=48234 Thanks to the various reviewers that helped improve both the content and quality of the article, including Martijn, Eelco, Igor, Gerolf and Talios. -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
Re: How to delete an item from List view.
try this: onpopulate (final listitem item) { add(new link(remove) { onclick() { item.getparent().remove(item); }} } -igor On Jan 31, 2008 6:19 PM, pnerkar [EMAIL PROTECTED] wrote: Hi igor, But If I remove setReuseItems(true), it'll remove all field values which user has entered will be removed. Bcz default processing is false for Remove button (Sorry forget to tell you) I just want to remove vehicle2, but the values entered for vehicle1 vehicle3 should not be lost. - Pnerkar igor.vaynberg wrote: vehicles.setReuseItems(true); == that is what is causing your list to reuse old components -igor On Jan 31, 2008 5:36 PM, pnerkar [EMAIL PROTECTED] wrote: Hi, Following is my code for rendering vehicle list- final VehiclesList vehicles = new VehiclesList(vehicledetails, ((RatingRequestAuto)getModelObject()).getVehicles()); vehicles.setOutputMarkupId(true); vehicles.setReuseItems(true); add(vehicles); private static class VehiclesList extends ListView { public VehiclesList (String id, List vehicles) { super (id, vehicles); } protected void populateItem(final ListItem item) { item.add(new TextField(vehicle.modelText, new PropertyModel(vehicle, model)).setRequired(true)); TextField registrationnumber = new TextField(vehicle.registrationnumber, new PropertyModel(vehicle, registrationNumber)); TextField engineNumber = new TextField(vehicle.enginenumber, new PropertyModel(vehicle, engineNumber)); final int index = item.getIndex(); Button remVehBtn = new Button(btn_removeVeh, new ResourceModel( removevehicle )) { public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } }); } } Thanks a lot for ur reply :) igor.vaynberg wrote: show us how you populate your listview... -igor On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } can please help out ?? -- View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15217608.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/How-to-delete-an-item-from-List-view.-tp15217608p15218960.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/How-to-delete-an-item-from-List-view.-tp15217608p15219402.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: Article: Introducing Apache Wicket
if there is a form error then the changes are never applied to the pojo in the first place. wicket's form workflow is atomic - the model object is ever updated when all required,type conversion,validation was successful on all form components in the form. if something failed wicket will keep the input and display it again when the form is rerendered. makes sense? -igor On Jan 31, 2008 6:42 PM, Sam Barnum [EMAIL PROTECTED] wrote: Question on detachable models: You use detachable models in the contact edit page. It seems like this would cause your changes to be lost if the edit process takes more than one request to complete. If you use the no-arg constructor, the loadableDetachableModel creates a new contact at the beginning of every request. If you enter a name that's too long, a validation message is displayed. Then the detach() is called on the model, and a new Contact is loaded on the next request, erasing your temporary changes. I may well be misunderstanding something, I'm fairly new to this stuff. It seems that for edit pages you want a non-detachable model, which gets serialized to the session. Thanks for taking the time to write this article, and thanks in advance for any clarification on this topic. -- Sam Barnum 360 Works http://www.360works.com 415.865.0952 On Jan 28, 2008, at 11:02 AM, Nick Heudecker wrote: It's finally up: http://www.theserverside.com/news/thread.tss?thread_id=48234 Thanks to the various reviewers that helped improve both the content and quality of the article, including Martijn, Eelco, Igor, Gerolf and Talios. -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Article: Introducing Apache Wicket
Answer inline. On Jan 31, 2008 8:42 PM, Sam Barnum [EMAIL PROTECTED] wrote: Question on detachable models: You use detachable models in the contact edit page. It seems like this would cause your changes to be lost if the edit process takes more than one request to complete. If you use the no-arg constructor, the loadableDetachableModel creates a new contact at the beginning of every request. If you enter a name that's too long, a validation message is displayed. Then the detach() is called on the model, and a new Contact is loaded on the next request, erasing your temporary changes. If validation fails, the input isn't copied to the Contact object. The form input is only copied to the Contact object when the form successfully submits. I may well be misunderstanding something, I'm fairly new to this stuff. It seems that for edit pages you want a non-detachable model, which gets serialized to the session. I had the same misconception when I started using Wicket. Thanks for taking the time to write this article, and thanks in advance for any clarification on this topic. -- Sam Barnum 360 Works http://www.360works.com 415.865.0952 On Jan 28, 2008, at 11:02 AM, Nick Heudecker wrote: It's finally up: http://www.theserverside.com/news/thread.tss?thread_id=48234 Thanks to the various reviewers that helped improve both the content and quality of the article, including Martijn, Eelco, Igor, Gerolf and Talios. -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
Re: How to delete an item from List view.
On Thu, 31 Jan 2008, pnerkar wrote: public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } As a cleaner way to do this you could try ListVehicle vehicles = findParent(VehiclesList.class).getModelObject(); Best wishes, Timo -- Timo Rantalaiho +358-45-6709709 Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: is there wicket had per-defined the Thread for the form component
thanks for reply, johan i want to show the modal window once the report page is load. Mean background is continue loading the report and the modal window is just as a control (its features is invisible the background and only close once action performed is click in the modal window ) to prevent user navigate to other page. For the modal window it only define one cancel button, mean if user click the cancel button, the background ( report page ) is stop. Yes... the modal window is only shown by an ajax link. I get the source from this forum ..where it can fire the ajaxlink whitout click the link. Here is the code getBodyContainer().addOnLoadModifier(new ClickOnceOnLoadModel( ajaxLink ), null ); Even i tried to create a modal window with ajaxlink ( add auto fire event as above code ) and put at the parent class and the report page is the child class. But the result is same, the report page is finish loaded then only pop up the modal window. my report page constructor : public LineChart() { /// modal window use panel..declare the modal window setting here then add add(modalWindow); // to auto pop up the modal window. ajaxLink = new AjaxLink(cancelReportModalLink){ @Override public void onClick(AjaxRequestTarget target) { cancelReportModal.show(target); } }; add(ajaxLink); // Fire the ajaxLink onclick function getBodyContainer().addOnLoadModifier(new ClickOnceOnLoadModel( ajaxLink ), null ); add(feedback); add(new LineChartForm(LineChartForm)); } private class LineChartForm extends Form { // execute query // result as in JFreeChart } i add the component for modal window then only come to form. supposedly it will show the modal window then load the form, am i right . Why ? 2 process in a same time cant together? Is because the process haven't done, so the request wont send to wicket there, 2 way i tried. Call the modal window at Parent class and also child class. But it still given me the same result. between, can you explain more or give example for the onload event that you mentioned ? onLoad event for the modal window ? I was using the wicket 1.2.4. Is it the version cant support it and i need to upgrade ? Thanks in advance - kenix Johan Compagner wrote: how do you show the modal dialog?? Normally the modal dialog is only shown by an ajax link. I guess you show it on onload event. Then yes the page will first load itself then call onload and then the modal window will show itself johan On Jan 31, 2008 6:16 AM, kenixwong [EMAIL PROTECTED] wrote: hi, for the above case, for example... my page constructor: i add the component ( modal window, feedBackPanel, form ) . Once i load the page, why the modal window will only display when the page is finish loaded. Is that the wicket had default set the main thread for the form component? Thanks in advance -- View this message in context: http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15198385.html Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/is-there-wicket-had-per-defined-the-Thread-for-the-form-component-tp15198385p15220106.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 delete an item from List view.
if you want to talk about a cleaner way... add(new removelink(remove, item.getmodel()) { onclick() { vehicles.remove(getmodelobject()); } } assuming vehicles is a property on listview's parent... -igor On Jan 31, 2008 7:29 PM, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Thu, 31 Jan 2008, pnerkar wrote: public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } As a cleaner way to do this you could try ListVehicle vehicles = findParent(VehiclesList.class).getModelObject(); Best wishes, Timo -- Timo Rantalaiho +358-45-6709709 Reaktor Innovations OyURL: http://www.ri.fi/ - 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]
Notifying a DataTable that data has changed
Hi, New to Wicket so this maybe some obvious I'm missing and I'd appreciate any pointers. I have an AjaxFallbackDefaultDataTable within a AjaxTabbedPanel backed by a SortableDataProvider that drags data from a database as needed. One column of my table contains an AjaxFallbackLink. This link opens up a ModelWindow by constructing a Panel with the object from the selected row of the table and setting the model window content before showing the window. The panel in the model window contains a form for editing properties of the passed in object, with two AjaxButtons for OK and Close. OK will take the form model object and persist it to the database. All this works great, but I can't see a way of notifying the table, or underlying data provider, that the data has changed and needs to be refreshed. Any pointers on either how to do this or an alternative approach? thanks in advance. Jonny PS. This is my first attempt at using wicket and it's been refreshingly easy to get this far. Thanks for a great framework. -- View this message in context: http://www.nabble.com/Notifying-a-DataTable-that-data-has-changed-tp15220179p15220179.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: Notifying a DataTable that data has changed
can you not add an onclose callback to the window that repaints the datatable by adding it to the ajax request target? -igor On Jan 31, 2008 7:47 PM, jwray [EMAIL PROTECTED] wrote: Hi, New to Wicket so this maybe some obvious I'm missing and I'd appreciate any pointers. I have an AjaxFallbackDefaultDataTable within a AjaxTabbedPanel backed by a SortableDataProvider that drags data from a database as needed. One column of my table contains an AjaxFallbackLink. This link opens up a ModelWindow by constructing a Panel with the object from the selected row of the table and setting the model window content before showing the window. The panel in the model window contains a form for editing properties of the passed in object, with two AjaxButtons for OK and Close. OK will take the form model object and persist it to the database. All this works great, but I can't see a way of notifying the table, or underlying data provider, that the data has changed and needs to be refreshed. Any pointers on either how to do this or an alternative approach? thanks in advance. Jonny PS. This is my first attempt at using wicket and it's been refreshingly easy to get this far. Thanks for a great framework. -- View this message in context: http://www.nabble.com/Notifying-a-DataTable-that-data-has-changed-tp15220179p15220179.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: Notifying a DataTable that data has changed
Igor, thanks for the reply and pointing me in the direction of a call back and the ajax request target. I've not looked at the request target class in depth yet, so that's probably the piece I was missing. I'll give it a try tomorrow. Jonny igor.vaynberg wrote: can you not add an onclose callback to the window that repaints the datatable by adding it to the ajax request target? -igor On Jan 31, 2008 7:47 PM, jwray [EMAIL PROTECTED] wrote: Hi, New to Wicket so this maybe some obvious I'm missing and I'd appreciate any pointers. I have an AjaxFallbackDefaultDataTable within a AjaxTabbedPanel backed by a SortableDataProvider that drags data from a database as needed. One column of my table contains an AjaxFallbackLink. This link opens up a ModelWindow by constructing a Panel with the object from the selected row of the table and setting the model window content before showing the window. The panel in the model window contains a form for editing properties of the passed in object, with two AjaxButtons for OK and Close. OK will take the form model object and persist it to the database. All this works great, but I can't see a way of notifying the table, or underlying data provider, that the data has changed and needs to be refreshed. Any pointers on either how to do this or an alternative approach? thanks in advance. Jonny PS. This is my first attempt at using wicket and it's been refreshingly easy to get this far. Thanks for a great framework. -- View this message in context: http://www.nabble.com/Notifying-a-DataTable-that-data-has-changed-tp15220179p15220179.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/Notifying-a-DataTable-that-data-has-changed-tp15220179p15220441.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]
Challenge: write something really sleek for Facebook?
Hi, Daniel Kaplan wrote a WIKI page[1] that describes how to set up Wicket for Facebook. Someone posted a link to that on DZone[2], and that in turn prompted Dave from Alfresco to write an alternative to it that shows it can be done much shorter[3]. I know that several people posted the idea before of writing a simple integration framework for Facebook/ Wicket, but so far no-one actually contributed code (besides this WIKI). How about it? Is that blog posting a challenge enough to come up with a simple framework that makes writing Facebook apps with Wicket short and elegant? I can imagine we'd need a component (set) and/ or specialized models for parsing external REST requests. But maybe I'm just talking crap here. Any takers? :-) Eelco [1] http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration [2] http://www.dzone.com/links/rss/apache_wicket_facebook_integration.html [3] http://blogs.alfresco.com/davidc/?p=12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to delete an item from List view.
On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } Instead of using ListView, you could consider RefreshingView with it's itemReuseStrategy set to ReuseIfModelsEqualStrategy. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to delete an item from List view.
Hi igor, I have tried this, Now when I click on remove - it just clear all fields for vehicle2. But none of them get deleted. -pnerkar igor.vaynberg wrote: try this: onpopulate (final listitem item) { add(new link(remove) { onclick() { item.getparent().remove(item); }} } -igor On Jan 31, 2008 6:19 PM, pnerkar [EMAIL PROTECTED] wrote: Hi igor, But If I remove setReuseItems(true), it'll remove all field values which user has entered will be removed. Bcz default processing is false for Remove button (Sorry forget to tell you) I just want to remove vehicle2, but the values entered for vehicle1 vehicle3 should not be lost. - Pnerkar igor.vaynberg wrote: vehicles.setReuseItems(true); == that is what is causing your list to reuse old components -igor On Jan 31, 2008 5:36 PM, pnerkar [EMAIL PROTECTED] wrote: Hi, Following is my code for rendering vehicle list- final VehiclesList vehicles = new VehiclesList(vehicledetails, ((RatingRequestAuto)getModelObject()).getVehicles()); vehicles.setOutputMarkupId(true); vehicles.setReuseItems(true); add(vehicles); private static class VehiclesList extends ListView { public VehiclesList (String id, List vehicles) { super (id, vehicles); } protected void populateItem(final ListItem item) { item.add(new TextField(vehicle.modelText, new PropertyModel(vehicle, model)).setRequired(true)); TextField registrationnumber = new TextField(vehicle.registrationnumber, new PropertyModel(vehicle, registrationNumber)); TextField engineNumber = new TextField(vehicle.enginenumber, new PropertyModel(vehicle, engineNumber)); final int index = item.getIndex(); Button remVehBtn = new Button(btn_removeVeh, new ResourceModel( removevehicle )) { public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } }); } } Thanks a lot for ur reply :) igor.vaynberg wrote: show us how you populate your listview... -igor On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually when I delete vehicle2 from my list, it deletes vehicle2 but that component is still there. So while rendering it render vehicle1 vehicle2. public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } can please help out ?? -- View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15217608.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/How-to-delete-an-item-from-List-view.-tp15217608p15218960.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/How-to-delete-an-item-from-List-view.-tp15217608p15219402.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/How-to-delete-an-item-from-List-view.-tp15217608p15220830.html Sent from the
Re: Challenge: write something really sleek for Facebook?
Could that someone please *not* link directly to the confluence page as is stated on the front page of the wiki [1]? This link goes to the same page, but is 100x times faster and puts 100x less load on the server. http://cwiki.apache.org/WICKET/Facebook+Integration Martijn [1] http://cwiki.apache.org/WICKET/Index On 2/1/08, Eelco Hillenius [EMAIL PROTECTED] wrote: Hi, Daniel Kaplan wrote a WIKI page[1] that describes how to set up Wicket for Facebook. Someone posted a link to that on DZone[2], and that in turn prompted Dave from Alfresco to write an alternative to it that shows it can be done much shorter[3]. I know that several people posted the idea before of writing a simple integration framework for Facebook/ Wicket, but so far no-one actually contributed code (besides this WIKI). How about it? Is that blog posting a challenge enough to come up with a simple framework that makes writing Facebook apps with Wicket short and elegant? I can imagine we'd need a component (set) and/ or specialized models for parsing external REST requests. But maybe I'm just talking crap here. Any takers? :-) Eelco [1] http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration [2] http://www.dzone.com/links/rss/apache_wicket_facebook_integration.html [3] http://blogs.alfresco.com/davidc/?p=12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
Re: Challenge: write something really sleek for Facebook?
i get 404 on [1] ... -igor On Jan 31, 2008 11:14 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: Could that someone please *not* link directly to the confluence page as is stated on the front page of the wiki [1]? This link goes to the same page, but is 100x times faster and puts 100x less load on the server. http://cwiki.apache.org/WICKET/Facebook+Integration Martijn [1] http://cwiki.apache.org/WICKET/Index On 2/1/08, Eelco Hillenius [EMAIL PROTECTED] wrote: Hi, Daniel Kaplan wrote a WIKI page[1] that describes how to set up Wicket for Facebook. Someone posted a link to that on DZone[2], and that in turn prompted Dave from Alfresco to write an alternative to it that shows it can be done much shorter[3]. I know that several people posted the idea before of writing a simple integration framework for Facebook/ Wicket, but so far no-one actually contributed code (besides this WIKI). How about it? Is that blog posting a challenge enough to come up with a simple framework that makes writing Facebook apps with Wicket short and elegant? I can imagine we'd need a component (set) and/ or specialized models for parsing external REST requests. But maybe I'm just talking crap here. Any takers? :-) Eelco [1] http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration [2] http://www.dzone.com/links/rss/apache_wicket_facebook_integration.html [3] http://blogs.alfresco.com/davidc/?p=12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Challenge: write something really sleek for Facebook?
http://cwiki.apache.org/WICKET/index.html On 2/1/08, Igor Vaynberg [EMAIL PROTECTED] wrote: i get 404 on [1] ... -igor On Jan 31, 2008 11:14 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: Could that someone please *not* link directly to the confluence page as is stated on the front page of the wiki [1]? This link goes to the same page, but is 100x times faster and puts 100x less load on the server. http://cwiki.apache.org/WICKET/Facebook+Integration Martijn [1] http://cwiki.apache.org/WICKET/Index On 2/1/08, Eelco Hillenius [EMAIL PROTECTED] wrote: Hi, Daniel Kaplan wrote a WIKI page[1] that describes how to set up Wicket for Facebook. Someone posted a link to that on DZone[2], and that in turn prompted Dave from Alfresco to write an alternative to it that shows it can be done much shorter[3]. I know that several people posted the idea before of writing a simple integration framework for Facebook/ Wicket, but so far no-one actually contributed code (besides this WIKI). How about it? Is that blog posting a challenge enough to come up with a simple framework that makes writing Facebook apps with Wicket short and elegant? I can imagine we'd need a component (set) and/ or specialized models for parsing external REST requests. But maybe I'm just talking crap here. Any takers? :-) Eelco [1] http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration [2] http://www.dzone.com/links/rss/apache_wicket_facebook_integration.html [3] http://blogs.alfresco.com/davidc/?p=12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0