Re: [Wicket-user] Palette problem with latest snapshot
Ok, here are new details for this. I was using following form: from wicket:id=roleForm input wicket:id=roleName palette /form and java source EditRoleForm(String str, Role role) { super(str, new CompoundPropertyMode(role)); *** add(new RequiredTextField(roleName); add(new Palette(...); } and class Role { private int roleId; private String roleName; } Found out that, if I use in line *** instead new PropertyModel(role, roleName) it works as before. What I was doing wrong? And why old snapshot accepted my error? I'm sorry, I did not get to debugging yet, as soon as I'll have some extra time, I'll do so. Of course, until someone says, hey it is not worth it ;) Timo Rantalaiho wrote: On Fri, 15 Jun 2007, shumbola wrote: A few days ago I've upgraded my project to the 1.3 snapshot from June 12. Before I was using a one from May 10. Today I noticed that my page which uses the Palette component stopped working. Anytime I launch that page it It's easier to diagnose your problem if you provide the complete source code and markup. But could it be that there has been a change in the component hierarchy of Palette, and your own markup is now incompatible with it? We always use a snapshot of the current day and have extensive JUnit tests (covering about 90% of the lines). This makes it a lot easier to notice and fix this kind of problems, as we can easily see from commits / dev / user mailing lists what is going on, and just diff the whole wicket source code when needed. A couple of days of diff is perfectly readable, but one month not. - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Palette-problem-with-latest-snapshot-tf3927222.html#a11161103 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Palette problem with latest snapshot
Ok, here are new details for this. I was using following form: from wicket:id=roleForm input wicket:id=roleName span wicket:id=palettepalette/span /form and java source EditRoleForm(String str, Role role) { super(str, new CompoundPropertyMode(role)); *** add(new RequiredTextField(roleName); add(new Palette(...); } and class Role { private int roleId; private String roleName; } Found out that, if I use in line *** instead new PropertyModel(role, roleName) it works as before. What I was doing wrong? And why old snapshot accepted my error? I'm sorry, I did not get to debugging yet, as soon as I'll have some extra time, I'll do so. Of course, until someone says, hey it is not worth it ;) Вы писали Saturday, June 16, 2007, 1:23:04 PM: On Fri, 15 Jun 2007, shumbola wrote: A few days ago I've upgraded my project to the 1.3 snapshot from June 12. Before I was using a one from May 10. Today I noticed that my page which uses the Palette component stopped working. Anytime I launch that page it It's easier to diagnose your problem if you provide the complete source code and markup. But could it be that there has been a change in the component hierarchy of Palette, and your own markup is now incompatible with it? We always use a snapshot of the current day and have extensive JUnit tests (covering about 90% of the lines). This makes it a lot easier to notice and fix this kind of problems, as we can easily see from commits / dev / user mailing lists what is going on, and just diff the whole wicket source code when needed. A couple of days of diff is perfectly readable, but one month not. - Timo -- shumbola mailto:[EMAIL PROTECTED] - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Question] wicket.markup.html.form.Radio
Thank you Tong, interesting approach. I make it work for me by adding AjaxFormSubmitingBehavior to the Radio component, just to keep in synch the model with the RadioGroup state. But your solution is more elegant. Kent Tong wrote: Alex Objelean alexandru.objelean at isdc.ro writes: Thank you Jan! Sad thing is that 1.2.x branch will never support this feature. Try: Form f = ...; RadioGroup rg2 = new RadioGroup(rg2, ...); rg2.setOutputMarkupId(true); setupAjaxRadio(f, rg2, new Radio(r3, new Model(abc))); setupAjaxRadio(f, rg2, new Radio(r4, new Model(def))); ... private void setupAjaxRadio(final Form form, final RadioGroup radioGroup, final Radio radio) { radioGroup.add(radio.add(new AjaxEventBehavior(onchange) { protected void onEvent(AjaxRequestTarget target) { radioGroup.processInput(); target.addComponent(form); } protected CharSequence getEventHandler() { return getCallbackScript(new AppendingStringBuffer( wicketAjaxPost(').append(getCallbackUrl()).append( ', wicketSerialize(document.getElementById(' + radio.getMarkupId() + '))), null, null); } })); } - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/-Question--wicket.markup.html.form.Radio-tf3926549.html#a11161363 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] No parent in Panel ?
I've got a panel extending the Panel class. When I add that panel to a Page, getPage can't seem to the find the parent and throws me a java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = projectOverviewPanel, page = No Page, path = projectOverviewPanel.ProjectOverviewPanel]] I was assuming the Page was automatically set when the panel was added or am I mistaken ? gr, Thies - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] HomePage url changes when user returns from a second wicket page
Page A has this code in its constructor: Link b = new Link(b){ public void onClick(){ setResponsePage(B.class); } }; add(b); Page B has a no-args constructor. It has a link to page A. It also has a form (with a bit of Ajax) which takes some user input. The no args constructor writes a debug message In constructor of class B. The user starts on page A, clicks the link to B, enters some data into the form on B, clicks on the link to A and then clicks on the link on A to go back to B; all the user's data has disappeared. In fact, B's constructor has been called twice. Is it not the case that the setResponsePage(B.class); (as opposed to setResponsePage(new B());) should use the _original_ instance of B, which was stored in the user's session (as per the perfectly reasonable post below)? How can I achieve the desired effect (ie not losing the user's input on returning to B) ? Is the only way to achieve this to manually put the user's input data into some sort of dumb object, put that dumb object into the session, and then pass it as a PageParameter when heading back to B ? Alastair Maw wrote: howzat wrote: Al, that is a very helpful reply, thank you! No problem. ;-) Yes, I have a lot to learn about wicket, but I know a lot more than I did a few days ago, and I like it so far. Great! In my particular case, the page in question is the HomePage, so, since the user has already been there on her way to Page2, I suppose I will always need to create a new instance if I want to show an alert (for example) as the HomePage is visited from Page2's submit (eg user saved some data entered on a Page2 form by hitting submit). I acheived this, albeit by dubious methods (as you kindly pointed out), by including an alert in the head of the HomePage if the constructor that takes a message (eg HomePage(String successMessage)) is called using a StringHeaderContributor. I suppose I need to review this. On the other hand, it is still a useful learning exercise, either way, and I will now study your post in detail before I try again, cheers. If you wish, you can pass the home page into your Page2. add(new Link(someId) { public void onClick() { setResponsePage(new Page2(HomePage.this)); } }); And take the Page arg in Page2's constructor. That way, you have a reference to it, and can link back to that. It's probably better to do status alert type stuff using Wicket's FeedbackPanel (if it's for a form) or via some other Session-based mechanism, though. Have fun playing. Regards, Al - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/HomePage-url-changes-when-user-returns-from-a-second-wicket-page-tf3732701.html#a11162470 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] TreeTable with nodes that are not links + rows with alternate background colours
Does any body have any ideas re the below from a few weeks ago? wicket: 1.2.6 wicket-extensions: 1.2.6 A couple of questions re TreeTable Is it possible to configure a TreeTable so its nodes are not links? So far, I have only found/tried tree.setLinkType(null) without achieving the desired effect. Is it possible to have rows with different background colours based on the value of fields in that row? (eg red if variance to budget is worse than -10%, green if variance to budget +5% etc... howzat wrote: Has anybody got any further thoughts on this? howzat wrote: wicket: 1.2.6 wicket-extensions: 1.2.6 A couple of questions re TreeTable Is it possible to configure a TreeTable so its nodes are not links? So far, I have only found/tried tree.setLinkType(null) without achieving the desired effect. Is it possible to have rows with different background colours based on the value of fields in that row? (eg red if variance to budget is worse than -10%, green if variance to budget +5% etc... PS Now that I've spent a few more hours looking at wicket, I must say that it is not always easy to work out the best (or, at least a good) way to do something (possibly partly down to lack of complete and/or up to date documentation), but once one works out how to do things, it's quite satisfying (in an OO and clever sort of way) and generally, very neat; the amount of reuse I have benefited from already just by using markup inheritance and panels has already covered the time I have put into learning (some of the) the basics. -- View this message in context: http://www.nabble.com/TreeTable-with-nodes-that-are-not-links-%2B-rows-with-alternate-background-colours-tf3822476.html#a11162491 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] No parent in Panel ?
If you look closely (or using a debugger) you can see that when you do: page.add(new MyPanel(...)); First the constructor is called, and only then the add method. At construction time the parent is not known yet. The example can be rewritten to make this more clear like: Panel p = new MyPanel(...); page.add(p); Martijn On 6/17/07, Thies Edeling [EMAIL PROTECTED] wrote: I've got a panel extending the Panel class. When I add that panel to a Page, getPage can't seem to the find the parent and throws me a java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = projectOverviewPanel, page = No Page, path = projectOverviewPanel.ProjectOverviewPanel]] I was assuming the Page was automatically set when the panel was added or am I mistaken ? gr, Thies - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] No parent in Panel ?
Some extra info, the No Page found for component happens when I try to replace the Panel in the onClick of an AjaxLink: public void onClick(AjaxRequestTarget target) { CalendarPanel panel = new CalendarPanel(sidePanel); getParent().replaceWith(panel); target.addComponent(getParent()); } Results in a: java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = sidePanel, page = No Page, path = sidePanel.CalendarPanel]] at org.apache.wicket.Component.getPage(Component.java:1332) at org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:748) at org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:662) gr, Thies Thies Edeling wrote: I've got a panel extending the Panel class. When I add that panel to a Page, getPage can't seem to the find the parent and throws me a java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = projectOverviewPanel, page = No Page, path = projectOverviewPanel.ProjectOverviewPanel]] I was assuming the Page was automatically set when the panel was added or am I mistaken ? gr, Thies - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] No parent in Panel ?
Ah, I did a target.addComponent on the replaced component. The parent of that component was set to null after the replaceWith, changing the addComponent to the newly created Panel works. Thies Edeling wrote: Some extra info, the No Page found for component happens when I try to replace the Panel in the onClick of an AjaxLink: public void onClick(AjaxRequestTarget target) { CalendarPanel panel = new CalendarPanel(sidePanel); getParent().replaceWith(panel); target.addComponent(getParent()); } Results in a: java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = sidePanel, page = No Page, path = sidePanel.CalendarPanel]] at org.apache.wicket.Component.getPage(Component.java:1332) at org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:748) at org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:662) gr, Thies Thies Edeling wrote: I've got a panel extending the Panel class. When I add that panel to a Page, getPage can't seem to the find the parent and throws me a java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = projectOverviewPanel, page = No Page, path = projectOverviewPanel.ProjectOverviewPanel]] I was assuming the Page was automatically set when the panel was added or am I mistaken ? gr, Thies - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] AjaxLink works in FF2,IE7, Page Expired in IE6
AjaxLink works in FF2 and IE7, however in IE6 I get a Page Expired immediately. I saw some previous threads about the jsessionid not set but I doubt this is the same problem as it works in ff2/ie7. Any ideas? gr, Thies - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] HomePage url changes when user returns from a second wicket page
howzat wrote: Page A has this code in its constructor: Link b = new Link(b){ public void onClick(){ setResponsePage(B.class); } }; add(b); This will always create a new instance of B when clicked. If you wish to use a particular page instance, you need to pass it around. You can do this in the constructors if you like. public MyPage() { this(null); } public MyPage(final Page pageToReturnTo) { //... Link foo = new Link(foo){ public void onClick() { if (pageToReturnTo != null) { setResponsePage(pageToReturnTo); } else { setResponsePage(OtherPage.class); } } } } Regards, Al - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [wicket-datetime] fire onchange() after date was selected with datepicker
hi, sometimes i'd like the datepicker to fire the onchange event of the component it's bound to. it doesn't seem to do it ootb. the main fix would probably only meen to call the onchange() method of the targetcomponent after the call to cal.hide() (line 236 in DatePicker.java) i could also imagine making this optional, by adding a constructor DatePicker(boolean notifyOnSelect) and setting the default to false to not break existing code. any comments? should i open a jira issue with a patch? Yes please. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Automatic page history discovery...need direction
I would like to build my own breadcrumb type of navigation widget and I'm looking for some direction as to what I might use to discover what page is currently being served RequestCycle#getResponsePage does a best effort guess for getting the 'current' page. You can only use that method after resolving of the request target (where we determine what kind of request it is). and how I might detect a history of pages leading up to the current one the user is viewing? Would I tap into the page-versioning thing that Wicket does for maintaining the session? That would be possible, but probably not the easiest thing. Do you really want to track all the versions, or would just the plain page requests suffice. In case of the latter, you could work with a base page, and let the constructor register itself for tracking is the session. It might also give you a bit more control of when you actually want to include a page as a bread crumb, and when it is merely an intermediate page. I'm aware that there is a breadcrumb control out there already but I need something a little more simplistic that won't require me creating a bunch of panels. Yeah, the one in extensions works best if you use a lot of component replacements. If you work more page based you might want something else. Please do share if you found a solution you like. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity
hi, will this work when the user clicks the browser's close button as well? Konstantinos Ken Leung-2 wrote: yes, looks like it does. thx, i 'll give it a try. On 6/15/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Not sure from the top of my head (don't have the project checked out here), but I think so... if the HttpSessionStore (the default in Wicket 1.2) has onUnbind, it should do that. Eelco On 6/15/07, Ken Leung [EMAIL PROTECTED] wrote: sounds good, but can it be done in 1.2.6 ? thx On 6/15/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Yep. In Wicket 1.3 the default session store implementations have #onUnbind which should be called automatically with either an expiry or an explicit invalidation. If you don't extend from the abstract session store class (AbstractHttpSessionStore), you have to implement something yourself. Eelco On 6/15/07, Ken Leung [EMAIL PROTECTED] wrote: Is there a way to trap the http session expires so that I can do some of my own house keeping stuff in my application ? thx - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/how-to-detect-http-session-expiry---timeout-due-to-no-user-activity-tf3930442.html#a11165847 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxLink not updating Image
Hey Jeremy, You can try the attribute modifier. Try this: final Label label = new Label(image); AjaxLink someLink = new AjaxLink(.) { public void onClick(AjaxRequestTarget ajaxRequestTarget) { AttributeModifier attributeModifier = new AttributeModifier(src, true, new Model(new path to the file)); label.add(attributeModifier); label.setOutputMarkupId(true); . } } I hope it helps. It may not be the best way to do it .. but works for me ;) ~Ravi Gidwani. Jeremy Levy-2 wrote: I have an AjaxLink link that I am trying to use to update an image, in the onClick method I am replacing the Model of the image to the new path, however it's not working. I've tried it with Image and NonCachingImage, and also turned off Caching in FireFox. I'm not sure but the XML being sent doesn't look correct. I'm using 1.2.5. Here are the relevant code snipits: ... final NonCachingImage warningImage = new NonCachingImage(warningImage, new Model(images/alert_orange.png)); warningImage.setOutputMarkupId(true); add(warningImage); ... final AjaxLink link = new AjaxLink(theLink) { public void onClick(AjaxRequestTarget ajaxRequestTarget) { log.debug(Link Clicked...); warningImage.setModel(new Model(images/alert_green.png)); ajaxRequestTarget.addComponent(warningImage); } }; add(link); From the AJAX Console: INFO: INFO: Initiating Ajax GET request on /1/meetmoi?x=YuQ6ay6aKBGDiO5OfiMmT7sqTYDzw7kvj2TxXBaK1HxBbP9XAjorn1Zpm4EovOnWCZVHg*4WCL-uPukV*-Oz2CeAsvJdoPkhwicket:behaviorId=0random=0.337860019529019 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (388 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=notYetActive_repeatingAlerts_1_aAlert_warningImage ![CDATA[ /1/meetmoi/resources/com.mdate.web.panels.alerts.MobileNotValidatedAlert/images/alert_orange_en_US.png?wicket:antiCache=1181744625859 ]]/component/ajax-response INFO: Response parsed. Now invoking steps... INFO: Response processed successfully. INFO: Invoking post-call handler(s)... Thanks. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/AjaxLink-not-updating-Image-tf3915168.html#a11166175 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxLink not updating Image
Also dont forget to : ajaxRequestTarget.add(label); ~Ravi Gidwani. ravi.gidwani wrote: Hey Jeremy, You can try the attribute modifier. Try this: final Label label = new Label(image); AjaxLink someLink = new AjaxLink(.) { public void onClick(AjaxRequestTarget ajaxRequestTarget) { AttributeModifier attributeModifier = new AttributeModifier(src, true, new Model(new path to the file)); label.add(attributeModifier); label.setOutputMarkupId(true); . } } I hope it helps. It may not be the best way to do it .. but works for me ;) ~Ravi Gidwani. Jeremy Levy-2 wrote: I have an AjaxLink link that I am trying to use to update an image, in the onClick method I am replacing the Model of the image to the new path, however it's not working. I've tried it with Image and NonCachingImage, and also turned off Caching in FireFox. I'm not sure but the XML being sent doesn't look correct. I'm using 1.2.5. Here are the relevant code snipits: ... final NonCachingImage warningImage = new NonCachingImage(warningImage, new Model(images/alert_orange.png)); warningImage.setOutputMarkupId(true); add(warningImage); ... final AjaxLink link = new AjaxLink(theLink) { public void onClick(AjaxRequestTarget ajaxRequestTarget) { log.debug(Link Clicked...); warningImage.setModel(new Model(images/alert_green.png)); ajaxRequestTarget.addComponent(warningImage); } }; add(link); From the AJAX Console: INFO: INFO: Initiating Ajax GET request on /1/meetmoi?x=YuQ6ay6aKBGDiO5OfiMmT7sqTYDzw7kvj2TxXBaK1HxBbP9XAjorn1Zpm4EovOnWCZVHg*4WCL-uPukV*-Oz2CeAsvJdoPkhwicket:behaviorId=0random=0.337860019529019 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (388 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=notYetActive_repeatingAlerts_1_aAlert_warningImage ![CDATA[ /1/meetmoi/resources/com.mdate.web.panels.alerts.MobileNotValidatedAlert/images/alert_orange_en_US.png?wicket:antiCache=1181744625859 ]]/component/ajax-response INFO: Response parsed. Now invoking steps... INFO: Response processed successfully. INFO: Invoking post-call handler(s)... Thanks. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/AjaxLink-not-updating-Image-tf3915168.html#a11166182 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] how to update component on parent page.
Hi all: I have scenario: 1) I have a page (say Page1) with a link A and a Image (say img1) 2) On clicking link A, I open a ModalDialog (as a separate page). Say C. 3) There is a AjaxLink on this Page C (ModalDialog), on clicking this link, I do some processing and close the dialog. Now the problem is : I would like to update/redraw the Image img1 (present on the parent page1). Issue : When I do: AjaxSubmitLink link = new AjaxSubmitLink(someSubmitLink, this) { /** * Serial UID */ private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form form) { .(some process) target.addComponent(the image component img1 passed to this class); ...(close the dialog) } ... The above code does not find the img1 component on this new page and hence fails to update it. The ajax debug window shows: Component with id [[tabs_panel_viewPhotoPanel_zoomLink2_image]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. The img1 has the setOutputMarkupId(true) . BTW, I am using wicket 1.2.6. Any ideas? ~Ravi Gidwani. -- View this message in context: http://www.nabble.com/how-to-update-component-on-parent-page.-tf3937005.html#a11166257 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] how to update component on parent page.
Got the answer Just for the reference for others: http://www.nabble.com/Help%3A-modalwindow-question-tf3920367.html thanks Regards, Ravi Gidwani. ravi.gidwani wrote: Hi all: I have scenario: 1) I have a page (say Page1) with a link A and a Image (say img1) 2) On clicking link A, I open a ModalDialog (as a separate page). Say C. 3) There is a AjaxLink on this Page C (ModalDialog), on clicking this link, I do some processing and close the dialog. Now the problem is : I would like to update/redraw the Image img1 (present on the parent page1). Issue : When I do: AjaxSubmitLink link = new AjaxSubmitLink(someSubmitLink, this) { /** * Serial UID */ private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form form) { .(some process) target.addComponent(the image component img1 passed to this class); ...(close the dialog) } ... The above code does not find the img1 component on this new page and hence fails to update it. The ajax debug window shows: Component with id [[tabs_panel_viewPhotoPanel_zoomLink2_image]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. The img1 has the setOutputMarkupId(true) . BTW, I am using wicket 1.2.6. Any ideas? ~Ravi Gidwani. -- View this message in context: http://www.nabble.com/how-to-update-component-on-parent-page.-tf3937005.html#a11166377 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] infinite loop
this is not it. the server with the problem is not even running a proxy. any other ideas anyone? Al Maw wrote: I've seen this happen if you run behind a mod_proxy and fail to set up the ProxyPassReverse setting properly. Make sure you have ProxyPassReverseCookiePath, too. See the wiki for details. Al Jonathan Locke wrote: anyone have any ideas on what might cause this? in particular can a user exception cause it or is it definitely a wicket bug? java.lang.IllegalStateException?: Request processing executed 32767 steps, which means it is probably in an infinite loop. at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at org.apache.wicket.protocol.http.WicketFilter?.doGet(WicketFilter?.java:251) at org.apache.wicket.protocol.http.WicketFilter?.doFilter(WicketFilter?.java:125) at org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFilterChain?.java:202) at org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain?.java:173) at org.apache.catalina.core.StandardWrapperValve?.invoke(StandardWrapperValve?.java:213) at org.apache.catalina.core.StandardContextValve?.invoke(StandardContextValve?.java:178) at org.apache.catalina.core.StandardHostValve?.invoke(StandardHostValve?.java:126) at org.apache.catalina.cluster.tcp.ReplicationValve?.invoke(ReplicationValve?.java:346) at org.apache.catalina.valves.ErrorReportValve?.invoke(ErrorReportValve?.java:105) at org.apache.catalina.core.StandardEngineValve?.invoke(StandardEngineValve?.java:107) at org.apache.catalina.connector.CoyoteAdapter?.service(CoyoteAdapter?.java:148) at org.apache.coyote.ajp.AjpAprProcessor?.process(AjpAprProcessor?.java:425) at org.apache.coyote.ajp.AjpAprProtocol?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452) at org.apache.tomcat.util.net.AprEndpoint?$Worker.run(AprEndpoint?.java:1285) at java.lang.Thread.run(Thread.java:619) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/infinite-loop-tf3933416.html#a11167279 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] infinite loop
aha. we might have two of these bugs, but i'm getting this trace now. does anyone have any idea what line of code it is that is failing to print the stack trace for this NPE into the log? it looks like an NPE is causing the processing step to restart over and over again. would be a good fix to wicket to have it print that stack trace and not just the exception message. [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - [default] - Servlet.service() for servlet default threw exception java.lang.IllegalStateException?: Request processing executed 32767 steps, which means it is probably in an infinite loop. at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at org.apache.wicket.protocol.http.WicketFilter?.doGet(WicketFilter?.java:251) at org.apache.wicket.protocol.http.WicketFilter?.doFilter(WicketFilter?.java:125) at org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFilterChain?.java:202) at org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain? Al Maw wrote: I've seen this happen if you run behind a mod_proxy and fail to set up the ProxyPassReverse setting properly. Make sure you have ProxyPassReverseCookiePath, too. See the wiki for details. Al Jonathan Locke wrote: anyone have any ideas on what might cause this? in particular can a user exception cause it or is it definitely a wicket bug? java.lang.IllegalStateException?: Request processing executed 32767 steps, which means it is probably in an infinite loop. at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at org.apache.wicket.protocol.http.WicketFilter?.doGet(WicketFilter?.java:251) at org.apache.wicket.protocol.http.WicketFilter?.doFilter(WicketFilter?.java:125) at org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFilterChain?.java:202) at org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain?.java:173) at org.apache.catalina.core.StandardWrapperValve?.invoke(StandardWrapperValve?.java:213) at org.apache.catalina.core.StandardContextValve?.invoke(StandardContextValve?.java:178) at org.apache.catalina.core.StandardHostValve?.invoke(StandardHostValve?.java:126) at org.apache.catalina.cluster.tcp.ReplicationValve?.invoke(ReplicationValve?.java:346) at org.apache.catalina.valves.ErrorReportValve?.invoke(ErrorReportValve?.java:105) at org.apache.catalina.core.StandardEngineValve?.invoke(StandardEngineValve?.java:107) at org.apache.catalina.connector.CoyoteAdapter?.service(CoyoteAdapter?.java:148) at org.apache.coyote.ajp.AjpAprProcessor?.process(AjpAprProcessor?.java:425) at org.apache.coyote.ajp.AjpAprProtocol?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452) at org.apache.tomcat.util.net.AprEndpoint?$Worker.run(AprEndpoint?.java:1285) at java.lang.Thread.run(Thread.java:619) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/infinite-loop-tf3933416.html#a11167872 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] infinite loop
could it be this code that's not logging the whole exception? protected void logRuntimeException(RuntimeException e) { log.error(e.getMessage(), e); } Jonathan Locke wrote: aha. we might have two of these bugs, but i'm getting this trace now. does anyone have any idea what line of code it is that is failing to print the stack trace for this NPE into the log? it looks like an NPE is causing the processing step to restart over and over again. would be a good fix to wicket to have it print that stack trace and not just the exception message. [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException? [10:19:01] ERROR - [default] - Servlet.service() for servlet default threw exception java.lang.IllegalStateException?: Request processing executed 32767 steps, which means it is probably in an infinite loop. at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at org.apache.wicket.protocol.http.WicketFilter?.doGet(WicketFilter?.java:251) at org.apache.wicket.protocol.http.WicketFilter?.doFilter(WicketFilter?.java:125) at org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFilterChain?.java:202) at org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain? Al Maw wrote: I've seen this happen if you run behind a mod_proxy and fail to set up the ProxyPassReverse setting properly. Make sure you have ProxyPassReverseCookiePath, too. See the wiki for details. Al Jonathan Locke wrote: anyone have any ideas on what might cause this? in particular can a user exception cause it or is it definitely a wicket bug? java.lang.IllegalStateException?: Request processing executed 32767 steps, which means it is probably in an infinite loop. at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at org.apache.wicket.protocol.http.WicketFilter?.doGet(WicketFilter?.java:251) at org.apache.wicket.protocol.http.WicketFilter?.doFilter(WicketFilter?.java:125) at org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFilterChain?.java:202) at org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain?.java:173) at org.apache.catalina.core.StandardWrapperValve?.invoke(StandardWrapperValve?.java:213) at org.apache.catalina.core.StandardContextValve?.invoke(StandardContextValve?.java:178) at org.apache.catalina.core.StandardHostValve?.invoke(StandardHostValve?.java:126) at org.apache.catalina.cluster.tcp.ReplicationValve?.invoke(ReplicationValve?.java:346) at org.apache.catalina.valves.ErrorReportValve?.invoke(ErrorReportValve?.java:105) at org.apache.catalina.core.StandardEngineValve?.invoke(StandardEngineValve?.java:107) at org.apache.catalina.connector.CoyoteAdapter?.service(CoyoteAdapter?.java:148) at org.apache.coyote.ajp.AjpAprProcessor?.process(AjpAprProcessor?.java:425) at org.apache.coyote.ajp.AjpAprProtocol?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452) at org.apache.tomcat.util.net.AprEndpoint?$Worker.run(AprEndpoint?.java:1285) at java.lang.Thread.run(Thread.java:619) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/infinite-loop-tf3933416.html#a11167893 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it
Re: [Wicket-user] Javascript Error using submit link in 1.3 that didn't happen in 1.2.5
I'm still having this problem on 1.3 snapshot. Interesting point about the markup (html id attribute). My markup looks like this: form wicket:id=formTransaction id=formTransaction And the generated javascript looks like this: [a onclick=var e=document.getElementById('formTransaction_hf_0'); e.name='linkAddEntry'; e.value='x';var f=document.getElementById('formTransaction2');var ff=f;if (ff.onsubmit != undefined) { if (ff.onsubmit()==false) return false; }f.submit();e.value='';e.name='';return false; href=# wicket:id=linkAddEntry]Add[/a] the second getElementById always has a '2' appended to it... -- View this message in context: http://www.nabble.com/Javascript-Error-using-submit-link-in-1.3-that-didn%27t-happen-in-1.2.5-tf3563824.html#a11167918 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] infinite loop
could it be this code that's not logging the whole exception? protected void logRuntimeException(RuntimeException e) { log.error(e.getMessage(), e); } That should typically print the stack trace if your logging configuration is set up properly. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [wicket-datetime] fire onchange() after date was selected with datepicker
done checkout https://issues.apache.org/jira/browse/WICKET-661 gerolf On 6/17/07, Eelco Hillenius [EMAIL PROTECTED] wrote: hi, sometimes i'd like the datepicker to fire the onchange event of the component it's bound to. it doesn't seem to do it ootb. the main fix would probably only meen to call the onchange() method of the targetcomponent after the call to cal.hide() (line 236 in DatePicker.java) i could also imagine making this optional, by adding a constructor DatePicker(boolean notifyOnSelect) and setting the default to false to not break existing code. any comments? should i open a jira issue with a patch? Yes please. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity
well, I have a project where the requirement is to do some things when user logs out, otherwise the same user can't use the application for the next 30 minutes. It works fine when user uses the logout link, but I want the same behavior when the user closes the window. Any hints how to do this? Konstantinos Eelco Hillenius wrote: will this work when the user clicks the browser's close button as well? I'm afraid not. There is no way to detect that. It's a limitation of any web application. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/how-to-detect-http-session-expiry---timeout-due-to-no-user-activity-tf3930442.html#a11168873 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity
well, I have a project where the requirement is to do some things when user logs out, otherwise the same user can't use the application for the next 30 minutes. It works fine when user uses the logout link, but I want the same behavior when the user closes the window. Any hints how to do this? That's just not possible to my best knowledge. It has nothing to do with Wicket, but just with the fact that such an event (closing a browser window using the functionality the OS provides for that) can't be trapped. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity
thats not entirely correct. while the event cannot be pushed to you, you can pull for it. you can set a cookie with expiration null - such a cookie is destroyed when the window is closed. so you can poll for it ad if its gone you know its a new window being opened. in the same manner you can use window.name variable, which is what we do. so when a request comes in and the user has a last_login cookie (set expiratio to 30 mins), but no login_session cookie (which is the one with expiration null) you know they closed the window and are coming back -igor On 6/17/07, Eelco Hillenius [EMAIL PROTECTED] wrote: well, I have a project where the requirement is to do some things when user logs out, otherwise the same user can't use the application for the next 30 minutes. It works fine when user uses the logout link, but I want the same behavior when the user closes the window. Any hints how to do this? That's just not possible to my best knowledge. It has nothing to do with Wicket, but just with the fact that such an event (closing a browser window using the functionality the OS provides for that) can't be trapped. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity
On 6/17/07, Igor Vaynberg [EMAIL PROTECTED] wrote: thats not entirely correct. while the event cannot be pushed to you, you can pull for it. you can set a cookie with expiration null - such a cookie is destroyed when the window is closed. so you can poll for it ad if its gone you know its a new window being opened. in the same manner you can use window.name variable, which is what we do. so when a request comes in and the user has a last_login cookie (set expiratio to 30 mins), but no login_session cookie (which is the one with expiration null) you know they closed the window and are coming back Yeah, that could work, though only when that particular user uses the same browser instance though. It would be better than nothing I guess. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity
Eelco Hillenius wrote: well, I have a project where the requirement is to do some things when user logs out, otherwise the same user can't use the application for the next 30 minutes. It works fine when user uses the logout link, but I want the same behavior when the user closes the window. Any hints how to do this? That's just not possible to my best knowledge. It has nothing to do with Wicket, but just with the fact that such an event (closing a browser window using the functionality the OS provides for that) can't be trapped. Hmmm. You might be able to mess with the onbeforeunload event on body. Regards, Al -- Alastair Maw Wicket-biased blog at http://herebebeasties.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Javascript Error using submit link in 1.3 that didn't happen in 1.2.5
oliver.henlich wrote: I'm still having this problem on 1.3 snapshot. Interesting point about the markup (html id attribute). My markup looks like this: form wicket:id=formTransaction id=formTransaction And the generated javascript looks like this: [a onclick=var e=document.getElementById('formTransaction_hf_0'); e.name='linkAddEntry'; e.value='x';var f=document.getElementById('formTransaction2');var ff=f;if (ff.onsubmit != undefined) { if (ff.onsubmit()==false) return false; }f.submit();e.value='';e.name='';return false; href=# wicket:id=linkAddEntry]Add[/a] the second getElementById always has a '2' appended to it... It's possible that Igor has just fixed this. Worth trying again, at any rate. Al -- Alastair Maw Wicket-biased blog at http://herebebeasties.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user