CheckGroup and ListView
I use a ListView to populate a CheckGroup with Check objects. It works fine and all the check boxes are displayed properly. But when I try to add a new check box to the ones previously added, I keep getting the new one along with the previous ones in duplicate. Here is my code. (I apologize for the format of the code) protected void addCheckGroup( List list) throws Exception { Object object = getDefaultModelObject(); checkGroupSelectableValues = new CheckGroup("selectedValues"); //checkGroupSelectableValues.add(new CheckGroupSelectors("groupSelector")); selectableValues = new ListView("selections", list) { /** * */ private static final long serialVersionUID = 1L; @Override protected void populateItem( ListItem item) { item.add(new Check("check", item.getModel())); item.add(new Label("value", new PropertyModel(item.getModel(), "value"))); } }; checkGroupSelectableValues.add(selectableValues); selectableValues.setOutputMarkupPlaceholderTag(true); checkGroupSelectableValues.setRenderBodyOnly(false); checkGroupSelectableValues.setOutputMarkupPlaceholderTag(true); add(checkGroupSelectableValues); } protected void addNewSelectableValue( AjaxRequestTarget target) throws Exception { List list; // new list with the new SelectableValue added selectableValues.removeAll(); // making sure to remove previous object selectableValues.setList(list); // Adding the new list to the ListView checkGroupSelectableValues.removeAll(); // making sure to remove previous check boxes. checkGroupSelectableValues.add(selectableValues); target.addComponent(checkGroupSelectableValues); } I have tried different other methods but either I get the previous values in duplicates or the new value does not show up. I will appreciate help in solving this issue. Thanks Mohammad
Re: Google Charts integration
Yeah, the things I usually change are, just bumping wicket version and Javascript dependency version. And most times that just works. 2010/4/12 Major Péter : > There is nothing much wicket specific in the project, it only extends a > WebComponent. As far as I saw, the Google Chart didn't change much too. > So it's most probably going to work without any issue after bumping. > > Regards, > Peter > > 2010-04-12 16:01 keltezéssel, nino martinez wael írta: >> So someone should bump the version.. Anyone knows if the project are >> still active?.. I might be headed down the googlecharts road and if I >> go there. I'll make sure the project works on wicket 1.4.7 and update >> the project .. >> >> 2010/4/12 Major Péter : >>> Hi, >>> >>> I've just checked out the project from >>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-googlecharts/ >>> and after changing the wicket version in the pom, it still compiles, so >>> it worth a try. :) >>> >>> Regards, >>> Peter >>> >>> 2010-04-12 15:00 keltezéssel, Alexander Monakhov írta: Hi, guys. Is there currently any integration of google charts with wicket? I've found some articles like that http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts. But they are really old. So, I'm curious whether there is any active integration with google charts. Best regards, Alexander. > > - > 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 stable DOM IDs without hacks?
Thanks a lot to you both for your solutions! Regards Bernard On Mon, 12 Apr 2010 23:36:16 -0400, you wrote: >Like Pierre said, component.setMarkupId(component.getId()) will work, but it >was discussed just a couple of weeks ago why that's a bad approach. The >thread isn't appearing on nabble though, not sure why that is. Anyway, a >safer approach (to prevent duplicate ID issues) is to generate your javascript >calls at the server using the markup ID as a parameter. It sounds like you >have a function like > >function func() { > var elem = document.getElementById("someId"); > // do stuff to the element >} > >so just modify to > >function func(id) { > var elem = document.getElementById(id); > // do stuff to the element >} > >and output a call to that function using something like a >StringHeaderContributor or implement IHeaderContributor if you need to call at >page load or use AjaxRequestTarget if in an ajax request. > >- Original Message - >From: Pierre Goupil >[mailto:goupilpie...@gmail.com] >To: users@wicket.apache.org >Sent: Mon, 12 >Apr 2010 18:36:55 -0400 >Subject: Re: How to get stable DOM IDs without >hacks? > > >> Hello, >> >> You can use myComponent.setMarkupId("blah"), but then it's up to you to >> ensure the id uniqueness. >> >> Regards, >> >> Pierre >> >> >> On Tue, Apr 13, 2010 at 12:35 AM, wrote: >> >> > Hi, >> > >> > Wicket has its own mind - it changes IDs in HTML forms so JavaScript >> > breaks. >> > >> > Example: >> > >> > Source: >> > > > value="Add"/> >> > >> > Generated: >> > >> > >> > Please note that Wicket renames the id from "addButton" to >> > "addButtona" while it does not change the name attribute value. >> > >> > So we would have to create a Button subclass and: >> > >> >@Override >> >public String getMarkupId(){ >> >// As an example, use the wicket:id value ... >> >return getId(); >> >} >> > >> > and in HTML, we have to write a warning as a reminder of this hack: >> > >> > >> > This is a maintenance problem and a performance problem because the >> > additinal classes cost memory and CPU. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Bernard >> > >> > >> > - >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> > For additional commands, e-mail: users-h...@wicket.apache.org >> > >> > >> >> >> -- >> Les deux règles universelles du bide : >> >> 1) on n'explique pas un bide >> >> 2) dans le futur, un bide sera toujours un bide. >> > >- >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 make a wicket web editor
Well, if you know how to use JQuery you can "hard" code the javascript and html into the page, which is pretty easy and obvious as it just goes into the HTML. The other option if your familiar at all with Wicket is to put it into a panel to allow more control and usability. On Mon, Apr 12, 2010 at 9:59 AM, wicketyan wrote: > > hi guys,I'm a freshman on js.Could anyone tell me how to user a web editor > in wicket.I know wicket-stuff already have a project tinymce,But I don't > like tinymce.There are so many web editor,I want to use my favorated > editor.I just knew a little about abstractajaxbehavior,But something deep is > hard for me,for example,the ajax upload using jquery.How to encapsulate > ajax upload using wicket? to understand tinymce project is hard for me > now.so, hope someone can tell me how to use these editor writted by jquery > or introduce tinymce project's detail about image upload. > > the editor xheditor use this > > > $('#elm2').xheditor({upLinkUrl:"upload.php?immediate=1",upLinkExt:"zip,rar,txt",upImgUrl:"upload.php?immediate=1",upImgExt:"jpg,jpeg,gif,png",upFlashUrl:"upload.php?immediate=1",upFlashExt:"swf",upMediaUrl:"upload.php?immediate=1",upMediaExt:"avi"}); > > the upload.php?immediate=1 is a interface to save the data,and if I use > servlet ,that's easy.chang the url to a new url like x.do,writing a > url-pattern in web.xml. But this is not a wicket way. > 2010-04-12 > > > > wicketyan >
Re: How to get stable DOM IDs without hacks?
Like Pierre said, component.setMarkupId(component.getId()) will work, but it was discussed just a couple of weeks ago why that's a bad approach. The thread isn't appearing on nabble though, not sure why that is. Anyway, a safer approach (to prevent duplicate ID issues) is to generate your javascript calls at the server using the markup ID as a parameter. It sounds like you have a function like function func() { var elem = document.getElementById("someId"); // do stuff to the element } so just modify to function func(id) { var elem = document.getElementById(id); // do stuff to the element } and output a call to that function using something like a StringHeaderContributor or implement IHeaderContributor if you need to call at page load or use AjaxRequestTarget if in an ajax request. - Original Message - From: Pierre Goupil [mailto:goupilpie...@gmail.com] To: users@wicket.apache.org Sent: Mon, 12 Apr 2010 18:36:55 -0400 Subject: Re: How to get stable DOM IDs without hacks? > Hello, > > You can use myComponent.setMarkupId("blah"), but then it's up to you to > ensure the id uniqueness. > > Regards, > > Pierre > > > On Tue, Apr 13, 2010 at 12:35 AM, wrote: > > > Hi, > > > > Wicket has its own mind - it changes IDs in HTML forms so JavaScript > > breaks. > > > > Example: > > > > Source: > > > value="Add"/> > > > > Generated: > > > > > > Please note that Wicket renames the id from "addButton" to > > "addButtona" while it does not change the name attribute value. > > > > So we would have to create a Button subclass and: > > > >@Override > >public String getMarkupId(){ > >// As an example, use the wicket:id value ... > >return getId(); > >} > > > > and in HTML, we have to write a warning as a reminder of this hack: > > > > > > This is a maintenance problem and a performance problem because the > > additinal classes cost memory and CPU. > > > > Any ideas? > > > > Thanks, > > > > Bernard > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > -- > Les deux règles universelles du bide : > > 1) on n'explique pas un bide > > 2) dans le futur, un bide sera toujours un bide. > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket And GAE
Biggest problem, and IMO a show stopper, is the Serialization issues. Since Wicket serializes session data (pagemap etc) you have to enable the GAE session-store to get wicket working correctly on GAE. GAE clusters sessions by writing them to the GAE data store to spread the session across the cluster - and writes are *slow*. Worse though, if you create an incompatible change to a serialized page/component/model, when that user returns to your application, GAE will quietly fail and the user will get a blank page. Checking the GAE error log reveals a deserialization error in the core GAE engine. This is because the session reserialization in GAE is handled at the GAE/Jetty level and any error in reconsitution of the error currently breaks GAE completely. Google has acknowledged this problem, but for most frameworks it's not a big deal as you don't store large Objects in the HttpSession. I had planned to deploy the site I'm currently working on http://www.onmydoorstep.com.au/ on GAE but after a few weeks of running the prototypes on GAE, I found the performance to be too poor and the infrastructure too flakey for a production site. NB - It's certainly possible to create high-performance/reliable sites using GAE/J, but Wicket is not a suitable framework due to the Serialization data store write problem. Even if the performance were better and the deserialization issue was fixed, you would blow through your data store quota in no-time due to the amount of data store in the session. If anyone has solutions or further experience with these issues - I'm all ears! :) cheers, Rich On 8 April 2010 17:00, Josh Kamau wrote: > What are the main issues with wicket and Google app engine > -- Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Any "mature" work on integrating Hibernate Validator with Wicket?
Hey all, I had also created a JSR-303 integration solution as part of visural-wicket. It's not been fully documented yet w/ examples, but is fully functional and is a really handy addition. I planned to include/document it in the next release of visural-wicket (0.6). http://code.google.com/p/visural-wicket/source/browse/#svn/trunk/visural-wicket/src/com/visural/wicket/behavior/jsr303 There is a sample Form class to extend from to enable this functionality, but it is not mandatory. (see JSR303ValidatedForm.java#onBeforeRender() ... ) cheers, Rich On 12 April 2010 11:46, Ben Tilford wrote: > If you find anything useful heres some stuff I have put together > https://docs.google.com/leaf?id=0ByQjVcAVDuP9MWE4NDcxODMtODZlOC00Mzk0LThhOTUtYmI2MmNlYzEwNWFi&hl=en > > I'd upload it somewhere else but it looks like there are already like 4 > different projects for this. > > 2010/4/10 Uwe Schäfer > >> David Chang schrieb: >> >> hi, did you get the jsr 303 validation code released? where can i find it? >>> i am really excited looking forward to it. >>> >> >> about to. just finishing examples tomorrow. stay tuned. >> >> >> cu uwe >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > -- Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: Fading Content Updates Into a Ajax Refreshing ListView
see here http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/ this will get you most of the way there, then just add some js effects -igor On Mon, Apr 12, 2010 at 3:44 PM, DaHe wrote: > > Hello!! > > I tried this suggestion on my app. > > I have a DataView made with AjaxPaginNavigator, onClick I call a JavaScript, > this toggle a HighLight the row. When I pass to next page, my JS does not > work. > > I wrote this code: > > AjaxPagingNavigator pager = new AjaxPagingNavigator("navigator", dataView) { > �...@override > protected void onAjaxEvent(AjaxRequestTarget target) { > target.addComponent(dataContainer); > target.appendJavascript(dataContainer.getMarkupId() + > "/js/jquery-1.3.2.min.js"); > target.appendJavascript(dataContainer.getMarkupId() + > "/js/ToggleHighLigh.js"); > } > }; > > But it does not work. > > Do am I understanding wrong your suggestion? > > > Stefan Lindner wrote: >> >> Yes, this can be done with javascript. First of all you must decide which >> javascript library you want to use (scriptaculous/jQuery/etc.) >> Then you need to load it in your section (use some >> HeaderContributor class for this). >> Now when you repaint yout list items with >> >> target.addComponent(item); >> >> you may alo append some custom javascript code like this >> >> target.prependJavascript(item.getMarkupId() + "...fadeout/hide/etc."); >> target.addComponent(item); >> target.appendJavascript(item.getMarkupId() + "...fadein/show/etc."); >> >> Perhaps you need to set the items visibility to (style="display:none") and >> then in the appendHJavascript delete the display:none. >> >> Stefan >> >> -Ursprüngliche Nachricht- >> Von: Ayodeji Aladejebi [mailto:aladej...@gmail.com] >> Gesendet: Mittwoch, 31. März 2010 00:32 >> An: users@wicket.apache.org >> Betreff: Fading Content Updates Into a Ajax Refreshing ListView >> >> I am trying to auto refresh a list but also allow the new list updates to >> fade in one-by-one similar to these: http://foursquare.com/ >> >> I guess its a javascript affair but can I get some assistance as to the >> approach to use in wicket >> >> thanks >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://old.nabble.com/Fading-Content-Updates-Into-a-Ajax-Refreshing-ListView-tp28089381p28219197.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: Fading Content Updates Into a Ajax Refreshing ListView
Hello!! I tried this suggestion on my app. I have a DataView made with AjaxPaginNavigator, onClick I call a JavaScript, this toggle a HighLight the row. When I pass to next page, my JS does not work. I wrote this code: AjaxPagingNavigator pager = new AjaxPagingNavigator("navigator", dataView) { @Override protected void onAjaxEvent(AjaxRequestTarget target) { target.addComponent(dataContainer); target.appendJavascript(dataContainer.getMarkupId() + "/js/jquery-1.3.2.min.js"); target.appendJavascript(dataContainer.getMarkupId() + "/js/ToggleHighLigh.js"); } }; But it does not work. Do am I understanding wrong your suggestion? Stefan Lindner wrote: > > Yes, this can be done with javascript. First of all you must decide which > javascript library you want to use (scriptaculous/jQuery/etc.) > Then you need to load it in your section (use some > HeaderContributor class for this). > Now when you repaint yout list items with > > target.addComponent(item); > > you may alo append some custom javascript code like this > > target.prependJavascript(item.getMarkupId() + "...fadeout/hide/etc."); > target.addComponent(item); > target.appendJavascript(item.getMarkupId() + "...fadein/show/etc."); > > Perhaps you need to set the items visibility to (style="display:none") and > then in the appendHJavascript delete the display:none. > > Stefan > > -Ursprüngliche Nachricht- > Von: Ayodeji Aladejebi [mailto:aladej...@gmail.com] > Gesendet: Mittwoch, 31. März 2010 00:32 > An: users@wicket.apache.org > Betreff: Fading Content Updates Into a Ajax Refreshing ListView > > I am trying to auto refresh a list but also allow the new list updates to > fade in one-by-one similar to these: http://foursquare.com/ > > I guess its a javascript affair but can I get some assistance as to the > approach to use in wicket > > thanks > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://old.nabble.com/Fading-Content-Updates-Into-a-Ajax-Refreshing-ListView-tp28089381p28219197.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get stable DOM IDs without hacks?
Hello, You can use myComponent.setMarkupId("blah"), but then it's up to you to ensure the id uniqueness. Regards, Pierre On Tue, Apr 13, 2010 at 12:35 AM, wrote: > Hi, > > Wicket has its own mind - it changes IDs in HTML forms so JavaScript > breaks. > > Example: > > Source: > value="Add"/> > > Generated: > > > Please note that Wicket renames the id from "addButton" to > "addButtona" while it does not change the name attribute value. > > So we would have to create a Button subclass and: > >@Override >public String getMarkupId(){ >// As an example, use the wicket:id value ... >return getId(); >} > > and in HTML, we have to write a warning as a reminder of this hack: > > > This is a maintenance problem and a performance problem because the > additinal classes cost memory and CPU. > > Any ideas? > > Thanks, > > Bernard > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Les deux règles universelles du bide : 1) on n'explique pas un bide 2) dans le futur, un bide sera toujours un bide.
How to get stable DOM IDs without hacks?
Hi, Wicket has its own mind - it changes IDs in HTML forms so JavaScript breaks. Example: Source: Generated: Please note that Wicket renames the id from "addButton" to "addButtona" while it does not change the name attribute value. So we would have to create a Button subclass and: @Override public String getMarkupId(){ // As an example, use the wicket:id value ... return getId(); } and in HTML, we have to write a warning as a reminder of this hack: This is a maintenance problem and a performance problem because the additinal classes cost memory and CPU. Any ideas? Thanks, Bernard - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem with WicketTester to load template
Yes, the problem is the word void in the constructor. Now is ok! Thank you guys!
Re: Recover from session expiration ?
Thanks for the suggestion! StatelessAjaxFallbackLink is very nearly magical. It in fact almost works, but unfortunately seems incompatible with most UrlCodingStrategies. It generates some spurious URLs with the wrong number of ..'s if the page has a subdirectory or two in the URL. Back to the debugging cave... Bng mbrictson wrote: Have you seen jolira-tools? It was mentioned here on the mailing list recently. I haven't used it, but it seems to have some components that are intended solve the type of "stateless ajax" problem you are having. http://code.google.com/p/jolira-tools/wiki/stateless - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Google Charts integration
I've just started to move the application into wicketstuff-core. I will check also, whether the API has enhanced in the meantime. Stay tuned.. Regards, Peter 2010-04-12 16:01 keltezéssel, nino martinez wael írta: > So someone should bump the version.. Anyone knows if the project are > still active?.. I might be headed down the googlecharts road and if I > go there. I'll make sure the project works on wicket 1.4.7 and update > the project .. > > 2010/4/12 Major Péter : >> Hi, >> >> I've just checked out the project from >> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-googlecharts/ >> and after changing the wicket version in the pom, it still compiles, so >> it worth a try. :) >> >> Regards, >> Peter >> >> 2010-04-12 15:00 keltezéssel, Alexander Monakhov írta: >>> Hi, guys. >>> >>> Is there currently any integration of google charts with wicket? >>> I've found some articles like that >>> http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts. But they >>> are really old. >>> So, I'm curious whether there is any active integration with google charts. >>> >>> Best regards, Alexander. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nesting Links
I figured out a solution that works for me, so here it is: protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String script = tag.getAttribute("onclick"); String stopBubble = "e = window.event; if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble = true;}"; tag.put("onclick", stopBubble + script); } Jered Myers writes: I need to be able to nest links and have the link clicked on trigger, but not its parent. I am not sure how to do this with a regular Link. Right now, I believe that I have a problem with event bubbling. The parent link it firing when I click on the child. Any help is appreciated. Example: An example would be a calendar day where the entire day is a link and the day contains text that is a different link. Clicking a day will open a panel that for inserting an event and clicking the text will open a different panel for editing the event. Click here to click paerent and insert to edit final Link parent = new Link("parent"){ protected void onClick() { open insert panel }; } add(parent); final Link child= new Link("child"){ protected void onClick() { open edit panel }; } parent.add(child); Jered Myers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Jered Myers Programmer Maplewood Software (509)252-3550x109 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Nesting Links
I need to be able to nest links and have the link clicked on trigger, but not its parent. I am not sure how to do this with a regular Link. Right now, I believe that I have a problem with event bubbling. The parent link it firing when I click on the child. Any help is appreciated. Example: An example would be a calendar day where the entire day is a link and the day contains text that is a different link. Clicking a day will open a panel that for inserting an event and clicking the text will open a different panel for editing the event. Click here to click paerent and insert to edit final Link parent = new Link("parent"){ protected void onClick() { open insert panel }; } add(parent); final Link child= new Link("child"){ protected void onClick() { open edit panel }; } parent.add(child); Jered Myers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem with WicketTester to load template
Am 12.04.2010 16:58, schrieb Gustavo Henrique: I'm sorry! Blank is the constructor. It is a wrong word, because in my source the class name is Blank (only for test) and I renamed for Example in this post! Blank is not a constructor - it's a method. If you want it to be constructor, remove the void return value. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem with WicketTester to load template
It's always easier to check the real failing code. If you exchange only half of the appropriate words it's hard to find the error. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and JEE6
On Mon, Apr 12, 2010 at 12:12 AM, James Carman wrote: > I would imagine that most implementations would cache their injectors > (it's part of the Bean) > > > I was triggered by the remark in the WeldCOmponentInstantiationListener which says 'TODO Cache the NonContextual' Also, the NonContextual implementation itself mentions this 'Store the injection target. The CDI spec doesn't require an implementation to cache it, so we do' Therefore, it is probably safer to do the caching ourselves hen to rely on caching by the beanmanager.
Re: GAE loses shared resources
I'm going to bump this with some more information... I see that Application's getSharedResources() is final, as is SharedResources's get() method. So, that doesn't seem like it would work. SharedResourceRequestTarget is referenced in several places directly (not using a factory), so that's probably not ideal. Also, there would be a lot of code duplication in it's get() method. So, still looking for a solution to this issue. Seems pretty critical for extending an application in the cloud. Thanks! Jake jbrookover wrote: > > Hello all, > > I¹m running Wicket on Google App Engine. Things have been going fairly > well, but I¹ve encountered a new issue. GAE, at any moment, can wipe and > restart your application. In doing so, you lose everything including > anything you¹ve added to SharedResources. Unfortunately, this can happen > in > the middle of a page load as illustrated here: > > -Page request comes in > -Nifty MarkupFilter reads initial markup and creates some SharedResources > (for a variety of image states based on the filename in the markup) > -MarkupFilter sets the URL in the markup based on the URL provided by the > mounted SharedResource (e.g. ³img/logo.png² becomes > ³/resources/INDIRA/img/logo_d.png² because I wanted the disabled version). > -Markup is returned to the browser > -GAE restarts the application, losing the added SharedResource mapping > -Browser requests the resource according to the mounted URL > -Wicket cannot find resource, missing image > > My current hack idea is to add any shared resource to the GAE MemCache > (URL > maps to File). That works, but now, I just need to know where Wicket > actually looks up the file so I can add a fallback to check the GAE > MemCache > if the file is not found. My understanding is that the mounted > SharedResource path resolves to an actual path in the ServletContext, but > I > can¹t figure out where that is happening. > > I initially thought that I would just override SharedResources.get(), but > I > don¹t think that is called when simply handling requests. I also found > references to WebRequestCodingStrategy.RESOURCES_PATH_PREFIX, but none of > that seemed to help. Finally, I dove deep into WicketFilter, > WebRequest/Response, SharedResourceRequestTarget etc but got completely > lost. I assume it¹s in there someplace, though. > > Any help would be appreciated. > > Thanks! > > Jake > > -- View this message in context: http://old.nabble.com/GAE-loses-shared-resources-tp28205198p28219156.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem with WicketTester to load template
I'm sorry! Blank is the constructor. It is a wrong word, because in my source the class name is Blank (only for test) and I renamed for Example in this post!
Re: Google Charts integration
Thanks for replies, guys. Yes, I've checked this project. As I understand it hasn't been updates a lot of time. I guess it has lived without update from 2007. I can see that it's supporting not so many types of chart as Google Charts is providing currently. And Major Peter is right, it depends only on WebCompont of wicket. So, I guess it won't have problem with new wicket releases. Best regards, Alexander.
Re: Google Charts integration
There is nothing much wicket specific in the project, it only extends a WebComponent. As far as I saw, the Google Chart didn't change much too. So it's most probably going to work without any issue after bumping. Regards, Peter 2010-04-12 16:01 keltezéssel, nino martinez wael írta: > So someone should bump the version.. Anyone knows if the project are > still active?.. I might be headed down the googlecharts road and if I > go there. I'll make sure the project works on wicket 1.4.7 and update > the project .. > > 2010/4/12 Major Péter : >> Hi, >> >> I've just checked out the project from >> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-googlecharts/ >> and after changing the wicket version in the pom, it still compiles, so >> it worth a try. :) >> >> Regards, >> Peter >> >> 2010-04-12 15:00 keltezéssel, Alexander Monakhov írta: >>> Hi, guys. >>> >>> Is there currently any integration of google charts with wicket? >>> I've found some articles like that >>> http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts. But they >>> are really old. >>> So, I'm curious whether there is any active integration with google charts. >>> >>> Best regards, Alexander. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to centrally handle common exceptions from the databsae layer?
Those type of exceptions should be guarded against in your code (with validators, etc.). You shouldn't typically want to see them in "production." I don't do anything special to handle unchecked exceptions for database problems because it's usually one of the following issues: 1. My code isn't working properly, meaning I'm not guarding against, so my code needs to be fixed. 2. The database is hosed and I can't do anything about it. On Sun, Apr 11, 2010 at 11:38 AM, David Chang wrote: > I am hoping to understand how to write a good wicket app regarding handling > exceptions from the databsae layer? > > For a wickt form, I can have the following to handle user submission: > > @Override > protected void onSubmit() { > User u = getModelObject(); > userDao.saveUser(u); > setResponsePage(Results.class); > } > > For a wikcet web app, I can have many forms. > > But what is the best way to handle common database exceptions such as foreign > key constraint violation, larger than a column width, etc. and displaying > meaningful error messages? I could easily add try/catch around > userDao#saveUser to handle them, but that would be bad in terms of code > replication and maintenance. It may be good to handle in a "central" place. > > How do you deal with this issue in your wicket apps? > > Thanks for input! > > Best. > > > > > > > - > 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: Google Charts integration
So someone should bump the version.. Anyone knows if the project are still active?.. I might be headed down the googlecharts road and if I go there. I'll make sure the project works on wicket 1.4.7 and update the project .. 2010/4/12 Major Péter : > Hi, > > I've just checked out the project from > https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-googlecharts/ > and after changing the wicket version in the pom, it still compiles, so > it worth a try. :) > > Regards, > Peter > > 2010-04-12 15:00 keltezéssel, Alexander Monakhov írta: >> Hi, guys. >> >> Is there currently any integration of google charts with wicket? >> I've found some articles like that >> http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts. But they >> are really old. >> So, I'm curious whether there is any active integration with google charts. >> >> Best regards, Alexander. > > - > 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 make a wicket web editor
hi guys,I'm a freshman on js.Could anyone tell me how to user a web editor in wicket.I know wicket-stuff already have a project tinymce,But I don't like tinymce.There are so many web editor,I want to use my favorated editor.I just knew a little about abstractajaxbehavior,But something deep is hard for me,for example,the ajax upload using jquery.How to encapsulate ajax upload using wicket? to understand tinymce project is hard for me now.so, hope someone can tell me how to use these editor writted by jquery or introduce tinymce project's detail about image upload. the editor xheditor use this $('#elm2').xheditor({upLinkUrl:"upload.php?immediate=1",upLinkExt:"zip,rar,txt",upImgUrl:"upload.php?immediate=1",upImgExt:"jpg,jpeg,gif,png",upFlashUrl:"upload.php?immediate=1",upFlashExt:"swf",upMediaUrl:"upload.php?immediate=1",upMediaExt:"avi"}); the upload.php?immediate=1 is a interface to save the data,and if I use servlet ,that's easy.chang the url to a new url like x.do,writing a url-pattern in web.xml. But this is not a wicket way. 2010-04-12 wicketyan
Re: How to centrally handle common exceptions from the databsae layer?
Since I did not hear any response, I would like to ask folks here, humbly, one more time. Am I asking the right question? Or Is my question confusing or unclear? Here is some background info why I am asking this quesiton. I did a spring web app before. I have a base form controller and its onSubmit method contains an abstract method as follows: public abstract ModelAndView doOnSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception; This base form controller's onSubmit centrally handles exceptions thrown from the service layer (most often the erros are database errors) and each specific form controller that inherits the base form controller handles business related to the specific form. In this way, I only need to do it once for handling errors and display right messages in user interface. Hope this helps. I really would like to hear from folks here about how to do the right thing. Best, David --- On Sun, 4/11/10, David Chang wrote: > From: David Chang > Subject: How to centrally handle common exceptions from the databsae layer? > To: users@wicket.apache.org > Date: Sunday, April 11, 2010, 11:38 AM > I am hoping to understand how to > write a good wicket app regarding handling exceptions from > the databsae layer? > > For a wickt form, I can have the following to handle user > submission: > > @Override > protected void onSubmit() { > User u = getModelObject(); > userDao.saveUser(u); > setResponsePage(Results.class); > } > > For a wikcet web app, I can have many forms. > > But what is the best way to handle common database > exceptions such as foreign key constraint violation, larger > than a column width, etc. and displaying meaningful error > messages? I could easily add try/catch around > userDao#saveUser to handle them, but that would be bad in > terms of code replication and maintenance. It may be good to > handle in a "central" place. > > How do you deal with this issue in your wicket apps? > > Thanks for input! > > Best. > > > > > > > - > 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: problem with WicketTester to load template
This looks strange to me: public class Example extends WebPage { public void Blank() { add(new RequiredTextField("username")); } } Why is Blank a Uppercase method name? You don't have any constructor yet. So Blank never gets executed and the username component is not added to the page try public class Example extends WebPage { public Example() { add(new RequiredTextField("username")); } } or public class Example extends WebPage { public Example() { Blank(); } public void Blank() { add(new RequiredTextField("username")); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Google Charts integration
Hi, I've just checked out the project from https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-googlecharts/ and after changing the wicket version in the pom, it still compiles, so it worth a try. :) Regards, Peter 2010-04-12 15:00 keltezéssel, Alexander Monakhov írta: > Hi, guys. > > Is there currently any integration of google charts with wicket? > I've found some articles like that > http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts. But they > are really old. > So, I'm curious whether there is any active integration with google charts. > > Best regards, Alexander. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Google Charts integration
Hi! There was a simple example at: http://cwiki.apache.org/WICKET/showing-a-remote-image-on-wicket-site.html It's quite trivial. ** Martin 2010/4/12 Alexander Monakhov : > Hi, guys. > > Is there currently any integration of google charts with wicket? > I've found some articles like that > http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts. But they > are really old. > So, I'm curious whether there is any active integration with google charts. > > Best regards, Alexander. > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Google Charts integration
Hi, guys. Is there currently any integration of google charts with wicket? I've found some articles like that http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts. But they are really old. So, I'm curious whether there is any active integration with google charts. Best regards, Alexander.
Re: BookmarkablePageLink functionality in a Button
You can put a wicket link on almost anything! 2010/4/12 Martin Asenov : > Never knew I could put a wicket link in a button tag... :-) > > Thank you, James! > > Best, > Martin > > > -Original Message- > From: James Carman [mailto:jcar...@carmanconsulting.com] > Sent: Monday, April 12, 2010 3:55 PM > To: users@wicket.apache.org > Subject: Re: BookmarkablePageLink functionality in a Button > > In your code... > > add(new BookmarkablePageLink("mylink", "myurl")); > > In your markup: > > Whatever You Want the Button to Say > > 2010/4/12 Martin Asenov : >> James :) I can't get it... Put what where? >> >> Best, >> Martin >> >> -Original Message- >> From: James Carman [mailto:jcar...@carmanconsulting.com] >> Sent: Monday, April 12, 2010 3:26 PM >> To: users@wicket.apache.org >> Subject: Re: BookmarkablePageLink functionality in a Button >> >> No, do exactly what I put. >> >> 2010/4/12 Martin Asenov : >>> You mean to put an anchor inside the button's body? >>> >>> Best, >>> Martin >>> >>> -Original Message- >>> From: James Carman [mailto:jcar...@carmanconsulting.com] >>> Sent: Monday, April 12, 2010 1:41 PM >>> To: users@wicket.apache.org >>> Subject: Re: BookmarkablePageLink functionality in a Button >>> >>> Have you tried just "attaching" your link to a button? >>> >>> SomeText >>> >>> >>> On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov wrote: Hello, everyone! I've got this logout page: public class LogoutPage extends WebPage { public LogoutPage() { add(new Form("form").add(new AjaxButton("home") { private static final long serialVersionUID = 1L; �...@override protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { setResponsePage(Calendar.class); } })); } �...@override protected void onAfterRender() { super.onAfterRender(); getSession().invalidate(); RequestCycle.get().setRedirect(true); } } I used to have a BookmarkablePageLink instead of this button, that pointed to the very same page. However, obviously this button is related to the session and instead of sending me to the login page, it sends me to pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so I had to use a button as well. Can anyone assist me on this? Best, Martin >>> >>> - >>> 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 > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: BookmarkablePageLink functionality in a Button
Never knew I could put a wicket link in a button tag... :-) Thank you, James! Best, Martin -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Monday, April 12, 2010 3:55 PM To: users@wicket.apache.org Subject: Re: BookmarkablePageLink functionality in a Button In your code... add(new BookmarkablePageLink("mylink", "myurl")); In your markup: Whatever You Want the Button to Say 2010/4/12 Martin Asenov : > James :) I can't get it... Put what where? > > Best, > Martin > > -Original Message- > From: James Carman [mailto:jcar...@carmanconsulting.com] > Sent: Monday, April 12, 2010 3:26 PM > To: users@wicket.apache.org > Subject: Re: BookmarkablePageLink functionality in a Button > > No, do exactly what I put. > > 2010/4/12 Martin Asenov : >> You mean to put an anchor inside the button's body? >> >> Best, >> Martin >> >> -Original Message- >> From: James Carman [mailto:jcar...@carmanconsulting.com] >> Sent: Monday, April 12, 2010 1:41 PM >> To: users@wicket.apache.org >> Subject: Re: BookmarkablePageLink functionality in a Button >> >> Have you tried just "attaching" your link to a button? >> >> SomeText >> >> >> On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov wrote: >>> Hello, everyone! >>> >>> I've got this logout page: >>> >>> public class LogoutPage extends WebPage { >>> >>> public LogoutPage() { >>> add(new Form("form").add(new AjaxButton("home") { >>> >>> private static final long serialVersionUID = 1L; >>> >>> �...@override >>> protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { >>> setResponsePage(Calendar.class); >>> } >>> >>> })); >>> } >>> >>> �...@override >>> protected void onAfterRender() { >>> >>> super.onAfterRender(); >>> >>> getSession().invalidate(); >>> RequestCycle.get().setRedirect(true); >>> >>> } >>> >>> } >>> >>> I used to have a BookmarkablePageLink instead of this button, that pointed >>> to the very same page. However, obviously this button is related to the >>> session and instead of sending me to the login page, it sends me to >>> pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so >>> I had to use a button as well. >>> Can anyone assist me on this? >>> >>> Best, >>> Martin >>> >> >> - >> 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
Re: BookmarkablePageLink functionality in a Button
In your code... add(new BookmarkablePageLink("mylink", "myurl")); In your markup: Whatever You Want the Button to Say 2010/4/12 Martin Asenov : > James :) I can't get it... Put what where? > > Best, > Martin > > -Original Message- > From: James Carman [mailto:jcar...@carmanconsulting.com] > Sent: Monday, April 12, 2010 3:26 PM > To: users@wicket.apache.org > Subject: Re: BookmarkablePageLink functionality in a Button > > No, do exactly what I put. > > 2010/4/12 Martin Asenov : >> You mean to put an anchor inside the button's body? >> >> Best, >> Martin >> >> -Original Message- >> From: James Carman [mailto:jcar...@carmanconsulting.com] >> Sent: Monday, April 12, 2010 1:41 PM >> To: users@wicket.apache.org >> Subject: Re: BookmarkablePageLink functionality in a Button >> >> Have you tried just "attaching" your link to a button? >> >> SomeText >> >> >> On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov wrote: >>> Hello, everyone! >>> >>> I've got this logout page: >>> >>> public class LogoutPage extends WebPage { >>> >>> public LogoutPage() { >>> add(new Form("form").add(new AjaxButton("home") { >>> >>> private static final long serialVersionUID = 1L; >>> >>> �...@override >>> protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { >>> setResponsePage(Calendar.class); >>> } >>> >>> })); >>> } >>> >>> �...@override >>> protected void onAfterRender() { >>> >>> super.onAfterRender(); >>> >>> getSession().invalidate(); >>> RequestCycle.get().setRedirect(true); >>> >>> } >>> >>> } >>> >>> I used to have a BookmarkablePageLink instead of this button, that pointed >>> to the very same page. However, obviously this button is related to the >>> session and instead of sending me to the login page, it sends me to >>> pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so >>> I had to use a button as well. >>> Can anyone assist me on this? >>> >>> Best, >>> Martin >>> >> >> - >> 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: BookmarkablePageLink functionality in a Button
James :) I can't get it... Put what where? Best, Martin -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Monday, April 12, 2010 3:26 PM To: users@wicket.apache.org Subject: Re: BookmarkablePageLink functionality in a Button No, do exactly what I put. 2010/4/12 Martin Asenov : > You mean to put an anchor inside the button's body? > > Best, > Martin > > -Original Message- > From: James Carman [mailto:jcar...@carmanconsulting.com] > Sent: Monday, April 12, 2010 1:41 PM > To: users@wicket.apache.org > Subject: Re: BookmarkablePageLink functionality in a Button > > Have you tried just "attaching" your link to a button? > > SomeText > > > On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov wrote: >> Hello, everyone! >> >> I've got this logout page: >> >> public class LogoutPage extends WebPage { >> >> public LogoutPage() { >> add(new Form("form").add(new AjaxButton("home") { >> >> private static final long serialVersionUID = 1L; >> >> �...@override >> protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { >> setResponsePage(Calendar.class); >> } >> >> })); >> } >> >> �...@override >> protected void onAfterRender() { >> >> super.onAfterRender(); >> >> getSession().invalidate(); >> RequestCycle.get().setRedirect(true); >> >> } >> >> } >> >> I used to have a BookmarkablePageLink instead of this button, that pointed >> to the very same page. However, obviously this button is related to the >> session and instead of sending me to the login page, it sends me to >> pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so I >> had to use a button as well. >> Can anyone assist me on this? >> >> Best, >> Martin >> > > - > 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: BookmarkablePageLink functionality in a Button
No, do exactly what I put. 2010/4/12 Martin Asenov : > You mean to put an anchor inside the button's body? > > Best, > Martin > > -Original Message- > From: James Carman [mailto:jcar...@carmanconsulting.com] > Sent: Monday, April 12, 2010 1:41 PM > To: users@wicket.apache.org > Subject: Re: BookmarkablePageLink functionality in a Button > > Have you tried just "attaching" your link to a button? > > SomeText > > > On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov wrote: >> Hello, everyone! >> >> I've got this logout page: >> >> public class LogoutPage extends WebPage { >> >> public LogoutPage() { >> add(new Form("form").add(new AjaxButton("home") { >> >> private static final long serialVersionUID = 1L; >> >> �...@override >> protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { >> setResponsePage(Calendar.class); >> } >> >> })); >> } >> >> �...@override >> protected void onAfterRender() { >> >> super.onAfterRender(); >> >> getSession().invalidate(); >> RequestCycle.get().setRedirect(true); >> >> } >> >> } >> >> I used to have a BookmarkablePageLink instead of this button, that pointed >> to the very same page. However, obviously this button is related to the >> session and instead of sending me to the login page, it sends me to >> pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so I >> had to use a button as well. >> Can anyone assist me on this? >> >> Best, >> Martin >> > > - > 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: problem with WicketTester to load template
org.apache.wicket.WicketRuntimeException: path: 'Example:username' does not exist for page: Example at org.apache.wicket.util.tester.BaseWicketTester.fail(BaseWicketTester.java:1344) at org.apache.wicket.util.tester.BaseWicketTester.getComponentFromLastRenderedPage(BaseWicketTester.java:472) at com.b2w.controlpanel.test.page.LoginTest.testLoginPageComponents(LoginTest.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Thanks!
RE: BookmarkablePageLink functionality in a Button
You mean to put an anchor inside the button's body? Best, Martin -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Monday, April 12, 2010 1:41 PM To: users@wicket.apache.org Subject: Re: BookmarkablePageLink functionality in a Button Have you tried just "attaching" your link to a button? SomeText On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov wrote: > Hello, everyone! > > I've got this logout page: > > public class LogoutPage extends WebPage { > > public LogoutPage() { > add(new Form("form").add(new AjaxButton("home") { > > private static final long serialVersionUID = 1L; > > �...@override > protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { > setResponsePage(Calendar.class); > } > > })); > } > > �...@override > protected void onAfterRender() { > > super.onAfterRender(); > > getSession().invalidate(); > RequestCycle.get().setRedirect(true); > > } > > } > > I used to have a BookmarkablePageLink instead of this button, that pointed to > the very same page. However, obviously this button is related to the session > and instead of sending me to the login page, it sends me to pageExpiredPage. > Unfortunately, the new UI I have to use uses a button, so I had to use a > button as well. > Can anyone assist me on this? > > Best, > Martin > - 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: debugging PageExpiredExceptions
We're interested in this as well, as our logs are full of these as well. On Mon, Apr 12, 2010 at 10:32 AM, Nikita Tovstoles wrote: > So far I traced this down to the fact that sometimes some wicket:interface > requests (in our case used in img src and in anchor 'href) do not include a > jsessionid - either as a ";jsessionid=" URL param or a cookie - thus no > session can be found. > > The container's impl of HttpServletResponse.encodeURL(String) decides > whether to rewrite the URL with jsessionid. It's supposed to NOT rewrite the > URL if the client is confirmed to support cookie (though there are other > criteria). I imagine that works correctly (we're using Tomcat 6.0.20). > > Anyone know of cases wherein wicket does not call > response.encodeURL(generatedURL) for whatever reason? > > -nikita > > On Fri, Apr 9, 2010 at 3:51 PM, Nikita Tovstoles > wrote: > >> Here's a typical exception: >> >> 00:01:17,644 ERROR CLPWebRequestCycle:34 - Cannot find the rendered page in >> session >> [pagemap=null,componentPath=7:results:resultsInfo:criteriaContainer:inputPanel:categorySearchForm:submitLink:searchButton,versionNumber=0] >> org.apache.wicket.protocol.http.PageExpiredException: Cannot find the >> rendered page in session >> [pagemap=null,componentPath=7:results:resultsInfo:criteriaContainer:inputPanel:categorySearchForm:submitLink:searchButton,versionNumber=0] >> at >> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:197) >> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) >> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) >> at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) >> at >> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) >> at >> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312) >> >> >> >> On Fri, Apr 9, 2010 at 3:35 PM, Nikita Tovstoles < >> nikita.tovsto...@gmail.com> wrote: >> >>> We're seeing a PageExpiredExceptions in roughly 2-6% of our production web >>> sessions and cannot determine the root cause: >>> >>> 1. it's not a session affinity problem (we went as far as running a >>> single node - the exceptions persisted) >>> 2. it's not a session expiration case (our avg production session is >>> far less than 40 min session timeout value; given the number of sessions >>> wherein PEEs occur it's highly unlikely that those sessions are the 40+ >>> min >>> outliers >>> 3. it's not a serialization problem - everything on pages is >>> serializable. And if it were a serialization issue, should we not be >>> seeing WicketSerializeableException stack traces in the logs? >>> 4. Settings.automaticMultiWindowSupport remains at default (=true) >>> 5. we cannot come up with a consistent repro though somehow managed to >>> cause PEE to happen a couple of times by seemingly randomly clicking on >>> UI >>> controls and playing with back/forward browser buttons >>> >>> >>> Any tips on how to go about determining the root cause? Looking at the >>> exception below (typical - always thrown from >>> WebRequestCycleProcessor.resolve()), what specifically would you look for? >>> Which loggers would it be useful to turn to debug? >>> >>> Also, is there any way to determine Page class type when catching a >>> PageExpiredException - so at least we could implement "on PEE throw new >>> RestartResponseException(pageType, defaultParams)" - instead of showing the >>> default error page. >>> >>> thanks, >>> >>> -nikita >>> >> > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: BookmarkablePageLink functionality in a Button
Have you tried just "attaching" your link to a button? SomeText On Mon, Apr 12, 2010 at 3:44 AM, Martin Asenov wrote: > Hello, everyone! > > I've got this logout page: > > public class LogoutPage extends WebPage { > > public LogoutPage() { > add(new Form("form").add(new AjaxButton("home") { > > private static final long serialVersionUID = 1L; > > �...@override > protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { > setResponsePage(Calendar.class); > } > > })); > } > > �...@override > protected void onAfterRender() { > > super.onAfterRender(); > > getSession().invalidate(); > RequestCycle.get().setRedirect(true); > > } > > } > > I used to have a BookmarkablePageLink instead of this button, that pointed to > the very same page. However, obviously this button is related to the session > and instead of sending me to the login page, it sends me to pageExpiredPage. > Unfortunately, the new UI I have to use uses a button, so I had to use a > button as well. > Can anyone assist me on this? > > Best, > Martin > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IE6 issue regarding Wicket JS and Ajax
But that is no reason not to use newer browsers for the rest of the universe... Is it really that hard for IT organizations to create an embedded IE6 application specific for those backward ActiveX apps? Martijn On Mon, Apr 12, 2010 at 10:26 AM, Wilhelmsen Tor Iver wrote: >> its a browser from August 27, 2001 ... thats 9 years ago.. >> >> So who is using opera 6 ? Or Netscape 7? Or Safari 1.0 ? > > Sadly, IE6 is also a central component in some Active/X-based apps used in > some companies, apps which actually manage to BREAK on newer releases of IE. > So they are held captive by those apps until they are rewritten... > > - Tor Iver > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket an JEE6 (web.xml not mandatory)
http://www.jroller.com/ouertani/entry/tips_1_wicket_and_jee
Re: debugging PageExpiredExceptions
So far I traced this down to the fact that sometimes some wicket:interface requests (in our case used in img src and in anchor 'href) do not include a jsessionid - either as a ";jsessionid=" URL param or a cookie - thus no session can be found. The container's impl of HttpServletResponse.encodeURL(String) decides whether to rewrite the URL with jsessionid. It's supposed to NOT rewrite the URL if the client is confirmed to support cookie (though there are other criteria). I imagine that works correctly (we're using Tomcat 6.0.20). Anyone know of cases wherein wicket does not call response.encodeURL(generatedURL) for whatever reason? -nikita On Fri, Apr 9, 2010 at 3:51 PM, Nikita Tovstoles wrote: > Here's a typical exception: > > 00:01:17,644 ERROR CLPWebRequestCycle:34 - Cannot find the rendered page in > session > [pagemap=null,componentPath=7:results:resultsInfo:criteriaContainer:inputPanel:categorySearchForm:submitLink:searchButton,versionNumber=0] > org.apache.wicket.protocol.http.PageExpiredException: Cannot find the > rendered page in session > [pagemap=null,componentPath=7:results:resultsInfo:criteriaContainer:inputPanel:categorySearchForm:submitLink:searchButton,versionNumber=0] > at > org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:197) > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) > at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) > at > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) > at > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312) > > > > On Fri, Apr 9, 2010 at 3:35 PM, Nikita Tovstoles < > nikita.tovsto...@gmail.com> wrote: > >> We're seeing a PageExpiredExceptions in roughly 2-6% of our production web >> sessions and cannot determine the root cause: >> >>1. it's not a session affinity problem (we went as far as running a >>single node - the exceptions persisted) >>2. it's not a session expiration case (our avg production session is >>far less than 40 min session timeout value; given the number of sessions >>wherein PEEs occur it's highly unlikely that those sessions are the 40+ >> min >>outliers >>3. it's not a serialization problem - everything on pages is >>serializable. And if it were a serialization issue, should we not be >>seeing WicketSerializeableException stack traces in the logs? >>4. Settings.automaticMultiWindowSupport remains at default (=true) >>5. we cannot come up with a consistent repro though somehow managed to >>cause PEE to happen a couple of times by seemingly randomly clicking on UI >>controls and playing with back/forward browser buttons >> >> >> Any tips on how to go about determining the root cause? Looking at the >> exception below (typical - always thrown from >> WebRequestCycleProcessor.resolve()), what specifically would you look for? >> Which loggers would it be useful to turn to debug? >> >> Also, is there any way to determine Page class type when catching a >> PageExpiredException - so at least we could implement "on PEE throw new >> RestartResponseException(pageType, defaultParams)" - instead of showing the >> default error page. >> >> thanks, >> >> -nikita >> >
Re: DatePicker icon dont disappear when parent textfield is set to visible false
Hi, thank you all for your replies. The way with the WebMarkupContainer works for me so far (I modified the example from http://www.systemmobile.com/?page_id=253). Sadly it doesnt work with rows, but at the moment it suffices. Thanks and best regards Christoph On Sat, Apr 10, 2010 at 4:29 AM, Jeremy Thomerson wrote: > If that doesn't work, just wrap the textfields in a WebMarkupContainer and > set the visibility of the container instead. This happens because the date > picker adds the image icon outside of the actual input, so the input > doesn't > have a way of removing the other element from the DOM. > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Fri, Apr 9, 2010 at 5:30 PM, Mathias Nilsson < > wicket.program...@gmail.com > > wrote: > > > > > setOutputMarkupPlaceholderTag( true ) might work > > -- > > View this message in context: > > > http://old.nabble.com/DatePicker-icon-dont-disappear-when-parent-textfield-is-set-to--visible-false-tp28188761p28198329.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > >
SV: IE6 issue regarding Wicket JS and Ajax
> its a browser from August 27, 2001 ... thats 9 years ago.. > > So who is using opera 6 ? Or Netscape 7? Or Safari 1.0 ? Sadly, IE6 is also a central component in some Active/X-based apps used in some companies, apps which actually manage to BREAK on newer releases of IE. So they are held captive by those apps until they are rewritten... - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What happens after browser's 'back' button?
Johan Compagner wrote: yes we didnt do that by default because it is quite annoying behavior Back button should be quick and shouldnt load it from the server again at least not by default. You can configure it for you application the way you like. But for many others back should really be browser cache back. ok, thanks for the clarification ::) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
BookmarkablePageLink functionality in a Button
Hello, everyone! I've got this logout page: public class LogoutPage extends WebPage { public LogoutPage() { add(new Form("form").add(new AjaxButton("home") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { setResponsePage(Calendar.class); } })); } @Override protected void onAfterRender() { super.onAfterRender(); getSession().invalidate(); RequestCycle.get().setRedirect(true); } } I used to have a BookmarkablePageLink instead of this button, that pointed to the very same page. However, obviously this button is related to the session and instead of sending me to the login page, it sends me to pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so I had to use a button as well. Can anyone assist me on this? Best, Martin