Re: resource for href=...
Image class creates a LocalizedImageResource which creates a resource reference from a file. What you can do ( probably not recommended ) is extend the Image class to retrieve the URL dynamically e.g. http://pastebin.com/XCpcgLzC Regards Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: In img src I can use just path, the constructor for Image will translate it to right path for use in view. Not so ExternalLink. I know doc you pointing me, not suitable for me (I think) because I have images on the same server as app (under Tomcat). Maybe ExternalLink I'm using isn't right class? Is it possible to use path in onClick method in Link class? -Original Message- From: Zilvinas Vilutis [mailto:cika...@gmail.com] Sent: Monday, December 13, 2010 8:27 AM To: Ladislav DANKO Cc: users@wicket.apache.org Subject: Re: resource for href=... I don't think you can just use the file path ( and that is not secure... ) Please read the following to understand how to use resource reference on external images: https://cwiki.apache.org/WICKET/how-to-load-an-external-image.html Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: Snippet of code (note relevant removed): //file list in folder, sorted Folder folder = ((Start)Application.get()).getUploadFolder(); File[] files = folder.getFiles(); ListFile lList = Arrays.asList(files); Collections.sort(lList); //for every image create clickable link with image as link RepeatingView view = new RepeatingView(repeater); IteratorFile iterator = lList.iterator(); while(iterator.hasNext()) { iterator.next(); String fileName = lList.get(i).getName(); String path = photo/ + fileName; String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(photoPath, path).add(new Image(image, path))); view.add(clickableImg); } this.add(view); In the final I have right path for img src and wrong path in a href Laco -Original Message- From: Zilvinas Vilutis [mailto:cika...@gmail.com] Sent: Monday, December 13, 2010 8:11 AM To: users@wicket.apache.org Subject: Re: resource for href=... I don't see where your path is constructed. Did you want to construct an url for an Image ResourceReference ? Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: No, I don't need to download it, what I need is right path in href attribute in anchor html tag as is in img html tag (created as new Image). -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 12:13 AM To: users@wicket.apache.org Subject: Re: resource for href=... You want it to download the image? Try DownloadLink. On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net wrote: Hi guys, another question -have code (PhotoRepeater extends Panel, view is RepeatingView): ... String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(fotoPath, path).add(new Image(image, path))); view.add(clickableImg); this.add(view); .. and markup: wicket:panel a wicket:id=fotoPath title= rel=lightbox[svatebni] href=# img wicket:id=image width=90px border=2px / /a /wicket:panel It works, but in final markup there is: a href=photo/01_sv_76.jpg rel=lightbox[test] title= img border=2px width=90px src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg/ /a so image is shown (right path to image resource) but not clickable (wrong path). I'm using ExternalLink in wrong way but I don't know the right way. Can you help me gyus, please? Laco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:
Re: Ajax response render as source in the browser
Hello everyone, I thought you might be interested. At the weekend I experienced this problem myself on my local machine, so I had the chance to debug and figure what was happening. The short version is 99.9% sure its a javascript engine bug on Firefox (and we've had a couple of users say they had it on Chome). The only way to 'fix' the issue was to clear all cached data from the browser. Restarting the browser or the server made no difference. I will report this to Mozilla today. Luckily I could consistently make it fail and succeed so I could debug and trace exactly what was happening. I don't know if thus is something to do with the URL format of the request (I very much doubt it) but its odd that this has never been reported before, but clearly it wasn't working for use and for some of our users. We observed the following: GOOD REQUEST We could set break points in the wicket-ajax.js and step though it until the Request.doGet line 841 where transport.send(null) is called. The headers where: Response Headers Content-Typetext/xml; charset=utf-8 Pragma no-cache Cache-Control no-cache, must-revalidate Expires Mon, 26 Jul 1997 05:00:00 GMT Content-Length 3346 Server Jetty(6.1.4) Request Headers Hostfoo7.glasscubesdev.com:8080 User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0C) Accept text/xml Accept-Language en-gb,en-us;q=0.9,de;q=0.8,es;q=0.7,pl;q=0.6,hu;q=0.4,nl;q=0.3,sv-se;q=0.2,en;q=0.1 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Wicket-Ajax true Wicket-FocusedElementId changeBillingAddress177 Referer http://foo7.glasscubesdev.com:8080/?wicket:interface=:20 Cookie JSESSIONID=1vsuz0qz6v33o Now for the BAD REQUEST At first none of the break points in the javascript would hit at all , we'd click on the ajaxlink and immediately we would see the ajax response from the server in the browser window and the URL in the address bar as: http://foo7.glasscubesdev.com:8080/?wicket:interface=:44:changeBillingAddress::IBehaviorListener:0:random=0.7035102055608244 So we knew the javascript must of been running as the random parameter was different each time it failed. I then realised that I needed to 're-set' the break points in the wicket-ajax.js again. It seems that firefug was treating the js file as a different file when on the failing request versus the good request. Anyhow once I realised that I could step through it again to the same line in the Request::doGet(). At this point we got the behaviour as described before with the URL in the browser and the ajax response in the page. Looking at the headers we can see: Response Headers Content-Typetext/xml; charset=utf-8 Expires Mon, 26 Jul 1997 05:00:00 GMT Cache-Control no-cache, must-revalidate Pragma no-cache Content-Length 3346 Server Jetty(6.1.4) Request Headers Hostfoo7.glasscubesdev.com:8080 User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0C) Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-gb,en-us;q=0.9,de;q=0.8,es;q=0.7,pl;q=0.6,hu;q=0.4,nl;q=0.3,sv-se;q=0.2,en;q=0.1 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Cookie JSESSIONID=1vsuz0qz6v33o The wicket specific headers and content type are not there, even though the code was explicitly setting them just before the call to transport send. Our only conclusion is that is must be a javascript engine bug, we just surprised this has never reported before as its not a wicket bug . On Tue, Nov 16, 2010 at 5:29 PM, Wayne W waynemailingli...@gmail.com wrote: Hello, we've upgraded the apache to 2.2.15 in production and this made no difference. However today we got a screen shot from one client who has been having the issue see: https://home.glasscubes.com/share/code/8a8c7ecf37fe9d95cefaf787529b0828 (you'll need to download to see the details of the URL) What's really odd about this is that it looks like the browser is doing a HTTP GET rather than using the xml request object - you can plainly see in the browser the URL. Looking at the code for the onclick event it looks (to me normal) (see below). Anyone got any further ideas on this? Its like the wicketAjaxGet is literally doing a GET! a onclick=if (document.getElementById('spinnerContainere')) (document.getElementById('spinnerContainere')).style.display = 'inline';if (document.getElementById('filterEverythingc')) (document.getElementById('filterEverythingc')).disabled = true;var wcall=wicketAjaxGet('../?wicket:interface=:1:mainPanel:filterContainer:filterEverything::IBehaviorListener:0:1',function() { if (document.getElementById('spinnerContainere')) { (document.getElementById('spinnerContainere')).style.display =
Feedback panel and FormComponentLabel for form components : how to?
Hi all, I've got a lot of forms on my app that use tables for layout and generally look like this after being rendered: form table tr thName/th * in the original markup it was a wicket:message key=name* tdinput name=name/input/td* in the original markup it was a simple input wicket:id=name* /tr table /form These form components also use the deprecated IComponentBorder to display error messages related to the component (no ajax used, just on normal submit). I'd like to start using a div layout instead of a table layout, have a feedback panel for each component and a label element, something like this: form fieldset div class=row label for=compId/label input here id=compId* doesnt just have to be input, might also be select or even a div with some inputs in it (FormComponentPanel)* feedback panel herel /div /fieldset /form My main problem is that I want my original markup to remain pretty much the same. I don't want to have to add markup for labels and feedback panels for all of my inputs. I'd like the template markup to be like this: form fieldset div class=row input wicket:id=component/ /div /fieldset /form *What is the best practice to achieve this?* I took a look at Border but this doesn't seem to be the right way for me because it involves adding div wicket:id=compBorder around each input. I took a look at AbstractBehavior and it looks better but then it looks like I have to hardcode the html template into the beforeRender/afterRender. I'm probably missing something here.. Any help will be appreciated :)
[1.5] onBeforeRender() not called after AjaxRequestTarget.add()
Hey everyone. Maybe I am a little rusty with Wicket but.. I am on a new project with Wicket 1.5, M3. I have a simple behavior on a form field: form.add(otherComponent); form.add(codeField); codeField.add(new AjaxEventBehavior(onChange) { @Override protected void onEvent(final AjaxRequestTarget target) { target.add(form); } }); I expect that the onBeforeRender of all components of the form would be called when the onChange arrives. Instead tests and debugger tells me that whie target.add(form) is called, the onBeforeRender method of any of the form component is while, for example, isVisible is called. What am I missing here? Form has the output markup id set to true, and I remember that all the form child shoud inherit that settings but this does not appear to be true anymore. Anyway, even assigning component.setOutputMarkupId(true) to all form components, their onBeforeRender is not called I can't found any open bug about these problems, so maybe I am wrong about something. -- Daniele Dellafiore http://danieledellafiore.net
Re: [1.5] onBeforeRender() not called after AjaxRequestTarget.add()
a couple of new experiments: I've added comp1 and comp2 as target in the onEvent. comp1 just have @Override protected void onBeforeRender() { super.onBeforeRender(); } while comp2 @Override protected void onBeforeRender() { super.onBeforeRender(); } On Mon, Dec 13, 2010 at 2:02 PM, ilde...@gmail.com ilde...@gmail.comwrote: Hey everyone. Maybe I am a little rusty with Wicket but.. I am on a new project with Wicket 1.5, M3. I have a simple behavior on a form field: form.add(otherComponent); form.add(codeField); codeField.add(new AjaxEventBehavior(onChange) { @Override protected void onEvent(final AjaxRequestTarget target) { target.add(form); } }); I expect that the onBeforeRender of all components of the form would be called when the onChange arrives. Instead tests and debugger tells me that whie target.add(form) is called, the onBeforeRender method of any of the form component is while, for example, isVisible is called. What am I missing here? Form has the output markup id set to true, and I remember that all the form child shoud inherit that settings but this does not appear to be true anymore. Anyway, even assigning component.setOutputMarkupId(true) to all form components, their onBeforeRender is not called I can't found any open bug about these problems, so maybe I am wrong about something. -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net
Re: [1.5] onBeforeRender() not called after AjaxRequestTarget.add()
sorry email was started before I completed it. Anyway I'll prepare a working zip and wil send the issue as a jira bug if I can confirm the problem. On Mon, Dec 13, 2010 at 2:13 PM, ilde...@gmail.com ilde...@gmail.comwrote: a couple of new experiments: I've added comp1 and comp2 as target in the onEvent. comp1 just have @Override protected void onBeforeRender() { super.onBeforeRender(); } while comp2 @Override protected void onBeforeRender() { super.onBeforeRender(); } On Mon, Dec 13, 2010 at 2:02 PM, ilde...@gmail.com ilde...@gmail.comwrote: Hey everyone. Maybe I am a little rusty with Wicket but.. I am on a new project with Wicket 1.5, M3. I have a simple behavior on a form field: form.add(otherComponent); form.add(codeField); codeField.add(new AjaxEventBehavior(onChange) { @Override protected void onEvent(final AjaxRequestTarget target) { target.add(form); } }); I expect that the onBeforeRender of all components of the form would be called when the onChange arrives. Instead tests and debugger tells me that whie target.add(form) is called, the onBeforeRender method of any of the form component is while, for example, isVisible is called. What am I missing here? Form has the output markup id set to true, and I remember that all the form child shoud inherit that settings but this does not appear to be true anymore. Anyway, even assigning component.setOutputMarkupId(true) to all form components, their onBeforeRender is not called I can't found any open bug about these problems, so maybe I am wrong about something. -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net
Re: resource for href=...
What do you want it to do when you click it? 2010/12/13 Ladislav DANKO em...@1ac0.net: No, I don't need to download it, what I need is right path in href attribute in anchor html tag as is in img html tag (created as new Image). -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 12:13 AM To: users@wicket.apache.org Subject: Re: resource for href=... You want it to download the image? Try DownloadLink. On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net wrote: Hi guys, another question -have code (PhotoRepeater extends Panel, view is RepeatingView): ... String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(fotoPath, path).add(new Image(image, path))); view.add(clickableImg); this.add(view); .. and markup: wicket:panel a wicket:id=fotoPath title= rel=lightbox[svatebni] href=# img wicket:id=image width=90px border=2px / /a /wicket:panel It works, but in final markup there is: a href=photo/01_sv_76.jpg rel=lightbox[test] title= img border=2px width=90px src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg/ /a so image is shown (right path to image resource) but not clickable (wrong path). I'm using ExternalLink in wrong way but I don't know the right way. Can you help me gyus, please? Laco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
New Wicket based website: https://mm.web.de
There is yet another Wicked based site out in the wild. https://mm.web.de To take a ride you have to have a web.de e-mail account though. srry.. But they do have a free plan too.. ;-) If you do have an account you should be able to access your web.de e-mail on quite a variety of mobile gadgets. Basically anything that, can access the URL and render any sort of HTML, should get you going. Besides serving a wide variety of devices up to their capabilities, another focus was on delivering a lean and responsive interface. At least on the LAN it is very very fast (~300ms / ~10KB / per Page), that shouldn't harm out there in the field. Feel free and try yourself, mf
Re: Generate markup outside of DataTable relatively to visible data
Basically, i need a way to hook into the row-generating routine. I would use DataView, but i need the column-based datahandling of the DataTable.. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generate markup outside of DataTable relatively to visible data
datatable#newrowitem generates an item for each row. you can add a behavior that renders something before or after the row. -igor On Mon, Dec 13, 2010 at 5:07 PM, Benedikt Schlegel codecab.dri...@googlemail.com wrote: Basically, i need a way to hook into the row-generating routine. I would use DataView, but i need the column-based datahandling of the DataTable.. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Redirect to ResourceStream While *Also* Refreshing Form
Sorry to bump this again, but is there a way to do Repaint + Download with the Validators kicking in before the repaint as they normally do? Right now, I'm able to initiate the download upon clicking the Submit buttons, but that happens BEFORE any of the Validators kick in. I should only initiate the download if the validators passed, so the download must happen after the Validators. If there's no way to do it, is there a way to manually invoke validators? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-ResourceStream-While-Also-Refreshing-Form-tp3081069p3085547.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Redirect to ResourceStream While *Also* Refreshing Form
in the ajaxrequetstarget append javascript that does window.location to a url that starts streaming the data -igor On Mon, Dec 13, 2010 at 5:12 PM, eugenebalt eugeneb...@yahoo.com wrote: Sorry to bump this again, but is there a way to do Repaint + Download with the Validators kicking in before the repaint as they normally do? Right now, I'm able to initiate the download upon clicking the Submit buttons, but that happens BEFORE any of the Validators kick in. I should only initiate the download if the validators passed, so the download must happen after the Validators. If there's no way to do it, is there a way to manually invoke validators? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-ResourceStream-While-Also-Refreshing-Form-tp3081069p3085547.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: resource for href=...
did that help? Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Zilvinas Vilutis cika...@gmail.com: Image class creates a LocalizedImageResource which creates a resource reference from a file. What you can do ( probably not recommended ) is extend the Image class to retrieve the URL dynamically e.g. http://pastebin.com/XCpcgLzC Regards Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: In img src I can use just path, the constructor for Image will translate it to right path for use in view. Not so ExternalLink. I know doc you pointing me, not suitable for me (I think) because I have images on the same server as app (under Tomcat). Maybe ExternalLink I'm using isn't right class? Is it possible to use path in onClick method in Link class? -Original Message- From: Zilvinas Vilutis [mailto:cika...@gmail.com] Sent: Monday, December 13, 2010 8:27 AM To: Ladislav DANKO Cc: users@wicket.apache.org Subject: Re: resource for href=... I don't think you can just use the file path ( and that is not secure... ) Please read the following to understand how to use resource reference on external images: https://cwiki.apache.org/WICKET/how-to-load-an-external-image.html Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: Snippet of code (note relevant removed): //file list in folder, sorted Folder folder = ((Start)Application.get()).getUploadFolder(); File[] files = folder.getFiles(); ListFile lList = Arrays.asList(files); Collections.sort(lList); //for every image create clickable link with image as link RepeatingView view = new RepeatingView(repeater); IteratorFile iterator = lList.iterator(); while(iterator.hasNext()) { iterator.next(); String fileName = lList.get(i).getName(); String path = photo/ + fileName; String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(photoPath, path).add(new Image(image, path))); view.add(clickableImg); } this.add(view); In the final I have right path for img src and wrong path in a href Laco -Original Message- From: Zilvinas Vilutis [mailto:cika...@gmail.com] Sent: Monday, December 13, 2010 8:11 AM To: users@wicket.apache.org Subject: Re: resource for href=... I don't see where your path is constructed. Did you want to construct an url for an Image ResourceReference ? Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: No, I don't need to download it, what I need is right path in href attribute in anchor html tag as is in img html tag (created as new Image). -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 12:13 AM To: users@wicket.apache.org Subject: Re: resource for href=... You want it to download the image? Try DownloadLink. On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net wrote: Hi guys, another question -have code (PhotoRepeater extends Panel, view is RepeatingView): ... String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(fotoPath, path).add(new Image(image, path))); view.add(clickableImg); this.add(view); .. and markup: wicket:panel a wicket:id=fotoPath title= rel=lightbox[svatebni] href=# img wicket:id=image width=90px border=2px / /a /wicket:panel It works, but in final markup there is: a href=photo/01_sv_76.jpg rel=lightbox[test] title= img border=2px width=90px src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg/ /a so image is shown (right path to image resource) but not clickable (wrong path). I'm using ExternalLink in wrong way but I don't know the right way. Can you help me gyus, please? Laco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Invoke Validators manually, in arbitrary places (e.g. Ajax)
Is there a way to invoke a Validator manually in an arbitrary place in the code, or do we have no control over when Wicket runs Validators (it always happens on the form submit)? In my situation, I'd like to invoke a validator manually in the Ajax part of my code. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085646.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [1.5] [Solved] onBeforeRender() not called after AjaxRequestTarget.add()
Ok, I got it, I told I was rusty :) I forgot that if a component is marked non visible on the first time is rendered, it will never be rendered again until someone make it visilble. Of course, I can't make it visible again in it's own onBeforeRender that is exactly the method that will never be called again. On Mon, Dec 13, 2010 at 2:14 PM, ilde...@gmail.com ilde...@gmail.comwrote: sorry email was started before I completed it. Anyway I'll prepare a working zip and wil send the issue as a jira bug if I can confirm the problem. On Mon, Dec 13, 2010 at 2:13 PM, ilde...@gmail.com ilde...@gmail.comwrote: a couple of new experiments: I've added comp1 and comp2 as target in the onEvent. comp1 just have @Override protected void onBeforeRender() { super.onBeforeRender(); } while comp2 @Override protected void onBeforeRender() { super.onBeforeRender(); } On Mon, Dec 13, 2010 at 2:02 PM, ilde...@gmail.com ilde...@gmail.comwrote: Hey everyone. Maybe I am a little rusty with Wicket but.. I am on a new project with Wicket 1.5, M3. I have a simple behavior on a form field: form.add(otherComponent); form.add(codeField); codeField.add(new AjaxEventBehavior(onChange) { @Override protected void onEvent(final AjaxRequestTarget target) { target.add(form); } }); I expect that the onBeforeRender of all components of the form would be called when the onChange arrives. Instead tests and debugger tells me that whie target.add(form) is called, the onBeforeRender method of any of the form component is while, for example, isVisible is called. What am I missing here? Form has the output markup id set to true, and I remember that all the form child shoud inherit that settings but this does not appear to be true anymore. Anyway, even assigning component.setOutputMarkupId(true) to all form components, their onBeforeRender is not called I can't found any open bug about these problems, so maybe I am wrong about something. -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net
Re: Invoke Validators manually, in arbitrary places (e.g. Ajax)
form.validate() i believe -igor On Mon, Dec 13, 2010 at 6:15 PM, eugenebalt eugeneb...@yahoo.com wrote: Is there a way to invoke a Validator manually in an arbitrary place in the code, or do we have no control over when Wicket runs Validators (it always happens on the form submit)? In my situation, I'd like to invoke a validator manually in the Ajax part of my code. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085646.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [1.5] [Solved] onBeforeRender() not called after AjaxRequestTarget.add()
see component#onconfigure() -igor On Mon, Dec 13, 2010 at 6:16 PM, ilde...@gmail.com ilde...@gmail.com wrote: Ok, I got it, I told I was rusty :) I forgot that if a component is marked non visible on the first time is rendered, it will never be rendered again until someone make it visilble. Of course, I can't make it visible again in it's own onBeforeRender that is exactly the method that will never be called again. On Mon, Dec 13, 2010 at 2:14 PM, ilde...@gmail.com ilde...@gmail.comwrote: sorry email was started before I completed it. Anyway I'll prepare a working zip and wil send the issue as a jira bug if I can confirm the problem. On Mon, Dec 13, 2010 at 2:13 PM, ilde...@gmail.com ilde...@gmail.comwrote: a couple of new experiments: I've added comp1 and comp2 as target in the onEvent. comp1 just have @Override protected void onBeforeRender() { super.onBeforeRender(); } while comp2 @Override protected void onBeforeRender() { super.onBeforeRender(); } On Mon, Dec 13, 2010 at 2:02 PM, ilde...@gmail.com ilde...@gmail.comwrote: Hey everyone. Maybe I am a little rusty with Wicket but.. I am on a new project with Wicket 1.5, M3. I have a simple behavior on a form field: form.add(otherComponent); form.add(codeField); codeField.add(new AjaxEventBehavior(onChange) { @Override protected void onEvent(final AjaxRequestTarget target) { target.add(form); } }); I expect that the onBeforeRender of all components of the form would be called when the onChange arrives. Instead tests and debugger tells me that whie target.add(form) is called, the onBeforeRender method of any of the form component is while, for example, isVisible is called. What am I missing here? Form has the output markup id set to true, and I remember that all the form child shoud inherit that settings but this does not appear to be true anymore. Anyway, even assigning component.setOutputMarkupId(true) to all form components, their onBeforeRender is not called I can't found any open bug about these problems, so maybe I am wrong about something. -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net -- Daniele Dellafiore http://danieledellafiore.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Invoke Validators manually, in arbitrary places (e.g. Ajax)
Thanks Igor. That method is a void. Is it possible to get some kind of a boolean result from form.validate() to indicate success/failure? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085680.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Invoke Validators manually, in arbitrary places (e.g. Ajax)
after you call it call form.haserrors() or form.isvalid() or something similar -igor On Mon, Dec 13, 2010 at 6:29 PM, eugenebalt eugeneb...@yahoo.com wrote: Thanks Igor. That method is a void. Is it possible to get some kind of a boolean result from form.validate() to indicate success/failure? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085680.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Best practice for content without encompassing tag
Both are OK On Mon, Dec 13, 2010 at 5:39 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Should I use wicket:container for a section of html that I want to include on my page without having a particular tag rendered to the user. For example, if I just want to output the text Data without outputting 'div' or 'span', should I use wicket:container. Or could I use something like setRenderBodyOnly? wicket:container Data /wicket:container Output HTML: Data Berlin Brown
Re: Invoke Validators manually, in arbitrary places (e.g. Ajax)
That's probably already popular topic, but I'll ask that question again ( please point me to the existing thread if you're aware of this question ) Is there any way to validate only one form component at a time and return the results to UI ( ajax )? Thank you! Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Mon, Dec 13, 2010 at 9:36 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: after you call it call form.haserrors() or form.isvalid() or something similar -igor On Mon, Dec 13, 2010 at 6:29 PM, eugenebalt eugeneb...@yahoo.com wrote: Thanks Igor. That method is a void. Is it possible to get some kind of a boolean result from form.validate() to indicate success/failure? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085680.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Invoke Validators manually, in arbitrary places (e.g. Ajax)
formcomponent.validate() -igor On Mon, Dec 13, 2010 at 6:56 PM, Zilvinas Vilutis cika...@gmail.com wrote: That's probably already popular topic, but I'll ask that question again ( please point me to the existing thread if you're aware of this question ) Is there any way to validate only one form component at a time and return the results to UI ( ajax )? Thank you! Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Mon, Dec 13, 2010 at 9:36 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: after you call it call form.haserrors() or form.isvalid() or something similar -igor On Mon, Dec 13, 2010 at 6:29 PM, eugenebalt eugeneb...@yahoo.com wrote: Thanks Igor. That method is a void. Is it possible to get some kind of a boolean result from form.validate() to indicate success/failure? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085680.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [1.5] [Solved] onBeforeRender() not called after AjaxRequestTarget.add()
On Mon, Dec 13, 2010 at 5:18 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: onconfigure Yes, I also tried to use that new 1.5 method but again, overriding the one of the component but is a tecnique that does not work. It is needed to set the visiblity in the onConfigure of a parent object that is alwasy rendered. Fair enough, I got it now. -- Daniele Dellafiore http://danieledellafiore.net
Re: multi-window support, pagestores and wicket 1.5
Thank you for your replies Igor. I have another question regarding to clustered environment. Suppose we have versioned pages opened in two windows. If one node goes down, only the last page user made request from is stored in http session and replicated to other nodes. So i suppose that only one page would work and the state from the second page is lost. So multi-window support for stateful pages (even versioned) wouldn't work in clustered environment. Is this true? I think that even weird javascript solution for multiple windows would be good (it could be turned off by default), because we are unable to migrate our existing wicket projects, or create stateful application in multiple windows/tabs running in the cluster. This was supported out-of-box by wicket previous versions. I know that there is a possibility to provide implementation IPageManager, but there is missing support for browser window detection so its a bit more complicated to implement IPageManager supporting multiple windows in clustered environment. BR, Michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: On Sat, Dec 11, 2010 at 12:04 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hi folks, I know that there has been a lot of written about pagestores and multi-window support in wicket 1.5, but i have several other questions: 1. Is multi-window supported for non-versioned pages? If page is versioned everything works ok, but i always get StalePageExceptions when i use multiple windows/tabs with non-versioned pages. I think that StalePageException is useful in some cases when you wanna be sure that user has same page in all windows, but in older versions of wicket it was possible to have non versioned pages and multi-window support together (e.g. we have an application written in wicket 1.2.6 that uses non-versioned pages in multiple windows) no, it is not supported. supporting it has been problematic even in 1.4.x series where it required javascript and introduced a strange redirect that happened as soon as the page was loaded. unversioned pages also cause weird issues with the back button. if you want something that is unversioned then i think building it as stateless makes more sense. 2. How page stores work in clustered environment? In older versions of wicket we used pagemaps stored in HttpSession. When one node in cluster refuses to handle request, it was successfully handled by another nod, because HttpSession was replicated to another node. We have used non-versioned pages (no back button support needed) and in one pagemap there was max 5 pages. Wicket provided this functionality out-of-box. in both 1.4.x and 1.5.x by default we store the current page in session and the rest are spooled to disk. the current page is replicated to all nodes since it is stored in session, so any node can pick up a request. 3. How to achieve this in wicket 1.5? I have found PersistentPageManager which uses IPageStore to store pages. Pages are stored on disk by default, but there is also thread safe SerializedPagesCache with SoftReferences. Theres no out-of-box solution to store pages in HttpSession. I have also found file page-management.txt in org.apache.wicket.page package. It contains proposal of other pagamanagers and multi-window support for non-versioned pages. The proposal contains classes PersistentPageManager with DiskPageStore and SecondLevelCacheSessionStore for versioned pages SessionManager for holding non versioned pages in HttpSession. 4. Can we expect that this proposal will be implemented in wicket 1.5 final version? no. the current version is feature complete and we are concentrating on bugfixing. a more sophisticated page management may be introduced in the future. we have concentrated on the 99% usecase and simplified the code for that. you can implement your own page storage strategies as you see fit. -igor Thanks for your replies. BR, Michal Kurtak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: multi-window support, pagestores and wicket 1.5
Hmm... This solutions seems really good. sorry for bothering michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: when the page that is stored in http session is deserialized on another node it is also spooled to disk. so in a cluster all nodes have identical spooled pages - so everything should work. -igor On Mon, Dec 13, 2010 at 8:00 PM, Michal Kurtak michal.kur...@gmail.com wrote: Thank you for your replies Igor. I have another question regarding to clustered environment. Suppose we have versioned pages opened in two windows. If one node goes down, only the last page user made request from is stored in http session and replicated to other nodes. So i suppose that only one page would work and the state from the second page is lost. So multi-window support for stateful pages (even versioned) wouldn't work in clustered environment. Is this true? I think that even weird javascript solution for multiple windows would be good (it could be turned off by default), because we are unable to migrate our existing wicket projects, or create stateful application in multiple windows/tabs running in the cluster. This was supported out-of-box by wicket previous versions. I know that there is a possibility to provide implementation IPageManager, but there is missing support for browser window detection so its a bit more complicated to implement IPageManager supporting multiple windows in clustered environment. BR, Michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: On Sat, Dec 11, 2010 at 12:04 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hi folks, I know that there has been a lot of written about pagestores and multi-window support in wicket 1.5, but i have several other questions: 1. Is multi-window supported for non-versioned pages? If page is versioned everything works ok, but i always get StalePageExceptions when i use multiple windows/tabs with non-versioned pages. I think that StalePageException is useful in some cases when you wanna be sure that user has same page in all windows, but in older versions of wicket it was possible to have non versioned pages and multi-window support together (e.g. we have an application written in wicket 1.2.6 that uses non-versioned pages in multiple windows) no, it is not supported. supporting it has been problematic even in 1.4.x series where it required javascript and introduced a strange redirect that happened as soon as the page was loaded. unversioned pages also cause weird issues with the back button. if you want something that is unversioned then i think building it as stateless makes more sense. 2. How page stores work in clustered environment? In older versions of wicket we used pagemaps stored in HttpSession. When one node in cluster refuses to handle request, it was successfully handled by another nod, because HttpSession was replicated to another node. We have used non-versioned pages (no back button support needed) and in one pagemap there was max 5 pages. Wicket provided this functionality out-of-box. in both 1.4.x and 1.5.x by default we store the current page in session and the rest are spooled to disk. the current page is replicated to all nodes since it is stored in session, so any node can pick up a request. 3. How to achieve this in wicket 1.5? I have found PersistentPageManager which uses IPageStore to store pages. Pages are stored on disk by default, but there is also thread safe SerializedPagesCache with SoftReferences. Theres no out-of-box solution to store pages in HttpSession. I have also found file page-management.txt in org.apache.wicket.page package. It contains proposal of other pagamanagers and multi-window support for non-versioned pages. The proposal contains classes PersistentPageManager with DiskPageStore and SecondLevelCacheSessionStore for versioned pages SessionManager for holding non versioned pages in HttpSession. 4. Can we expect that this proposal will be implemented in wicket 1.5 final version? no. the current version is feature complete and we are concentrating on bugfixing. a more sophisticated page management may be introduced in the future. we have concentrated on the 99% usecase and simplified the code for that. you can implement your own page storage strategies as you see fit. -igor Thanks for your replies. BR, Michal Kurtak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to get notified when a component is added to a hierarchy?
Hi everyone, I far as I could find out there is onRemove method which gets called once a component has been removed from its parent. But how about the opposite? How to get notified when a component is added to a hierarchy? (setParent is final) Best regards, Vitaly - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: multi-window support, pagestores and wicket 1.5
And one more thing. do you have some benchmarks comparing DiskDataStore, AsynchronousDataStore to Pagemaps stored in http sessions (as in earlier wicket versions)? I mean writing pages to disks comparing to writing them to http session (and replicating big sessions)? 2010/12/13 Michal Kurtak michal.kur...@gmail.com: Hmm... This solutions seems really good. sorry for bothering michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: when the page that is stored in http session is deserialized on another node it is also spooled to disk. so in a cluster all nodes have identical spooled pages - so everything should work. -igor On Mon, Dec 13, 2010 at 8:00 PM, Michal Kurtak michal.kur...@gmail.com wrote: Thank you for your replies Igor. I have another question regarding to clustered environment. Suppose we have versioned pages opened in two windows. If one node goes down, only the last page user made request from is stored in http session and replicated to other nodes. So i suppose that only one page would work and the state from the second page is lost. So multi-window support for stateful pages (even versioned) wouldn't work in clustered environment. Is this true? I think that even weird javascript solution for multiple windows would be good (it could be turned off by default), because we are unable to migrate our existing wicket projects, or create stateful application in multiple windows/tabs running in the cluster. This was supported out-of-box by wicket previous versions. I know that there is a possibility to provide implementation IPageManager, but there is missing support for browser window detection so its a bit more complicated to implement IPageManager supporting multiple windows in clustered environment. BR, Michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: On Sat, Dec 11, 2010 at 12:04 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hi folks, I know that there has been a lot of written about pagestores and multi-window support in wicket 1.5, but i have several other questions: 1. Is multi-window supported for non-versioned pages? If page is versioned everything works ok, but i always get StalePageExceptions when i use multiple windows/tabs with non-versioned pages. I think that StalePageException is useful in some cases when you wanna be sure that user has same page in all windows, but in older versions of wicket it was possible to have non versioned pages and multi-window support together (e.g. we have an application written in wicket 1.2.6 that uses non-versioned pages in multiple windows) no, it is not supported. supporting it has been problematic even in 1.4.x series where it required javascript and introduced a strange redirect that happened as soon as the page was loaded. unversioned pages also cause weird issues with the back button. if you want something that is unversioned then i think building it as stateless makes more sense. 2. How page stores work in clustered environment? In older versions of wicket we used pagemaps stored in HttpSession. When one node in cluster refuses to handle request, it was successfully handled by another nod, because HttpSession was replicated to another node. We have used non-versioned pages (no back button support needed) and in one pagemap there was max 5 pages. Wicket provided this functionality out-of-box. in both 1.4.x and 1.5.x by default we store the current page in session and the rest are spooled to disk. the current page is replicated to all nodes since it is stored in session, so any node can pick up a request. 3. How to achieve this in wicket 1.5? I have found PersistentPageManager which uses IPageStore to store pages. Pages are stored on disk by default, but there is also thread safe SerializedPagesCache with SoftReferences. Theres no out-of-box solution to store pages in HttpSession. I have also found file page-management.txt in org.apache.wicket.page package. It contains proposal of other pagamanagers and multi-window support for non-versioned pages. The proposal contains classes PersistentPageManager with DiskPageStore and SecondLevelCacheSessionStore for versioned pages SessionManager for holding non versioned pages in HttpSession. 4. Can we expect that this proposal will be implemented in wicket 1.5 final version? no. the current version is feature complete and we are concentrating on bugfixing. a more sophisticated page management may be introduced in the future. we have concentrated on the 99% usecase and simplified the code for that. you can implement your own page storage strategies as you see fit. -igor Thanks for your replies. BR, Michal Kurtak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To
Re: multi-window support, pagestores and wicket 1.5
thats how it works in 1.4.x as well. -igor On Mon, Dec 13, 2010 at 8:08 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hmm... This solutions seems really good. sorry for bothering michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: when the page that is stored in http session is deserialized on another node it is also spooled to disk. so in a cluster all nodes have identical spooled pages - so everything should work. -igor On Mon, Dec 13, 2010 at 8:00 PM, Michal Kurtak michal.kur...@gmail.com wrote: Thank you for your replies Igor. I have another question regarding to clustered environment. Suppose we have versioned pages opened in two windows. If one node goes down, only the last page user made request from is stored in http session and replicated to other nodes. So i suppose that only one page would work and the state from the second page is lost. So multi-window support for stateful pages (even versioned) wouldn't work in clustered environment. Is this true? I think that even weird javascript solution for multiple windows would be good (it could be turned off by default), because we are unable to migrate our existing wicket projects, or create stateful application in multiple windows/tabs running in the cluster. This was supported out-of-box by wicket previous versions. I know that there is a possibility to provide implementation IPageManager, but there is missing support for browser window detection so its a bit more complicated to implement IPageManager supporting multiple windows in clustered environment. BR, Michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: On Sat, Dec 11, 2010 at 12:04 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hi folks, I know that there has been a lot of written about pagestores and multi-window support in wicket 1.5, but i have several other questions: 1. Is multi-window supported for non-versioned pages? If page is versioned everything works ok, but i always get StalePageExceptions when i use multiple windows/tabs with non-versioned pages. I think that StalePageException is useful in some cases when you wanna be sure that user has same page in all windows, but in older versions of wicket it was possible to have non versioned pages and multi-window support together (e.g. we have an application written in wicket 1.2.6 that uses non-versioned pages in multiple windows) no, it is not supported. supporting it has been problematic even in 1.4.x series where it required javascript and introduced a strange redirect that happened as soon as the page was loaded. unversioned pages also cause weird issues with the back button. if you want something that is unversioned then i think building it as stateless makes more sense. 2. How page stores work in clustered environment? In older versions of wicket we used pagemaps stored in HttpSession. When one node in cluster refuses to handle request, it was successfully handled by another nod, because HttpSession was replicated to another node. We have used non-versioned pages (no back button support needed) and in one pagemap there was max 5 pages. Wicket provided this functionality out-of-box. in both 1.4.x and 1.5.x by default we store the current page in session and the rest are spooled to disk. the current page is replicated to all nodes since it is stored in session, so any node can pick up a request. 3. How to achieve this in wicket 1.5? I have found PersistentPageManager which uses IPageStore to store pages. Pages are stored on disk by default, but there is also thread safe SerializedPagesCache with SoftReferences. Theres no out-of-box solution to store pages in HttpSession. I have also found file page-management.txt in org.apache.wicket.page package. It contains proposal of other pagamanagers and multi-window support for non-versioned pages. The proposal contains classes PersistentPageManager with DiskPageStore and SecondLevelCacheSessionStore for versioned pages SessionManager for holding non versioned pages in HttpSession. 4. Can we expect that this proposal will be implemented in wicket 1.5 final version? no. the current version is feature complete and we are concentrating on bugfixing. a more sophisticated page management may be introduced in the future. we have concentrated on the 99% usecase and simplified the code for that. you can implement your own page storage strategies as you see fit. -igor Thanks for your replies. BR, Michal Kurtak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -
Re: multi-window support, pagestores and wicket 1.5
no, but you are welcome to test and ping us back with the results :) -igor On Mon, Dec 13, 2010 at 8:14 PM, Michal Kurtak michal.kur...@gmail.com wrote: And one more thing. do you have some benchmarks comparing DiskDataStore, AsynchronousDataStore to Pagemaps stored in http sessions (as in earlier wicket versions)? I mean writing pages to disks comparing to writing them to http session (and replicating big sessions)? 2010/12/13 Michal Kurtak michal.kur...@gmail.com: Hmm... This solutions seems really good. sorry for bothering michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: when the page that is stored in http session is deserialized on another node it is also spooled to disk. so in a cluster all nodes have identical spooled pages - so everything should work. -igor On Mon, Dec 13, 2010 at 8:00 PM, Michal Kurtak michal.kur...@gmail.com wrote: Thank you for your replies Igor. I have another question regarding to clustered environment. Suppose we have versioned pages opened in two windows. If one node goes down, only the last page user made request from is stored in http session and replicated to other nodes. So i suppose that only one page would work and the state from the second page is lost. So multi-window support for stateful pages (even versioned) wouldn't work in clustered environment. Is this true? I think that even weird javascript solution for multiple windows would be good (it could be turned off by default), because we are unable to migrate our existing wicket projects, or create stateful application in multiple windows/tabs running in the cluster. This was supported out-of-box by wicket previous versions. I know that there is a possibility to provide implementation IPageManager, but there is missing support for browser window detection so its a bit more complicated to implement IPageManager supporting multiple windows in clustered environment. BR, Michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: On Sat, Dec 11, 2010 at 12:04 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hi folks, I know that there has been a lot of written about pagestores and multi-window support in wicket 1.5, but i have several other questions: 1. Is multi-window supported for non-versioned pages? If page is versioned everything works ok, but i always get StalePageExceptions when i use multiple windows/tabs with non-versioned pages. I think that StalePageException is useful in some cases when you wanna be sure that user has same page in all windows, but in older versions of wicket it was possible to have non versioned pages and multi-window support together (e.g. we have an application written in wicket 1.2.6 that uses non-versioned pages in multiple windows) no, it is not supported. supporting it has been problematic even in 1.4.x series where it required javascript and introduced a strange redirect that happened as soon as the page was loaded. unversioned pages also cause weird issues with the back button. if you want something that is unversioned then i think building it as stateless makes more sense. 2. How page stores work in clustered environment? In older versions of wicket we used pagemaps stored in HttpSession. When one node in cluster refuses to handle request, it was successfully handled by another nod, because HttpSession was replicated to another node. We have used non-versioned pages (no back button support needed) and in one pagemap there was max 5 pages. Wicket provided this functionality out-of-box. in both 1.4.x and 1.5.x by default we store the current page in session and the rest are spooled to disk. the current page is replicated to all nodes since it is stored in session, so any node can pick up a request. 3. How to achieve this in wicket 1.5? I have found PersistentPageManager which uses IPageStore to store pages. Pages are stored on disk by default, but there is also thread safe SerializedPagesCache with SoftReferences. Theres no out-of-box solution to store pages in HttpSession. I have also found file page-management.txt in org.apache.wicket.page package. It contains proposal of other pagamanagers and multi-window support for non-versioned pages. The proposal contains classes PersistentPageManager with DiskPageStore and SecondLevelCacheSessionStore for versioned pages SessionManager for holding non versioned pages in HttpSession. 4. Can we expect that this proposal will be implemented in wicket 1.5 final version? no. the current version is feature complete and we are concentrating on bugfixing. a more sophisticated page management may be introduced in the future. we have concentrated on the 99% usecase and simplified the code for that. you can implement your own page storage strategies as you see fit. -igor Thanks for your replies. BR, Michal Kurtak - To unsubscribe, e-mail:
Re: How to get notified when a component is added to a hierarchy?
oninitialize() -igor On Mon, Dec 13, 2010 at 8:08 PM, Vitaly Tsaplin vitaly.tsap...@gmail.com wrote: Hi everyone, I far as I could find out there is onRemove method which gets called once a component has been removed from its parent. But how about the opposite? How to get notified when a component is added to a hierarchy? (setParent is final) Best regards, Vitaly - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get notified when a component is added to a hierarchy?
Hi Igor, It seams to be checking the flag.. if (!getFlag(FLAG_INITIALIZED)) { setFlag(FLAG_INITIALIZED, true); setFlag(FLAG_INITIALIZE_SUPER_CALL_VERIFIED, false); onInitialize(); My code adds and removes components via ajax dynamically. So it wouldn't be reasonably safe technique if the component gets re-attached twice within a single request. Vitaly 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: oninitialize() -igor On Mon, Dec 13, 2010 at 8:08 PM, Vitaly Tsaplin vitaly.tsap...@gmail.com wrote: Hi everyone, I far as I could find out there is onRemove method which gets called once a component has been removed from its parent. But how about the opposite? How to get notified when a component is added to a hierarchy? (setParent is final) Best regards, Vitaly - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get notified when a component is added to a hierarchy?
feel free to file an rfe. -igor On Mon, Dec 13, 2010 at 8:28 PM, Vitaly Tsaplin vitaly.tsap...@gmail.com wrote: Hi Igor, It seams to be checking the flag.. if (!getFlag(FLAG_INITIALIZED)) { setFlag(FLAG_INITIALIZED, true); setFlag(FLAG_INITIALIZE_SUPER_CALL_VERIFIED, false); onInitialize(); My code adds and removes components via ajax dynamically. So it wouldn't be reasonably safe technique if the component gets re-attached twice within a single request. Vitaly 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: oninitialize() -igor On Mon, Dec 13, 2010 at 8:08 PM, Vitaly Tsaplin vitaly.tsap...@gmail.com wrote: Hi everyone, I far as I could find out there is onRemove method which gets called once a component has been removed from its parent. But how about the opposite? How to get notified when a component is added to a hierarchy? (setParent is final) Best regards, Vitaly - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: multi-window support, pagestores and wicket 1.5
We are developing (at my employer) UI library based on wicket 1.5 (former version was based on wicket 1.2.6.) and we will make performance measurements so I can provide you some results:) But the tests will be made in January, if it doesn't matter 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: no, but you are welcome to test and ping us back with the results :) -igor On Mon, Dec 13, 2010 at 8:14 PM, Michal Kurtak michal.kur...@gmail.com wrote: And one more thing. do you have some benchmarks comparing DiskDataStore, AsynchronousDataStore to Pagemaps stored in http sessions (as in earlier wicket versions)? I mean writing pages to disks comparing to writing them to http session (and replicating big sessions)? 2010/12/13 Michal Kurtak michal.kur...@gmail.com: Hmm... This solutions seems really good. sorry for bothering michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: when the page that is stored in http session is deserialized on another node it is also spooled to disk. so in a cluster all nodes have identical spooled pages - so everything should work. -igor On Mon, Dec 13, 2010 at 8:00 PM, Michal Kurtak michal.kur...@gmail.com wrote: Thank you for your replies Igor. I have another question regarding to clustered environment. Suppose we have versioned pages opened in two windows. If one node goes down, only the last page user made request from is stored in http session and replicated to other nodes. So i suppose that only one page would work and the state from the second page is lost. So multi-window support for stateful pages (even versioned) wouldn't work in clustered environment. Is this true? I think that even weird javascript solution for multiple windows would be good (it could be turned off by default), because we are unable to migrate our existing wicket projects, or create stateful application in multiple windows/tabs running in the cluster. This was supported out-of-box by wicket previous versions. I know that there is a possibility to provide implementation IPageManager, but there is missing support for browser window detection so its a bit more complicated to implement IPageManager supporting multiple windows in clustered environment. BR, Michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: On Sat, Dec 11, 2010 at 12:04 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hi folks, I know that there has been a lot of written about pagestores and multi-window support in wicket 1.5, but i have several other questions: 1. Is multi-window supported for non-versioned pages? If page is versioned everything works ok, but i always get StalePageExceptions when i use multiple windows/tabs with non-versioned pages. I think that StalePageException is useful in some cases when you wanna be sure that user has same page in all windows, but in older versions of wicket it was possible to have non versioned pages and multi-window support together (e.g. we have an application written in wicket 1.2.6 that uses non-versioned pages in multiple windows) no, it is not supported. supporting it has been problematic even in 1.4.x series where it required javascript and introduced a strange redirect that happened as soon as the page was loaded. unversioned pages also cause weird issues with the back button. if you want something that is unversioned then i think building it as stateless makes more sense. 2. How page stores work in clustered environment? In older versions of wicket we used pagemaps stored in HttpSession. When one node in cluster refuses to handle request, it was successfully handled by another nod, because HttpSession was replicated to another node. We have used non-versioned pages (no back button support needed) and in one pagemap there was max 5 pages. Wicket provided this functionality out-of-box. in both 1.4.x and 1.5.x by default we store the current page in session and the rest are spooled to disk. the current page is replicated to all nodes since it is stored in session, so any node can pick up a request. 3. How to achieve this in wicket 1.5? I have found PersistentPageManager which uses IPageStore to store pages. Pages are stored on disk by default, but there is also thread safe SerializedPagesCache with SoftReferences. Theres no out-of-box solution to store pages in HttpSession. I have also found file page-management.txt in org.apache.wicket.page package. It contains proposal of other pagamanagers and multi-window support for non-versioned pages. The proposal contains classes PersistentPageManager with DiskPageStore and SecondLevelCacheSessionStore for versioned pages SessionManager for holding non versioned pages in HttpSession. 4. Can we expect that this proposal will be implemented in wicket 1.5 final version? no. the current version is feature complete and we are concentrating on bugfixing. a more sophisticated page management may be introduced in the future. we have
Re: multi-window support, pagestores and wicket 1.5
anytime is good. cheers, -igor On Mon, Dec 13, 2010 at 8:41 PM, Michal Kurtak michal.kur...@gmail.com wrote: We are developing (at my employer) UI library based on wicket 1.5 (former version was based on wicket 1.2.6.) and we will make performance measurements so I can provide you some results:) But the tests will be made in January, if it doesn't matter 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: no, but you are welcome to test and ping us back with the results :) -igor On Mon, Dec 13, 2010 at 8:14 PM, Michal Kurtak michal.kur...@gmail.com wrote: And one more thing. do you have some benchmarks comparing DiskDataStore, AsynchronousDataStore to Pagemaps stored in http sessions (as in earlier wicket versions)? I mean writing pages to disks comparing to writing them to http session (and replicating big sessions)? 2010/12/13 Michal Kurtak michal.kur...@gmail.com: Hmm... This solutions seems really good. sorry for bothering michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: when the page that is stored in http session is deserialized on another node it is also spooled to disk. so in a cluster all nodes have identical spooled pages - so everything should work. -igor On Mon, Dec 13, 2010 at 8:00 PM, Michal Kurtak michal.kur...@gmail.com wrote: Thank you for your replies Igor. I have another question regarding to clustered environment. Suppose we have versioned pages opened in two windows. If one node goes down, only the last page user made request from is stored in http session and replicated to other nodes. So i suppose that only one page would work and the state from the second page is lost. So multi-window support for stateful pages (even versioned) wouldn't work in clustered environment. Is this true? I think that even weird javascript solution for multiple windows would be good (it could be turned off by default), because we are unable to migrate our existing wicket projects, or create stateful application in multiple windows/tabs running in the cluster. This was supported out-of-box by wicket previous versions. I know that there is a possibility to provide implementation IPageManager, but there is missing support for browser window detection so its a bit more complicated to implement IPageManager supporting multiple windows in clustered environment. BR, Michal 2010/12/13 Igor Vaynberg igor.vaynb...@gmail.com: On Sat, Dec 11, 2010 at 12:04 PM, Michal Kurtak michal.kur...@gmail.com wrote: Hi folks, I know that there has been a lot of written about pagestores and multi-window support in wicket 1.5, but i have several other questions: 1. Is multi-window supported for non-versioned pages? If page is versioned everything works ok, but i always get StalePageExceptions when i use multiple windows/tabs with non-versioned pages. I think that StalePageException is useful in some cases when you wanna be sure that user has same page in all windows, but in older versions of wicket it was possible to have non versioned pages and multi-window support together (e.g. we have an application written in wicket 1.2.6 that uses non-versioned pages in multiple windows) no, it is not supported. supporting it has been problematic even in 1.4.x series where it required javascript and introduced a strange redirect that happened as soon as the page was loaded. unversioned pages also cause weird issues with the back button. if you want something that is unversioned then i think building it as stateless makes more sense. 2. How page stores work in clustered environment? In older versions of wicket we used pagemaps stored in HttpSession. When one node in cluster refuses to handle request, it was successfully handled by another nod, because HttpSession was replicated to another node. We have used non-versioned pages (no back button support needed) and in one pagemap there was max 5 pages. Wicket provided this functionality out-of-box. in both 1.4.x and 1.5.x by default we store the current page in session and the rest are spooled to disk. the current page is replicated to all nodes since it is stored in session, so any node can pick up a request. 3. How to achieve this in wicket 1.5? I have found PersistentPageManager which uses IPageStore to store pages. Pages are stored on disk by default, but there is also thread safe SerializedPagesCache with SoftReferences. Theres no out-of-box solution to store pages in HttpSession. I have also found file page-management.txt in org.apache.wicket.page package. It contains proposal of other pagamanagers and multi-window support for non-versioned pages. The proposal contains classes PersistentPageManager with DiskPageStore and SecondLevelCacheSessionStore for versioned pages SessionManager for holding non versioned pages in HttpSession. 4. Can we expect that this proposal will be implemented in wicket 1.5 final version? no. the current version is feature complete and
RE: Best practice for content without encompassing tag
MartinG said it is OK, I like it. Also, I am blbrown on #freenode.wicket. I may ask you about it later. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, December 13, 2010 11:43 AM To: users@wicket.apache.org Subject: Re: Best practice for content without encompassing tag Both are OK On Mon, Dec 13, 2010 at 5:39 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Should I use wicket:container for a section of html that I want to include on my page without having a particular tag rendered to the user. For example, if I just want to output the text Data without outputting 'div' or 'span', should I use wicket:container. Or could I use something like setRenderBodyOnly? wicket:container Data /wicket:container Output HTML: Data Berlin Brown - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to retrieve ListItem objects from a ListView
I have the following use case : Having built a page using a standard ListView and implementing populateItem(), I then want to pass the ListView to a method, extract the contents, and use those contents to build a spreadsheet, cvs file, etc. This way, there will be no need to repeat the same logic (i.e. the logic used in populateItem()), in more than one place. What is the best way to extract this information? In the debugger I can see that the 'children' variable of the ListView has the info I want, but it is not clear to me how, using the API, to get the ListView objects from the ListView. As always, help is greatly appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-retrieve-ListItem-objects-from-a-ListView-tp3085988p3085988.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WebMarkupContainer not refreshing after form error
Hey guys, I have a unique error. I have a form and I have a few fields in that form wrapped in a webMarkupContainer to refresh once a selection has been made. This handles default values based on another form value nicely and everything works fine. My problem is that I also have required fields in this form. If the user tries to submit the form without filling out the required fields then they get the proper error. The only issue is that once this is done, the WebMarkupContainer no longer refreshes like it should. It is like the Container has lost connection to the page or something. Anyone have a clue what might be going on? Thanks T -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebMarkupContainer-not-refreshing-after-form-error-tp3085989p3085989.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to retrieve ListItem objects from a ListView
Most of the time you just need listView.getDefaultModel(). Anyway, to get children you may use listView.iterator() or .visitChildren() to iterate over them On Mon, Dec 13, 2010 at 8:19 PM, drf davidrfi...@gmail.com wrote: I have the following use case : Having built a page using a standard ListView and implementing populateItem(), I then want to pass the ListView to a method, extract the contents, and use those contents to build a spreadsheet, cvs file, etc. This way, there will be no need to repeat the same logic (i.e. the logic used in populateItem()), in more than one place. What is the best way to extract this information? In the debugger I can see that the 'children' variable of the ListView has the info I want, but it is not clear to me how, using the API, to get the ListView objects from the ListView. As always, help is greatly appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-retrieve-ListItem-objects-from-a-ListView-tp3085988p3085988.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebMarkupContainer not refreshing after form error
show some code On Mon, Dec 13, 2010 at 8:19 PM, taygolf taylor.a.yo...@gmail.com wrote: Hey guys, I have a unique error. I have a form and I have a few fields in that form wrapped in a webMarkupContainer to refresh once a selection has been made. This handles default values based on another form value nicely and everything works fine. My problem is that I also have required fields in this form. If the user tries to submit the form without filling out the required fields then they get the proper error. The only issue is that once this is done, the WebMarkupContainer no longer refreshes like it should. It is like the Container has lost connection to the page or something. Anyone have a clue what might be going on? Thanks T -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WebMarkupContainer-not-refreshing-after-form-error-tp3085989p3085989.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to retrieve ListItem objects from a ListView
Not really sure if this is what you are trying to achieve but here it is anyway: public final ListT ListView#getModelObject() On Mon, Dec 13, 2010 at 8:19 PM, drf davidrfi...@gmail.com wrote: I have the following use case : Having built a page using a standard ListView and implementing populateItem(), I then want to pass the ListView to a method, extract the contents, and use those contents to build a spreadsheet, cvs file, etc. This way, there will be no need to repeat the same logic (i.e. the logic used in populateItem()), in more than one place. What is the best way to extract this information? In the debugger I can see that the 'children' variable of the ListView has the info I want, but it is not clear to me how, using the API, to get the ListView objects from the ListView. As always, help is greatly appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-retrieve-ListItem-objects-from-a-ListView-tp3085988p3085988.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketRuntimeException: component not found on page
Hello, The problem was solved by the advice I got from a wiquery developer. He said it was a common problem which happens when double ajax requests are issued where the first ajax request rewrite a component, and the next one refer to it. I solved the problem by preventing it by using the technique introduced at the following link, and it works. http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/ Thanks, Takeo Hosomi On Thu, Dec 9, 2010 at 4:56 PM, Takeo Hosomi takeo.hos...@gmail.com wrote: I attached it to a JIRA. https://issues.apache.org/jira/browse/WICKET-3248 Thanks, Takeo Hosomi On Thu, Dec 9, 2010 at 4:12 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Attach the zip of the quickstart to a JIRA. Jeremy Thomerson http://wickettraining.com -- sent from my smart phone, so please excuse spelling, formatting, or compiler errors On Dec 9, 2010 4:15 PM, Takeo Hosomi takeo.hos...@gmail.com wrote: Hello, I have the same issue which is discussed in the following link: http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html I made a quickstart to reproduce it. Any idea on how to workaround this behavior? I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip (other-plugins-1.1.jar). Thanks, Takeo Hosomi Step1. Use following source code to reproduce the problem. Java: import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.markup.html.CSSPackageResource; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.PageableListView; import org.apache.wicket.markup.html.panel.Panel; import org.odlabs.wiquery.ui.themes.ThemeUiHelper; import org.odlabs.wiquery.ui.themes.UiIcon; import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour; import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior; import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler; import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset; import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position; public class TestPanel extends Panel { private static final long serialVersionUID = 1L; private static int rowHeight = 40; public TestPanel(String id) { super(id); setOutputMarkupId(true); add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS)); // Tooltip Indicator final WebMarkupContainer indiIcon = new WebMarkupContainer(indiIcon); ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST); final WebMarkupContainer tooltipIndicator = new WebMarkupContainer(indi); tooltipIndicator.add(indiIcon); tooltipIndicator.add(new SimpleAttributeModifier(style, display:none;background-color:#C4C4C4; + height:+20+px; + padding-top:+((rowHeight-20)/2-1)+px;padding-bottom:+((rowHeight-20)/2-1)+px;)); tooltipIndicator.setOutputMarkupId(true); add(tooltipIndicator); // Container WebMarkupContainer container = new WebMarkupContainer(container); container.setOutputMarkupId(true); add(container); PageableListViewDummyUser users = new PageableListViewDummyUser(user, dummyUsers(), 3){ /***/ private static final long serialVersionUID = 1L; @Override protected void populateItem(ListItemDummyUser item) { item.add(new SimpleAttributeModifier(style,height:+rowHeight+px;)); item.add(new Label(name, item.getModelObject().getName())); item.add(new Label(first, item.getModelObject().getFirst())); item.add(new Label(last, item.getModelObject().getLast())); item.add(new TooltipAjaxBehaviour() .setDelay(0) // TODO magic number 400ms .setPredelay(0) .setPosition(Position.bottom_right) .setOffset(new Offset(-(rowHeight-1),-15)) // y,x .setTip(tooltipIndicator) .setOnBeforeShow(new IToolTipOnBeforeShowUIEventHandler() { private static final long serialVersionUID = 1L; public void onEvent(AjaxRequestTarget
Re: Feedback panel and FormComponentLabel for form components : how to?
I realize my last post was a mess so here is an attempt to summarize it: I'm trying to turn input wicket:id=name/ which renders as input name=name id=some_generated_wicked_id/ to something that will render like this: label for=generated_idlabel/label * -FormComponentLabel* input name=name id=generated_id/* -Original FormComponent* div/div *-ComponentFeedbackPanel* I managed to accomplish this using a panel, but its still not perfect. Here is what I have so far: The panel code: public class FormComponentLabelAndFeedbackWrapperT extends Panel { public static final String COMP_ID = comp; public FormComponentLabelAndFeedbackWrapper(String id, FormComponentT comp) { super(id); if (!COMP_ID.equals(comp.getId())) { throw new IllegalArgumentException(formcomponent id must be + COMP_ID); } setDefaultModel(comp.getModel()); add(new FormComponentLabel(compLabel, comp)); add(comp); add(new ComponentFeedbackPanel(compFeedback, comp)); } @Override protected void onComponentTag(ComponentTag tag) { tag.setName(div); super.onComponentTag(tag); } } Associated markup: wicket:panel label wicket:id=compLabel[label for]/label input wicket:id=comp/input div wicket:id=compFeedback[feedback for comp]/div /wicket:panel example of use in code: form.add(new FormComponentLabelAndFeedbackWrapperString(name, new TextFieldString(FormComponentLabelAndFeedbackWrapper.COMP_ID, new PropertyModelString(user, firstName; The problem is that I can only use form components that are related to input tag because if I use wicket:container instead of input the form component onComponentTag will throw an exception when checking the tag. -Is there anyway to somehow use wicket:container and change the tag somehow before the form component onComponentTag method is called? -This feels kind of hacky, can anyone suggest another method to achieve the original goal?
RE: resource for href=...
Hmm, is it possible from Image object get url for image which is generated in Image(id, file_path)? If yes, than it should be possible with AttributeModifier change href in Link object.. -Original Message- From: Zilvinas Vilutis [mailto:cika...@gmail.com] Sent: Monday, December 13, 2010 9:11 AM To: users@wicket.apache.org Subject: Re: resource for href=... Image class creates a LocalizedImageResource which creates a resource reference from a file. What you can do ( probably not recommended ) is extend the Image class to retrieve the URL dynamically e.g. http://pastebin.com/XCpcgLzC Regards Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: In img src I can use just path, the constructor for Image will translate it to right path for use in view. Not so ExternalLink. I know doc you pointing me, not suitable for me (I think) because I have images on the same server as app (under Tomcat). Maybe ExternalLink I'm using isn't right class? Is it possible to use path in onClick method in Link class? -Original Message- From: Zilvinas Vilutis [mailto:cika...@gmail.com] Sent: Monday, December 13, 2010 8:27 AM To: Ladislav DANKO Cc: users@wicket.apache.org Subject: Re: resource for href=... I don't think you can just use the file path ( and that is not secure... ) Please read the following to understand how to use resource reference on external images: https://cwiki.apache.org/WICKET/how-to-load-an-external-image.html Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: Snippet of code (note relevant removed): //file list in folder, sorted Folder folder = ((Start)Application.get()).getUploadFolder(); File[] files = folder.getFiles(); ListFile lList = Arrays.asList(files); Collections.sort(lList); //for every image create clickable link with image as link RepeatingView view = new RepeatingView(repeater); IteratorFile iterator = lList.iterator(); while(iterator.hasNext()) { iterator.next(); String fileName = lList.get(i).getName(); String path = photo/ + fileName; String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(photoPath, path).add(new Image(image, path))); view.add(clickableImg); } this.add(view); In the final I have right path for img src and wrong path in a href Laco -Original Message- From: Zilvinas Vilutis [mailto:cika...@gmail.com] Sent: Monday, December 13, 2010 8:11 AM To: users@wicket.apache.org Subject: Re: resource for href=... I don't see where your path is constructed. Did you want to construct an url for an Image ResourceReference ? Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: No, I don't need to download it, what I need is right path in href attribute in anchor html tag as is in img html tag (created as new Image). -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 12:13 AM To: users@wicket.apache.org Subject: Re: resource for href=... You want it to download the image? Try DownloadLink. On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net wrote: Hi guys, another question -have code (PhotoRepeater extends Panel, view is RepeatingView): ... String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(fotoPath, path).add(new Image(image, path))); view.add(clickableImg); this.add(view); .. and markup: wicket:panel a wicket:id=fotoPath title= rel=lightbox[svatebni] href=# img wicket:id=image width=90px border=2px / /a /wicket:panel It works, but in final markup there is: a href=photo/01_sv_76.jpg rel=lightbox[test] title= img border=2px width=90px src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg / /a so image is shown (right path to image resource) but not clickable (wrong path). I'm using ExternalLink in wrong way but I don't know the right way. Can you help me gyus, please? Laco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback panel and FormComponentLabel for form components : how to?
use a behavior to render all the html. if you want to render using wicket components and not html use a border -igor On Mon, Dec 13, 2010 at 9:47 PM, Sam Zilverberg samzilverb...@gmail.com wrote: I realize my last post was a mess so here is an attempt to summarize it: I'm trying to turn input wicket:id=name/ which renders as input name=name id=some_generated_wicked_id/ to something that will render like this: label for=generated_idlabel/label * -FormComponentLabel* input name=name id=generated_id/* -Original FormComponent* div/div *-ComponentFeedbackPanel* I managed to accomplish this using a panel, but its still not perfect. Here is what I have so far: The panel code: public class FormComponentLabelAndFeedbackWrapperT extends Panel { public static final String COMP_ID = comp; public FormComponentLabelAndFeedbackWrapper(String id, FormComponentT comp) { super(id); if (!COMP_ID.equals(comp.getId())) { throw new IllegalArgumentException(formcomponent id must be + COMP_ID); } setDefaultModel(comp.getModel()); add(new FormComponentLabel(compLabel, comp)); add(comp); add(new ComponentFeedbackPanel(compFeedback, comp)); } �...@override protected void onComponentTag(ComponentTag tag) { tag.setName(div); super.onComponentTag(tag); } } Associated markup: wicket:panel label wicket:id=compLabel[label for]/label input wicket:id=comp/input div wicket:id=compFeedback[feedback for comp]/div /wicket:panel example of use in code: form.add(new FormComponentLabelAndFeedbackWrapperString(name, new TextFieldString(FormComponentLabelAndFeedbackWrapper.COMP_ID, new PropertyModelString(user, firstName; The problem is that I can only use form components that are related to input tag because if I use wicket:container instead of input the form component onComponentTag will throw an exception when checking the tag. -Is there anyway to somehow use wicket:container and change the tag somehow before the form component onComponentTag method is called? -This feels kind of hacky, can anyone suggest another method to achieve the original goal? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: resource for href=...
It is link for lightbox so it will know where the image for display is. Laco -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 2:24 PM To: users@wicket.apache.org Subject: Re: resource for href=... What do you want it to do when you click it? 2010/12/13 Ladislav DANKO em...@1ac0.net: No, I don't need to download it, what I need is right path in href attribute in anchor html tag as is in img html tag (created as new Image). -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 12:13 AM To: users@wicket.apache.org Subject: Re: resource for href=... You want it to download the image? Try DownloadLink. On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net wrote: Hi guys, another question -have code (PhotoRepeater extends Panel, view is RepeatingView): ... String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(fotoPath, path).add(new Image(image, path))); view.add(clickableImg); this.add(view); .. and markup: wicket:panel a wicket:id=fotoPath title= rel=lightbox[svatebni] href=# img wicket:id=image width=90px border=2px / /a /wicket:panel It works, but in final markup there is: a href=photo/01_sv_76.jpg rel=lightbox[test] title= img border=2px width=90px src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg/ /a so image is shown (right path to image resource) but not clickable (wrong path). I'm using ExternalLink in wrong way but I don't know the right way. Can you help me gyus, please? Laco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: resource for href=...
Can u use only the Image component? I don't think you actually need an Link at your component structure if your JavaScript framework needs only the src attribute value at the img tag. 2010/12/13 Ladislav DANKO em...@1ac0.net It is link for lightbox so it will know where the image for display is. Laco -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 2:24 PM To: users@wicket.apache.org Subject: Re: resource for href=... What do you want it to do when you click it? 2010/12/13 Ladislav DANKO em...@1ac0.net: No, I don't need to download it, what I need is right path in href attribute in anchor html tag as is in img html tag (created as new Image). -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 12:13 AM To: users@wicket.apache.org Subject: Re: resource for href=... You want it to download the image? Try DownloadLink. On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net wrote: Hi guys, another question -have code (PhotoRepeater extends Panel, view is RepeatingView): ... String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(fotoPath, path).add(new Image(image, path))); view.add(clickableImg); this.add(view); .. and markup: wicket:panel a wicket:id=fotoPath title= rel=lightbox[svatebni] href=# img wicket:id=image width=90px border=2px / /a /wicket:panel It works, but in final markup there is: a href=photo/01_sv_76.jpg rel=lightbox[test] title= img border=2px width=90px src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg/ /a so image is shown (right path to image resource) but not clickable (wrong path). I'm using ExternalLink in wrong way but I don't know the right way. Can you help me gyus, please? Laco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: Announcing the Topicus Dashboard
The competition has run its course and unfortunately the Topicus Dashboard is not the winner, however we did get an honorable mention from the judges: This wallboard also boasts a very clean and simple design with sexy animations. Products stats, builds and issue details are complimented by local railway schedules, twitter, weather, and google calendars -- including birthdays and beer time! Features like tracking transport delays, the excellent two speed ticker at the bottom, and the polish of the CSS animations all stand out in this demo. - Dick Wall You can read more about the competition and our dashboard here: http://martijndashorst.com/blog/2010/12/13/atlassian-ultimate-wallboard-competition-comes-to-an-end/ Thanks to everybody that managed to get a vote in during the 8 hours of voting that were left. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: resource for href=...
Why don't you just check-out the source code of wicket lightbox: http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-lightbox to check how it's done there once you decided to write your own one... Regards Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com 2010/12/13 Ladislav DANKO em...@1ac0.net: It is link for lightbox so it will know where the image for display is. Laco -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 2:24 PM To: users@wicket.apache.org Subject: Re: resource for href=... What do you want it to do when you click it? 2010/12/13 Ladislav DANKO em...@1ac0.net: No, I don't need to download it, what I need is right path in href attribute in anchor html tag as is in img html tag (created as new Image). -Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, December 13, 2010 12:13 AM To: users@wicket.apache.org Subject: Re: resource for href=... You want it to download the image? Try DownloadLink. On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO em...@1ac0.net wrote: Hi guys, another question -have code (PhotoRepeater extends Panel, view is RepeatingView): ... String compID = view.newChildId(); PhotoRepeater clickableImg = new PhotoRepeater(compID); clickableImg.add(new ExternalLink(fotoPath, path).add(new Image(image, path))); view.add(clickableImg); this.add(view); .. and markup: wicket:panel a wicket:id=fotoPath title= rel=lightbox[svatebni] href=# img wicket:id=image width=90px border=2px / /a /wicket:panel It works, but in final markup there is: a href=photo/01_sv_76.jpg rel=lightbox[test] title= img border=2px width=90px src=resources/eu.testApp.MyPagePhotoRepeater/phfoto/01_sv_76.jpg/ /a so image is shown (right path to image resource) but not clickable (wrong path). I'm using ExternalLink in wrong way but I don't know the right way. Can you help me gyus, please? Laco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
how to validate a Label?
Hi, I need to validate a readonly Label with required which displays some selection from a modalwindow. But a Label is not a formcomponent , so I cannot use setRequired() to fulfill my requirement. If I use a TextField/setEnable(false)/setRequired(true) for instead, the validator also become disable. Do anyone give me some advice? Thank you! Roland. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-validate-a-Label-tp3086348p3086348.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to validate a Label?
hidden field? On Mon, Dec 13, 2010 at 8:35 PM, rolandpeng rolandp...@cht.com.tw wrote: Hi, I need to validate a readonly Label with required which displays some selection from a modalwindow. But a Label is not a formcomponent , so I cannot use setRequired() to fulfill my requirement. If I use a TextField/setEnable(false)/setRequired(true) for instead, the validator also become disable. Do anyone give me some advice? Thank you! Roland. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-validate-a-Label-tp3086348p3086348.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to validate a Label?
I've tried a Label + TextField/setVisible(false)/setRequired(true) as well. But as the TextField is hidden,the required validation also disable ,either. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-validate-a-Label-tp3086348p3086378.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to validate a Label?
oh, thank you for the hint. I find a HiddenField in the form package. I'll try this component later. Thank you again! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-validate-a-Label-tp3086348p3086380.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to validate a Label?
That's the ticket! Good luck, On Mon, Dec 13, 2010 at 9:18 PM, rolandpeng rolandp...@cht.com.tw wrote: oh, thank you for the hint. I find a HiddenField in the form package. I'll try this component later. Thank you again! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-validate-a-Label-tp3086348p3086380.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to listen for CHILD ajax form submits
I have a panel. I cannot figure out a way to have this panel informed if any of its children happens to exectute an AjaxFormSubmittingBehavior form submit. Ideally, I'd like my panel to listen for this, and have access to the AjaxRequestTarget. Is there a reasonable way to do this? My panel does not define the child hierarchy, or where/if there is a form that will be submitted via ajax from within panel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-listen-for-CHILD-ajax-form-submits-tp3086439p3086439.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback panel and FormComponentLabel for form components : how to?
Thanks, that was pretty short and clear :) I decided to go with border so that if I decide I need some ajax behavior for a field I will be able to easily do addComponent(borderOfComponent). I wish there was some flag to tell wicket that it doesn't need to check that form components are associated with the right tag and maybe even a flag to tell these components to force the right tag by tag.setName(select). It would make dynamically rendering of inputs easier because we could have some html template like span wicket:id=input be filled with a wicket form component at runtime without having to hard code the input type into the template.