Re: MixedHybridUrlCodingStrategy wanted
Please do :) Erik. Vladimir K wrote: Thanks very much! Why not suggest it as a patch to wicket core? Erik van Oosten wrote: Hi Vladimir, You are right. Now I look at it, it is clearly more complex then I remembered. You can get my version here: http://pastie.org/543892 Regards, Erik. Vladimir K wrote: I didn't find it easy to do it myself. By easy I mean what I can accomplish within 15 mins. From the first glance it looks just like a mix of two strategies but it actually does not. MixedHybridUrlCodingStrategy should handle all the parameters delimited by slashes and some of them have names omitted. Original Mixed strategy operates with regular parameters syntax. I believe it would take some hours to study what strategies do internally and implement and test mixed solution. I hoped someone have already tried that. Unfortunately I didn't find anything by google and nabble so I posted the question here. If you could point me some old discussion I'd appreciate. Erik van Oosten wrote: It is fairly easy to construct it yourself. Just look at the code of MixedParamUrlCodingStrategy, copy it and replace the class you're extending to the corresponding HybridUrlCodingStrategy. Its also on the mailing list, search the archives. Lastly, the annotation based mounting project (forgot the name) contains it. Regards, Erik. Vladimir Kovalyuk wrote: Is there a worked combination of HybridUrlCodingStrategy and MixedParamUrlCodingStrategy? What is missed in the latter is ability to stay bookmarkable after reaction on actions. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: model detached many times
As models are nested this is not possible with the current setup. If a model nests another model, the nesting model is responsible for calling detach on the nested model. Multiple models may nest the same model. So the best thing to do for now is to have some flag to see if you're already detached. In getObject the flag is cleared. For most models however, it should not matter if they're called multiple times; the typical thing you do in detach is set a field to null. Regards, Erik. James Carman wrote: No, he means *all* models. The idea would be that Wicket would look for fields of type IModel (or its descendants) on components/pages. If it sees one, it would automatically detach it. On Mon, Jul 13, 2009 at 3:47 AM, Vladimir Kkoval...@gmail.com wrote: Martijn, you probably mean how chained models would be detached. So instead of propagating detach in IChainedModel they would be detached automatically? Is there a vision how it would be accomplished? Martijn Dashorst wrote: Automatic detachment is one of the things we're looking into for 1.5 or 1.6 Martijn On Fri, Jul 10, 2009 at 12:47 PM, James Carmanjcar...@carmanconsulting.com wrote: Perhaps there could be some sort of registry for models that need to be detached. Then, after rendering, they're all detached as part of the request cycle? On Fri, Jul 10, 2009 at 4:00 AM, Martijn Dashorstmartijn.dasho...@gmail.com wrote: If you share a model between components, then yes–each component will call detach on the model. That's encapsulation for you: one component doesn't know about another component, so it can't know that its model was detached. Martijn On Fri, Jul 10, 2009 at 9:41 AM, Ian MacLartyian.macla...@gmail.com wrote: I put a breakpoint on the detach method of my model and had a look at the Components whose detach methods were called higher up in the stack trace. It looks like the detach method on the model is being called for every component on the page. All the components link to the same underlying model via a CompoundPropertyModel, so I guess lots of calls to the detach method of the model should be expected? Ian. On Fri, Jul 10, 2009 at 5:17 PM, Eelco Hilleniuseelco.hillen...@gmail.com wrote: It's fine if a model if detached multiple times in a request, but hundreds for a single model sounds suspicious. Try to trace what components fire the detach method and see if there's anything weird with that. Eelco On Thu, Jul 9, 2009 at 11:21 PM, Ian MacLartyian.macla...@gmail.com wrote: Hi, I noticed that my IDetachable model is being detached many times (hundreds) for each request. Is that something to worry about, or is it just because the detach method is called for each component that points to this model? Ian. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Updating an inmethod grid, looking for hints
Hi Matej, I just got a hint from a colleague: it might has something to do with returning the wrong number of items in the dataprovider query. We probably return UNDEFINED too often. I'll look further into it. Regards, Erik. Erik van Oosten wrote: DataGrid. DefaultDataGrid mostly. Erik. Matej Knopp schreef: are you using treegrid or datagrid? -Matej On Sat, Jul 11, 2009 at 1:43 PM, Erik van Oostene.vanoos...@grons.nl wrote: If I remember correctly that only updates the existing items and ignore new items. I am looking for a way to get the new items too. Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MixedHybridUrlCodingStrategy wanted
It is fairly easy to construct it yourself. Just look at the code of MixedParamUrlCodingStrategy, copy it and replace the class you're extending to the corresponding HybridUrlCodingStrategy. Its also on the mailing list, search the archives. Lastly, the annotation based mounting project (forgot the name) contains it. Regards, Erik. Vladimir Kovalyuk wrote: Is there a worked combination of HybridUrlCodingStrategy and MixedParamUrlCodingStrategy? What is missed in the latter is ability to stay bookmarkable after reaction on actions. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Updating an inmethod grid, looking for hints
Hi, How can I trigger an inmethod grid to do a /complete/ update of itself? The only thing that I see is markAllDirty(). That will update the items currently in the list, but it will /not/ get new items from the data provider. I researched the code for quite some time but I must have been looking at the wrong parts as I found no hook to get this done. The most I could do was call detach() on Body, one of the inner classes of a grid. But on screen, that would only update the number of items in the lower toolbar, not the items in the grid themselves. More ideas? Ideally, imho, the grid should respond to modelChanged(). But I have still no clue what should be in that method. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Updating an inmethod grid, looking for hints
DataGrid. DefaultDataGrid mostly. Erik. Matej Knopp schreef: are you using treegrid or datagrid? -Matej On Sat, Jul 11, 2009 at 1:43 PM, Erik van Oostene.vanoos...@grons.nl wrote: If I remember correctly that only updates the existing items and ignore new items. I am looking for a way to get the new items too. Regards, Erik. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketSessionFilter setup
Mathias, This sounds similar to what I wrote on http://cwiki.apache.org/WICKET/springbean-outside-wicket.html. Its not clear from the javadoc, but I suspect that WicketSessionFilter also requires access to a surrounding normal Wicket filter. If I had access to the code of WicketSessionFilter here, it would be easy to check. Regards, Erik. Mathias Nilsson wrote: Whats wrong with this setup ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameupload/display-name filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class init-param param-namefilterName/param-name param-valuewicket.upload/param-value /init-param /filter filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern/servlet/FileUploadServlet/*/url-pattern /filter-mapping servlet descriptionServlet for file uploads/description display-nameFile Upload Servlet/display-name servlet-nameFileUploadServlet/servlet-name servlet-classse.edgesoft.FileUploadServlet/servlet-class /servlet servlet-mapping servlet-nameFileUploadServlet/servlet-name url-pattern/servlet/FileUploadServlet/url-pattern /servlet-mapping filter filter-namewicket.upload/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuese.edgesoft.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.upload/filter-name url-pattern/*/url-pattern /filter-mapping /web-app -- View this message in context: http://www.nabble.com/WicketSessionFilter-setup-tp24336020p24342786.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: WicketSessionFilter setup
Any hints on why you're asking? Mathias Nilsson wrote: Whats wrong with this setup ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLoc - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: img tags from external src slow down my page
Hi Jim, You should do 1 in any case :) Point 2 is not so hard. Just download the file with HttpClient or the like. While you're reading from the stream you have to count bytes. Put this in a IValidator and attach it to the imageUrl textbox. If you go for point 3 then note that not all types of images can be converted by the java imaging library. In particular CYMK jpgs and tiff files are troublesome. Regards, Erik. Jim Pinkham wrote: I had a few ideas: 1. a note on the item entry page asking users to 'please don't do that'. :) 2. add an ImageURLValidator to check the image size somehow... hmmm... 3. find some utility to help read the image, properly size it, and store a local copy with my own id (filesystem should work fine) and let my model's imageURL property point to it. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: invoking an ajax refresh
Hi Daniel, Please investigate AjaxSelfUpdatingTimerBehavior. I have never used it myself so I can not help you further then that. Regards, Erik. Daniel Dominik Holúbek wrote: hello everybody,i am wondering how to invoke refresh of a component with ajax. the situation: i have a listener listening for incoming messages. if a message is fetched, a method is executed, and I add the message text into a List object. I then want to refresh the ListView (or the parent WebMarkupContainer), so that it shows the latest message up. So basically, it's a sort of asynchronous chat. Thanks! :) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: redirect to mailto
Well, then its time to whip up some javascript! E.g.: new AjaxLink(..) { public void onClick(target) { target.addJavascript(document.url = 'mailto:'); } } Completely out of my head so you'll have to find the exact method names yourself ;) Regards, Erik. On Mon, 22 Jun 2009 15:22:41 -0500, Aaron Dixon atdi...@gmail.com wrote: Thanks, Erik. But I need to have this behavior initiated in response to an ajax event (say, on an onchange for a select drop down). On Mon, Jun 22, 2009 at 2:00 PM, Erik van Oostene.vanoos...@grons.nl wrote: You can use ExternalLink with a mailto: url. Regards, Erik. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page Expire
Hello Srinivasa, You control the amount of storage that is available. Please look at the javadoc of DiskPageStore. Override the defaults by overriding WebApplication#newSessionStore(). Regards, Erik. srinivas wrote: Hi, After how much time will we get the page expire in wicket . Please give me the replay if any one know this . Thanks in advance. Regards, Srinivasa Raju CH. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: redirect to mailto
You can use ExternalLink with a mailto: url. Regards, Erik. Aaron Dixon wrote: How do I redirect to a mailto: url? This doesn't seem to work: final String url = mailto:...;; getRequestCycle().setRequestTarget(new IRequestTarget() { @Override public void detach(RequestCycle requestCycle) {} @Override public void respond(RequestCycle requestCycle) { Response response = requestCycle.getResponse(); response.reset(); response.redirect(url); } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Creating a form dynamically
This might be useful: http://herebebeasties.com/2007-08-17/wicket-bean-editor/ Regards, Erik. Ryan LaHue wrote: I'm trying to build a form dynamically and am having a little problem. Basically I have a class that takes a ListFormComponent and then passes them into a ListView for display on screen. The problem is that they were created elsewhere and I have no control over two things: 1) The order/type of each FormComponent 2) The wicket:id that was chosen for them when the FormComponents were created I think I've solved 1) by creating wrapper classes for each supported FormComponent type... for example, I have a DropDownChoicePanel which simply adds the DropDownChoice it is passed to its html, which is simply a select wicket:id=component/select. This way I can simply wrap each FormComponent in the list with a panel and add all the panels to my listview rather than the components themselves -- this solves the problem of homogenizing the listview's HTML. But 2) is causing me problems, because unless I require all FormComponents to be given a wicket:id which is prespecified and is the same as that in the DropDownChoicePanel (wicket:id=component) then it will not work. Am I going about this all wrong? Is there any way I can receive a FormComponent and then change its wicket:id so that it will always be component in my ListView? Or is there a solution for this problem already? Much thanks for any advice. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink
You did not call target.addComponent for the feedbackpanel or any of its parents. Regards, Erik. jpalmer1...@mchsi.com schreef: I am using an AjaxSubmitLink to submit form data. Using this, however, is preventing feedback messages from being displayed. My code is as follows: public class InitiateDeclarationPage extends EzdecBaseWebPage { @SpringBean private IDeclarationService declarationService; AjaxFallbackLink reenterPinLink; public InitiateDeclarationPage() { final Declaration declaration = new Declaration(EzdecSession.getCurrentUser().getAccount(), EzdecSession.getCurrentUser(), , County.COOK, State.ILLINOIS); //final FeedbackPanel feedback = new FeedbackPanel(feedback); //feedback.setOutputMarkupId(true); //add(feedback); add(new FeedbackPanel(feedback)); final Form form = new Form(initiateDeclarationForm, new CompoundPropertyModelDeclaration(declaration)); form.add(new Button(submitButton) { @Override public void onSubmit() { Declaration declaration = (Declaration) form.getModelObject(); declaration.setStatus(Status.OPEN); ParcelIdentification pin = declarationService.findParcelIdentification(declaration.getPin()); if (pin == null) { error(No PIN found for PIN + getFormattedPIN(declaration.getPin())); } else { if (declarationService.initiateDeclaration(declaration)) { EzdecSession.get().info(Declaration + declaration.getTxNumber() + created); setResponsePage(new DeclarationPage(declaration, 0, pin)); } else { error(Creating declaration with PIN: + declaration.getPin()); } } } }); final PINTextField pinText = new PINTextField(pin); pinText.setRequired(true); pinText.setOutputMarkupId(true); form.add(pinText); form.add(new DropDownChoice(county, Arrays.asList(County.values())) .setRequired(true) .setEnabled(false)); final WebMarkupContainer parent = new WebMarkupContainer(verifyPanelWmc); parent.setOutputMarkupPlaceholderTag(true); parent.setVisible(false); form.add(parent); final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink) { @Override public void onSubmit(AjaxRequestTarget target, Form form) { Declaration declaration = (Declaration) form.getModelObject(); ParcelIdentification pid = declarationService.findParcelIdentification(declaration.getPin()); if (pid == null) { error(No PIN found for PIN + declaration.getPin()); } else { InitiateDeclarationVerifyPanel decVerifyPanel = new InitiateDeclarationVerifyPanel(verifyPanel, pid); parent.addOrReplace(decVerifyPanel); parent.setVisible(true); this.setEnabled(false); reenterPinLink.setVisible(true); target.addComponent(this); target.addComponent(parent); target.addComponent(reenterPinLink); } } }; form.add(verifyPinLink); reenterPinLink = new AjaxFallbackLink(reenterPinLink) { @Override public void onClick(AjaxRequestTarget target) { this.setOutputMarkupPlaceholderTag(true); parent.setVisible(false); verifyPinLink.setEnabled(true); target.addComponent(parent); target.addComponent(verifyPinLink); target.addComponent(pinText); target.focusComponent(pinText); this.setVisible(false); target.addComponent(this); } }; form.add(reenterPinLink); add(form); } } Does anyone know how to fix this? -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxFormSubmitBehavior throws an NullPointerException when the getForm() is overridden
Please file an issue in Jira, preferably with a quickstart to demonstrate the problem. A patch would be even better of course. Regards, Erik. zoltan luspai wrote: Hi, I have an AjaxFormSubmitBehavior where I don't pass the form parameter in the constructor, but have overridden the getForm() method to find the related form. (The form is not parent of the button this behavior is attached to, so can not be found by the behavior itself). When I click on the button attached, the form is submitted nicely, but after the onSubmit call I get this exception: java.lang.NullPointerException at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:142) at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:166) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:299) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:113) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) Having a look at the source it seems there is a but at this line in AjaxFormSubmitBehavior: @Override protected void onEvent(AjaxRequestTarget target) { ... if (form.findParent(Page.class) != null) ... } I think that should be : ... getForm().findParent(Page.class) unless, there is a good reason not to be so? Btw; I am using wicket version 1.4rc4. Cheers Zoltan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OFF TOPIC] Java desktop applications
Major Péter wrote: I didn't actually used it, but this could be helpful for you: http://www.jformdesigner.com/ I have used JFormDesigner extensively, it is an excellent product. Simle, yet it has all layout features you need. Costs are not high. Works with open source JFormLayout layout manager from same author. (JFormLayout is similar to Matisse.) If you need to have an easy tool to create screens and panels in, *and* have readable generated code then look no further. (Note: the generated code only has limited round-tripping.) I recently looked at MIG Layout, this layout manager might overcome your rightful aversion for layouting in code. http://www.miglayout.com/ Regards, Erik. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OFF TOPIC] Java desktop applications
I have some time ago. It doesn't get much priority from Spring Source so don't expect miracles. The main author is mostly tied up on Spring Webflow. Unrelated: I forgot to mention that you should absolutely use Glazed Lists when you're doing a Swing project. Regards, Erik. Jeremy Thomerson schreef: Also - has anyone looked at Spring Rich Client [1]? I used a very early version of it once a couple years ago for a very small project, but have not dealt with it since. I'm also not sure if it will continue to be supported since it hasn't been released or updated in over a year. [1] - http://spring-rich-c.sourceforge.net/1.0.0/index.html -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxLink and Form Validation
Ok. I looked further in the thread. I am not sure what goes wrong, but I think you should call setdefaultformprocessing(false) on the uncheckall AjaxSubmitLink. Otherwise the onSubmit of that button is only called when validation succeeded. If that doesn't work, just create a quickstart (http://wicket.apache.org/quickstart) for yourself to experiment in. That would also be an easy way to try out a newer Wicket versions. No need to check if taget is null by the way. That only applies in AjaxFallback* components. Regards, Erik. Jade wrote: Oh yes will try to do that for sure Erik if my team and manager agrees for it :-) Otherwise, did you(guys) find any thing wrong in my code? or anything thats fishy?? I am a beginner to wickets, so its obvious I must have made some mistake :-s On Thu, Jun 11, 2009 at 12:58 AM, Erik van Oosten e.vanoos...@grons.nlwrote: -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HybridUrlCodingStrategy and CryptedUrlWebRequestCodingStrategy
Hi Vytautas, You can not encrypt bookmarkable URLs as encryption is done per session. So if you're URLs need to be secure you are limited to regular Link's. Regards, Erik. Vytautas Čivilis wrote: for the same purpose, one would encrypt QueryStringUrlCodingStrategy. e.g., if you have /path1/path2/param1/value1 and param1/value1 might expose some business logic or security related concerns. in the same manner as /path1/path2/param1=value1 would cvl Johan Compagner wrote: why would you encrypt the hybrid? -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxLink and Form Validation
Jade, There was a bug regarding this in one of the 1.4 rc's. I think it was rc2. Could upgrade to a newer 1.4 version and try again? Regards, Erik. Jade wrote: Guys, I am still struggling with the same :-( please advise. Tia, J On Wed, Jun 10, 2009 at 8:27 AM, Jade jada...@gmail.com wrote: And, I also tried changing the AjaxButton to AjaxSubmitLink in the java code and with the same input type.../ (as in for a submit button) in the HTML page. I am still having the same issue. All I am confused is, what happens such that the onSubmit method in the AjaxButton is never called once I click on any one of the AjaxSubmitLinks in the form :-( -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxLink and Form Validation
Ah, no that bug is not present in the 1.3 range. But upgrading to a later 1.3 version would perhaps help as well. See the migration guide on the wiki on how tough an 1.3 - 1.4 upgrade will be for you. To give some perspective: I migrated a large project within a few hours. Regards, Erik. Jade wrote: Hi Erik, I am using version 1.3.4. And I guess migration it to version 1.4 would be bit tough. Anyways, that would have to be done if there is no other way around it. Btw, any work around to over come this? Please suggest. Thanks all for your time in educating me. Regards, Jade On Thu, Jun 11, 2009 at 12:41 AM, Erik van Oosten e.vanoos...@grons.nlwrote: Jade, There was a bug regarding this in one of the 1.4 rc's. I think it was rc2. Could upgrade to a newer 1.4 version and try again? Regards, Erik. Jade wrote: Guys, I am still struggling with the same :-( please advise. Tia, J On Wed, Jun 10, 2009 at 8:27 AM, Jade jada...@gmail.com wrote: And, I also tried changing the AjaxButton to AjaxSubmitLink in the java code and with the same input type.../ (as in for a submit button) in the HTML page. I am still having the same issue. All I am confused is, what happens such that the onSubmit method in the AjaxButton is never called once I click on any one of the AjaxSubmitLinks in the form :-( -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MultiLineLabel and alot of P
Hi Daniele, Probably the best action is to look at the source of MultiLineLable, copy it to your own sources and adapt it at will. This approach has 2 advantages: 1) it keeps the wicket library small and focused, 2) you can code it exactly the way you want. Regards, Erik. Daniele wrote: Hi. I tried to use MultiLineLabel but I think it need a new option... Using MultiLineLabel the text is wrapped by p tag, so with only one line of text the space occupied (used in td) is alot. I think it should be an option to set for not wrap the text with p , except when there is 2 or more new-line, of course (as it already acts). .. Or is there another way? Daniele - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [announce] WicketStuff Artwork new release
Hi Nino, Nice stuff. Do you have a link to liquid? Its not a nice google word. Regards, Erik. nino martinez wael wrote: Hi Guys Just wanted to tell that theres a new release of wicketstuff artwork out. This time including niftycornerscube... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
What is the correct way to include the Wicket DTD?
Hi, I recently updated the page http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html for the new DTDs. However, now that I see that the DTD actually includes the whole xhtml spec I am doubting whether I wrote the correct text. So my question for the xhtml guru's here is: what is the correct way to include the DTD? Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Newbie-Problem: Wicket/Maven/Jetty: FileNotFoundException?
Note that this is a maven problem. Apparently maven does not use the correct 'home' directory. You can override the home directory set by setting an environment variable. I think its called M2_REPO. Regards, Erik. Henrik schreef: I am very new to the Java-World and want to make a web project using Java/Maven2/Wicket. I tried to install Wicket with these instructions: http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html Everything went fine up to the point of running a project. I tried Wicket version 1.4 rc4 and 1.3.6. Trying to reach localhost:8080 displays an 503-Error... The console told me the following: INFO - log- Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP INFO - log- jetty-6.1.4 INFO - log- NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet WARN - log- Failed startup of context org.mortbay.jetty.webapp.webappcont...@137c60d{/,src/main/webapp} java.io.FileNotFoundException: \\ROSSV01\ROSSV01\Users\mypersonalusername\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar (Access denied) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:114) at java.util.jar.JarFile.init(JarFile.java:133) [...] ROSSV01 is the name of the networkserver where my userdata is stored. I have no clue why Maven(?) chose that directory... However the URL is false: Right URL: \\ROSSV01\Users\mypersonalusername\.m2\... Wrong URL: \\ROSSV01\ROSSV01\Users\mypersonalusername\.m2\... So I'm pretty stuck here. Is it a Wicket error? Is it a Maven error? Jetty error? Where could I change the URL using eclipse? Right now I am pretty confused here... Would be great if somebody can help me out... - 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: Apache Tomcat CSS
Nice, I didn't know you could use negatives there. Erik. James Carman wrote: You can set up IntelliJ to not exclude them. Just go to the compiler properties for your project and set the exclude to something like !?*.java. 2009/5/13 Erik van Oosten e.vanoos...@grons.nl: I always get this for a new app when I run/build it from Eclipse or IntelliJ. Both default to exclude resources from the java packages. Build with Maven (change the pom or use quickstart to start with a correct pom) and the file should be there. Regards, Erik. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Apache Tomcat CSS
I always get this for a new app when I run/build it from Eclipse or IntelliJ. Both default to exclude resources from the java packages. Build with Maven (change the pom or use quickstart to start with a correct pom) and the file should be there. Regards, Erik. Tomáš Mihok wrote: Hi there, has anyone ever encountered problem with these two? I have a simple application and I wanted to add a css file with link rel=... but after deploying nothing happens. So I copied the CSS in index.html between style tags. This helped but there is still one problem: #header { width:100%; height:122px; background: #44 url('n1.gif') repeat-x; } even though the picture n1.gif is present in the same directory as html file it doesnt load. Is there any solution to this? tm - 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: absolute urls in form action
Hi Steen, Starting Wicket 1.4-rc1 plus a patch you can let Wicket make all URLs absolute. See http://issues.apache.org/jira/browse/WICKET-1974 for more details. With some tweaks you can make the shown code work for any context (not just the root context). Regards, Erik. Steen Larsen wrote: Hi, Does anybody know if it's possible to get Wicket to use absolute urls in a forms action attribute, and how to accomplish this if possible. We're trying to get a Wicket application integrated into a CMS system, through some proxying and need the full urls since the CMS is on a different server from the Wicket application. I realise we probably could do some url rewriting on the CMS side, but it would be nice if there was a simple way to get absolute urls directly in Wicket. /Steen -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Annotations and AOP in Wicket
Wicket is structured such that is usually does not need annotations nor AOP code. The same goes for applications created with Wicket. That said, Wicket 1.3 and 1.4 does have support for Spring injection that uses both annotations and AOP. The wicket-auth-roles example project also uses annotations. Regards, Erik. Munna Ramjee wrote: Hi All.. i am a new bie to wicket. I find that wicket stuff project on security and wicket rad project uses annotations. and also I understand from the blogs that wicket keeps simple things simple through pure OO programming. But is there any scope for annotations support in the upcoming wicket versions 1.4 or 1.5? Moreover does wicket promote the use of AOP in the development of web applications Thanks, munna. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scheduled Wicket courses (Europe) and jWeekend's Global Partner Program
Hello, The first public jWeekend course in Amsterdam has changed date. It is now June 8-9 (Mon-Tue). More information: http://www.jteam.nl/specials.html There is an early bird discount of 10% (before April 30). Regards, Erik. jWeekend wrote: Our partners in Holland, JTeam [4][5], are planning to deliver our course in Amsterdam on Jun10-11(Thu-Fri), Sep28-29(Mon-Tue) and Nov30-Dec1(Mon-Tue), all TBC. JTeam will announce full details of the Wicket training in Holland but in the meantime, please feel free to contact us [0] for more information and reservations. -- Erik van Oosten, Software architect, JTeam B.V. http://day-to-day-stuff.blogspot.com/ http://www.jteam.nl - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom URL Handling
Hi Matthew, Without some serious hacking in the Wicket internals this is not possible. (I did it, but the code is too specific to share.) Wicket 1.5 will improve URL handling, then this case will hopefully be easily. Regards, Erik. Matthew Welch wrote: I have been happily using HybridUrlCodingStrategy for the common pages of my current app, however I am now beginning to implement a section which has slightly different requirements for the URL and while I have some idea about where I can start to implement this custom URL handling, I would like the advice of those more experienced that I to make sure I'm not heading down a rathole. My application will serve many different organizations. All users will see the same set of pages, but the organization that they are choosing to view (users can view the data from any organization) will affect the data on those pages. I would like the urls to be something like this: http://myapp.com/organization1/calendar http://myapp.com/organization1/events http://myapp.com/organization2/calendar http://myapp.com/organization2/events I would need to know the organization part of the URL before retrieving the data for the page, so in reality it's nothing more that page parameter. In all other respects, I would like to keep the functionality provided by HybridUrlCodingStrategy, so would my best bet be to extend that strategy? Is there somewhere else I should be inserting custom code to intercept the URL before it gets to the coding strategy instead? Matt -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: updating PanelCachingTab
- get the list of tabs from the TabPanel - update the list: just put in a new PanelCachingTab on the correct index - call setCurrentTab on the TabPanel (even if the correct tab is already visible!) - if done from Ajax callback, don't forget to add all changed components to the AjaxRequestTarget Regards, Erik. tubin gen wrote: Is it possible to update a panel which is inside org.apache.wicket.extensions.markup.html.tabs.PanelCachingTab , I tried to add the panel to AjaxREquestTraget , it did not work , please suggest me if it is possible to refresh a PanelCachingTab - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket in Action vs the other main books
David, Wicket in Action describe how to integrate with Spring and Hibernate. Databinder.net is LGPL, you can choose and copy code you like. Updating selected code to recent wicket version should be fairly easy. Regards, Erik. David Brown schreef: Hello Wicketers, I am in the throes of a decision to buy the Wicket in Action book. There are a couple of other books but the little time I have lurked on this ML I have noticed the Wicket-in-Action authors are fielding some of the issues on this list. The reason I need to hit Wicket as hard as I can is I have already dismissed 3 other MVC frameworks that I have evaluated over the past two weeks. I have also evaluated 3 end-to-end MVC frameworks based on Wicket. End-to-end means: (HTML UI)(Java POJO middleware)(Hibernate|iBatis)(MySQL). I have dismissed all of the so-called end-to-end MVC frameworks except: databinder.net. The databinder.net framework is a great piece of software based entirely on Wicket and Hibernate. The only caveat is databinder.net appears to no longer enjoy a community type support. And, in fact, databinder.net does not seem to be supported in any way including the original author. So, betting the farm on databinder.net is problematic and this brings us to the question of: does the Wicket in Action book (or any Wicket book) discuss the coupling together of Wicket and something like Hibernate or iBatis to a restructured database for the purposes of rewriting an existing web app. The current web app run-time for the company I am working for was written using a code-generator. The name of the code-generator referenced in the previous sentence is not known. The original programmer that authored the original run-time web app has flown-the-coop. Rants and Raves welcomed. Please advise, David. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Extending wicket for non webapp implementations
Tip: search for rendering to String. Regards, Erik. James Carman wrote: On Wed, Apr 1, 2009 at 9:57 AM, Brill Pappin br...@pappin.ca wrote: I'd love to use wicket as a more general template library. My immediate problem is that I need to build email template library. Has anyone done an extension that would allow it to process non HTML files? This question has been asked multiple times in the past. Check Nabble's archives for the discussions. Folks have done it before and yes, it works. I had the same objections as Christian before, but folks insisted they still wanted it. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and (or) restlet
Jonathan, If parameter handling is easy to do this in Jersey, then that is probably better then Restlet (well v1.x at least). I found that the hard part of Restlet. Working with all kinds of resource types is very powerfull in Restlet. Regards, Erik. Jonathan Locke wrote: well, i'd be the first to admit i don't know either of these two products deeply, but for the kinds of applications i have for web services, i found jersey to have really easy, transparent support for request parameter processing. you just annotate some parameters, create a jaxb schema and add an @Path attribute and you've pretty much got a web service. although it looks like a nice architecture that sticks to REST terminology, i at least couldn't find how restlet made some of this grunt work easy (but then maybe i missed that somehow). Alexandru Objelean wrote: Jonathan, can you elaborate? Why do you think jersey is better? Have you any experience of integrating it with wicket? Thanks! Jonathan Locke wrote: interesting. yeah, igor's right. wicket is not for web services. i prefer jersey to restlet and jersey plays fine with wicket. Casper Bang-3 wrote: restlet is for building services not uis, that quote makes absolutely no sense. While I agree the quote smells of FUD, one doesn't necessarily exclude the other. The beauty of REST is its statelessness, addressability, representation negotiation, caching and other ways it embraces HTTP rather than run away from it (and use overloaded POST's with tiny RPC handlers for everything). In Jersey it's also possible to serve (dynamic) HTML through a standard templating engine, I'm doing this currently and achieving very high scalability while keeping things simple. The caveat with this approach is that you are stuck to the classic templating model and components don't really exist apart from whatever jQuery/ExtJS stuff you wire up manually. So probably like the OP, I can't help but wonder about the possebility of Wicket running on top as a model-view technology - or perhaps just a programming model adopted after Wicket. /Casper -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and (or) restlet
There are several mails with opinions regarding this subject. One way to actually use Restlet and Wicket together is described on http://cwiki.apache.org/WICKET/springbean-outside-wicket.html. Regards, Erik. Objelean Alex wrote: I'm curious what are the community thoughts about restlet. Have you used this framework? Can wicket restlet work together? Have you had any experience with it? Thank you! -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket architecture diagram?
Subbu, Very good that somebody picks this up! At this very high level pages and components are basically just parts of a component tree. A page is just the root of such a component tree. I would therefore recommend replacing the 'page' and 'component' icons by a single stack of 'component tree' icons. The session store is not related to the loadable detachable models. Loading data is entirely the responsibility of the model implementation. What is not clear from this image is that the responsibility to put/get the current page (component tree) in/from the session store lies with the RequestCycleProcessor, not the component tree itself. Regards, Erik. subbu_tce wrote: Based on my understanding, i just prepared a diagram. Wicket Contributors.. Please review and let me know your valuable feedback. http://www.nabble.com/file/p22717793/wicket%2Barchitecture.jpg Thanks, Subbu. jWeekend wrote: Jeremy, It's one of the first things I looked for when I first stumbled upon Wicket 2 years ago, and it is a common request from many architects and even some project managers evaluating Wicket. If the core devs come up with some rough (but correct) sketch they're all agreed on, even if it's just a first iteration, I'll get someone here to create a professional (maybe even glossy) version from that. Regards - Cemal http://jWeekend.com jWeekend Jeremy Thomerson-5 wrote: Has anyone done a nice Wicket architecture diagram? I know about the architecture chapter in WiA, but someone I know is looking for something more along the lines of: http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/sys_architecture.html http://www.ociweb.com/jnb/jsfArchitecture.jpg Unfortunately, I'm no artist - so I can't help him much. I was hoping someone had already done something similar as part of a presentation somewhere. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Dutch Wicket workshop?
Hi Linda, We will shortly start offering the jWeekend course in The Netherlands. See http://blog.jteam.nl/2009/03/24/jteam-announces-wicket-training/ for more information. Regards, Erik. Linda van der Pal wrote: Triggered by the news of a London Wicket Event, I wondered if there is any (Dutch) Wicket guru who would like to give a workshop about Wicket? I am the founder and chairwoman of Duchess (http://jduchess.org) and we try to have workshops about five times a year. I've just started working with Wicket, and it would be cool to have a workshop about it. A location can be arranged if necessary. We're a small foundation, so we can only offer a link on our sponsor page in recompense. Regards, Linda -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Xml models [Was: Making wicket work with Dynamically created html]
Haha, yes ugly, but very clear. In any case, using bind (as on CompoundPropertyModel) works as well. That way you can use proper component ids in combination with XPath-like property expression. Johan Compagner wrote: do you really use such ugly id's? :) On Tue, Mar 24, 2009 at 15:15, Erik van Oosten e.vanoos...@grons.nl wrote: Interesting. I think we have something similar. We do stuff like new TextField(/addresses/address[1]/street) and this will automatically bind the text field to a node in the XML document that was attached to the form. Regards, Erik. Jan Kriesten wrote: I did something like that with XML specifying the form and having a ElementModel binding the form elements to JDOM nodes. Best regards, --- Jan. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Xml models [Was: Making wicket work with Dynamically created html]
Interesting. I think we have something similar. We do stuff like new TextField(/addresses/address[1]/street) and this will automatically bind the text field to a node in the XML document that was attached to the form. Regards, Erik. Jan Kriesten wrote: I did something like that with XML specifying the form and having a ElementModel binding the form elements to JDOM nodes. Best regards, --- Jan. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why are we top-posting...
I don't even read bottom-posts. All that scrolling gives me RSI. Regards, Erik. Anton Veretennikov wrote: Those who receive first part of e-mail through sms message are very thankful if valuable part is on top. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Managing Pagemaps
Subbu, If you write a Wicket application you never worry about session cleanups. Only Wicket puts stuff in the session and only Wickets removes it again. Wicket really does an excellent job here. I have never found any reason to tweak this. That said, you as a programmer have the responsibility to keep session size usage low. In particular you must make sure that your models do not retain too much data. Luckily this is easy by using detachable models. Regards, Erik. subbu_tce wrote: Sorry if i am being ignorant in posting these kind of questions But i am in the evaluation of wicket in comparison with a proprietary framework (currently used for building large scale business applications) which provides comprehensive session clean up flexibilities thorough XML Configuration while navigating between different wicket applications in a single window. That's why i had to put this question to wicket experts Does Wicket provide any hooks to do session cleanups between wicket clean ups? Martijn Dashorst wrote: Premature optimization. Don't try to do this type of stuff unless it is actually a problem. Why not make sure you have applications first and then see if it is actually a problem? Martijn On Sat, Mar 14, 2009 at 2:40 AM, subbu_tce subramanian.mur...@gmail.com wrote: I mean two different wicket applications running in the same JVM.. And i launch the first wicket application in a window.. i navigate among different pages in the first wicket application. now since i have navigated through different pages, i understand that multiple versions of the pages would have been maintained in page maps. Now i navigate to the second wicket application from the first wicket application. From the second wicket application, i might never navigate back to the first wicket application. so i would need to clean up everything that would be maintained in session with respect to the first wicket application when i navigate to the second application. thatz y i was wondering whether any hooks are there for the same. Johan Compagner wrote: do you mean multiply wicket applications on the same host? (just like our example?) then yes you have a pagemap set per wicket app in your session (prefixed with the wicket app name) There are no such hooks because a wicket app 1 is independent on wicket app 2, they should be isolated. (they could be in 1 context like exampels but also could be under different contexts) Why do you want to clean up pagemaps.. A pagemap only holds they active page and nothing more. What you can do is destroy the session on a logout button, but i guess you cant invalidate the http session if it is shared over multiply apps... johan On Fri, Mar 13, 2009 at 00:58, subbu_tce subramanian.mur...@gmail.comwrote: I understand that wicket maintains page maps by windows / tabs opened. If the user navigates to pages in multiple wicket applications in the same window, how are the page maps maintained? Will a new page map be created / maintained for every wicket application navigated in the same window? And does wicket provide any hook points to clean up page maps when a user navigates to different applications with in the same window? Thanks, Subbu. -- View this message in context: http://www.nabble.com/Managing-Pagemaps-tp22487669p22487669.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 -- View this message in context: http://www.nabble.com/Managing-Pagemaps-tp22487669p22508300.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generics question
Hi Linda, You are assuming that IModelListSubgenre is a subtype of IModelList? extends DomainObject In java this is not the case (even if Subgenre extends DomainObject). You'll need an explicit cast to make this work: IModelList? extends DomainObject castedModel = (IModelList? extends DomainObject) subgenreModel; Regards, Erik. Linda van der Pal wrote: This is not really Wicket related, but I don't quite know where else to ask this. The question is: why won't this compile? // I define a model IModelListSubgenre subgenreModel = new AbstractReadOnlyModelListSubgenre() { ... } // Here I try to use the model FieldSwitchPanel subgenrefield = *new SubgenreFieldSwitchPanel(subgenre, subgenreModel);* // This is the constructor for the class SubgenreFieldSwithcPanel public SubgenreFieldSwitchPanel(String id, IModelList? extends DomainObject choices) { ... } // Subgenre extends DomainObject public class Subgenre extends DomainObject{ ... } The complaint is: The constructor SubgenreFieldSwitchPanel(String, IModelListSubgenre) is undefined. Thanks, Linda -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Security in a Spring Wicket layered application
Hi Kent, Go with something that enables authorization in the service layer (e.g. Spring Security, jSecurity, ...). Next base your custom wicket authorization on the authentication store of the chosen base technology. Spring Security uses a thread local as authentication store and has a servlet filter to copy the authenticated user to/from the session so that the authenticated user is handily available during a request and properly stored afterwards. Authentication itself can be implemented from Wicket in a custom way (e.g. a username/password form). On success you just store the authenticated user in the authentication store. Regards, Erik. Kent Larsson wrote: Hi, I know there has been some discussion on this. But I've had a hard time deciding how this project should use security anyway. The application in question is layered into three layers for presentation, services and persistence using Wicket, Spring and Hibernate. What we need: - Authentication - Authorization on pages, components - Authorization before being able to run methods in the service layer - Authorization for viewing/editing some domain objects using Access Control List's (ACL's) I have read Wicket in Action and it's custom security solution has some pros: - It's quite easy to understand - We have a lot of freedom in how to do authentication and authorization And some cons: - I don't know how to authorize calls of specific methods, and thus - All security will be in the presentation layer - It won't be usable if we want security on web services later (which we do not need now, so maybe this can be disregarded) It would be nice if we could have a common solution to our security needs that integrates well with Wicket and Spring. I know that the Auth Roles project is out there as well as Swarm. But I don't know which will meet our needs and which will most likely be an option to us when we later move to Wicket 1.4 or a higher version. Best regards, Kent -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Expected close tag for wicket:link ??
You will also get this error when you accidentally use a WebComponent instead of a WebMarkupContainer. The first does not allow embedded content and will therefor issue this error. Regards, Erik. Edwin Ansicodd wrote: I find this error in my log file when a wicket page loads. Would anyone know what causes this error? ERROR org.apache.wicket.RequestCycle - unexpected exception when handling another exception: Expected close tag for wicket:link -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MixedParamUrlCodingStrategy and too many path parts
You'll get this warning when something/someone made the url longer then was expected by the strategy. If you don't want the standard behavior just copy/paste the code and adjust it to your needs. Still, logging the URL would be a nice addition to the default implementation. Regards, Erik. novotny wrote: Hi, I'm using MixedParamUrlCodingStrategy which seems to work fine. However I saw a bunch of errors in the log file: Too many path parts, please provide sufficient number of path parameter names If this shows up, how can I direct a user to a PageNotFound? Also how can I log what HTTp requests users are making to the site to see where this is coming from? Thanks, Jason -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Why is BookmarkablePageLink generified?
Hello, I was wondering why BookmarkablePageLink has been generified. A bookmarkable link has no use for a model as far as I can see. Shall I create an issue to change the declaration of BookmarkablePageLink from: public class BookmarkablePageLinkT extends LinkT to public class BookmarkablePageLink extends LinkVoid ? Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [vote] In Wicket 1.4 and onwards, remove widening from the list of choices model in DropDownChoice, changing it from IModelList? extends Foo to IModelListFoo
[X] Yes, change the DropDownChoice constructor to take the choices list as IModelListT or ListT without the wildcard Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket and standardization (was: Wicket at ApacheCon EU'09 in Amsterdam)
Please change the subject of this thread. Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Intellij Idea Plugin Bounty
Andreas Petersson wrote: Also make sure you have the Wicket DTD loaded in Intellij. i got the dtd, but where exactly in intellij can you associate the wicket dtd with xhtml. setup external resource did not work. Sorry, I can't look it up at home. Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Intellij Idea Plugin Bounty
Matt Welch wrote: 5) Validation for wicket namespace and attributes in hTML template - In a similar vein, I would like wicket attributes like wicket:id and wicket tags like wicket:message to not show up as either errors or warnings in my HTML templates. If you do alt-enter or right-click on such an warning, you will get the option to add the attributes as custom attributes. Now it will even code complete them for you. Also make sure you have the Wicket DTD loaded in Intellij. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: mountBookmarkablePage changes delimiter of PageParameters
Steve, Try to mount with the MixedParamUrlCodingStrategy. Regards, Erik. Steve Swinsburg wrote: Hi all, I have just noticed that mountBookmarkablePage changes the delimiters of query string object to be all forward slashes. Why is this? For instance I want to get a url to a page class: urlFor(MyPage.class, new PageParameters(id= + userId)).toString()); which gives: ?wicket:bookmarkablePage=:my.package.here.MyPageid=123456789 which is fine, but I wanted to get rid of the package name, so I mounted the page like so: mountBookmarkablePage(/myPage, MyPage.class); and the same urlFor result gives: myPage/id/123456789/ In my circumstances I cannot have slashes (legacy restriction) and must have the ?= style parameters but I still need the package to be hidden, how could I go about doing this? cheers, Steve -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem deploying quickstart application on tomcat+apache (mod_jk)
Only requests that start with /quickstart are directed to Tomcat. Only requests that start with /quickstart/app are directed to Wicket. BTW, it is recommended to use Wicket from a Filter instead of a Servlet. Regards, Erik. Vika wrote I discovered that if in mod_jk.conf i change JkMount /quickstart/app/* ajp13 to JkMount /quickstart/* ajp13 it works. Servlet mapping in web.xml : servlet-mapping servlet-namequickstart/servlet-name url-pattern/app/*/url-pattern /servlet-mapping Any idea how I can solve this problem ? I wouldn't want all requests to be directed to tomcat. Thanks Vicky -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: making a HTTP request directly in Wicket
Thanks Peter, Marcelo, Still learning every day... Regards, Erik. Marcelo Morales wrote: Don't forget setReadTimeout(int) Also very important. On Thu, Feb 5, 2009 at 11:42 AM, Peter Ertl pe...@gmx.org wrote: Please use commons HttpClient, with the standard Java client you have no control over timeouts potentially hanging your application. Is this still true? I found that at least in Java 6 there is URLConnection.setConnectTimeout(int) -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback Panel
The HTML that is rendered by FeedBackPanel provides enough styling that you can do this with CSS. Regards, Erik. Daniel Ferreira Castro wrote: Hi, I am looking around internet but I still haven´t found what I am looking for - (Bono, do not sue me) I would like to customize a Feedback Panel in a way that error messages are displayed as Red, info as Green and Warn as Yellow (I will need to change the background of this panel to make it confortable for the eyes also) and, if possible, when a success message is printed an check icon displays by its side (This is probably using border, but I am not sure). How to do this? -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback Panel
Again, change it with css. Erik. Daniel Ferreira Castro wrote: And if I don´t wanna a unumbered list to be as the presentation of the errors and messages? How to do this? On Fri, Jan 30, 2009 at 10:18 AM, francisco treacy francisco.tre...@gmail.com wrote: for example, in your css: ul .feedbackul { list-style-type: none; font-size: 0.7em; border-top: 1px dashed #BCBAAC; margin-left: 6px; margin-bottom: 20px; padding: 0; width: 90%; } li .feedbackPanelERROR { color: red; font-size: 1em; margin-left: 6px; margin-bottom: 20px; padding: 0; width: 90%; } francisco On Fri, Jan 30, 2009 at 1:07 PM, Erik van Oosten e.vanoos...@grons.nl wrote: The HTML that is rendered by FeedBackPanel provides enough styling that you can do this with CSS. Regards, Erik. Daniel Ferreira Castro wrote: Hi, I am looking around internet but I still haven´t found what I am looking for - (Bono, do not sue me) I would like to customize a Feedback Panel in a way that error messages are displayed as Red, info as Green and Warn as Yellow (I will need to change the background of this panel to make it confortable for the eyes also) and, if possible, when a success message is printed an check icon displays by its side (This is probably using border, but I am not sure). How to do this? -- Erik van Oosten http://day-to-day-stuff.blogspot.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 -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback Panel
Well, I am assuming you want either a numbered list, or no bullets at all. If you want something else, you are on your own (copy paste FeedbackPanel and tweak the copy). Look at the Wicket examples to see some CSS customization. Regards, Erik. Erik van Oosten wrote: Again, change it with css. Erik. Daniel Ferreira Castro wrote: And if I don´t wanna a unumbered list to be as the presentation of the errors and messages? How to do this? On Fri, Jan 30, 2009 at 10:18 AM, francisco treacy francisco.tre...@gmail.com wrote: for example, in your css: ul .feedbackul { list-style-type: none; font-size: 0.7em; border-top: 1px dashed #BCBAAC; margin-left: 6px; margin-bottom: 20px; padding: 0; width: 90%; } li .feedbackPanelERROR { color: red; font-size: 1em; margin-left: 6px; margin-bottom: 20px; padding: 0; width: 90%; } francisco On Fri, Jan 30, 2009 at 1:07 PM, Erik van Oosten e.vanoos...@grons.nl wrote: The HTML that is rendered by FeedBackPanel provides enough styling that you can do this with CSS. Regards, Erik. Daniel Ferreira Castro wrote: Hi, I am looking around internet but I still haven´t found what I am looking for - (Bono, do not sue me) I would like to customize a Feedback Panel in a way that error messages are displayed as Red, info as Green and Warn as Yellow (I will need to change the background of this panel to make it confortable for the eyes also) and, if possible, when a success message is printed an check icon displays by its side (This is probably using border, but I am not sure). How to do this? -- Erik van Oosten http://day-to-day-stuff.blogspot.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 -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is there a way to be notified when a tab in a TabbedPanel is selected?
Hi Zhubin, Everytime there is a tab switch, method getPanel from the ITab instance is called. Regards, Erik. Zhubin Salehi wrote: Hi all, How can I be notified when one of the tabs in a TabbedPanel is selected? Where is no onSelect() method in ITab interface, is there a way to achieve this? Thanks, Zhubin -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Architectural dilemma: Wicket + REST (JSR311)
Wicket is all about stateful applications (though stateless stuff is useful and is supported). REST is all about stateless resources (though you sometimes need stateful hacks for login/authentication). Given these premises, I would not implement REST resources with Wicket (well, maybe if you have just 1 or 2). If you want to be more powerful, I would rather implement REST stuff with Spring MVC. Currently I am using Restlets which works very well also. Jersey sounds fine as well. Regards. Erik. Fabrizio Giudici wrote: Hi there. My application, along with the usual HTML pages generated with Wicket, should also expose some RESTful services. These REST calls should return documents of various types: images, movies, as well as RDF/XML and N3 and so far. In an architectural spike I've made, I've used Jersey (implementation of JSR-311) and of course the two things can co-exist; so everything works and I don't have technical problems to solve (at the moment). The dilemma is architectural: I'm guessing whether getting JSR-311 in increases complexity in a way that can be avoided. In other words, could Wicket be able to serve the same facilities provided by JSR-311 (I mean, the subset I need)? Actually, Wicket can serve non-HTML contents by means of DynamicWebResource, so it seems doable. There are two specific questions now: 1. Security. For HTML pages, protected areas shoud handle login in the WIcket way (or what I assume is the normal Wicket way), i.e. rendering a specific HTML login page. For other types of documents, instead, I need HTTP authentication and perhaps in future some token-based approach. The point is that in any case either I deny the access or I give the resource, but I can't send back an HTML login page when the client expects a different document type. Would I be able to handle this with Wicket? 2. Having the same URL delivering different contents according to the Accept header. For instance, http://foo.bar/blah should normally render an HTML page; but if a Accept: text/n3 header is specified, a N3 should be returned. This means that in the former case the default Wicket workflow would be ok; in the latter, a DynamicWebResource should be provided. I think I can solve this using JSR-311: I could implement a super-filter that discriminates on the presence of the Accept: header and dispatches either to the Wicket or to the Jersey filter (of course I would implement a custom URL mount scheme so Wicket accepts the same URL as Jersey). Hints? I'm searching to find ASAP a reason for deciding to keep Jersey or to get rid of it, so I can go on with the development without too many fears of having to change something in future. Thanks. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is there a way to be notified when a tab in a TabbedPanel is selected?
Yes, unless you use the PanelCachingTab decorator. Erik. Zhubin Salehi wrote: So every time a tab is selected, a new instance of that panel will be created? -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is there a way to be notified when a tab in a TabbedPanel is selected?
How about this: tabs.add(new PanelCachingTab(new AbstractTab(new StringResourceModel(title.byMobinetId, FindUserAccount.this, null)) { private static final long serialVersionUID = 5564837747113048306L; public Panel getPanel(String panelId) { return new MobinetTab(panelId); } }) { @Override public Panel getPanel(final String panelId) { // ... DO SOMETHING UPON TAB SELECTION ... return super.getPanel(panelId); } }); This override getPanel from PanelCachingTab. But you could also implement your own ITab. Regards, Erik. Zhubin Salehi wrote: Sorry wrong code fragment! Here is the right one: /* 'search by MobiNET ID tab */ tabs.add(new PanelCachingTab(new AbstractTab(new StringResourceModel(title.byMobinetId, FindUserAccount.this, null)) { private static final long serialVersionUID = 5564837747113048306L; public Panel getPanel(String panelId) { return new MobinetTab(panelId); } })); /* 'search by person's details tab */ tabs.add(new PanelCachingTab(new AbstractTab(new StringResourceModel(title.byPersonDetails, FindUserAccount.this, null)) { private static final long serialVersionUID = 211211104202913141L; public Panel getPanel(String panelId) { return new PersonDetailTab(panelId); } })); -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Embedding html from an external application
Hi Farhan, Yes, indeed. After so many years Wicket can still surprise me. Anyway, the problems you have with this are identical as you would have with the c:import tag. What you want is not simply feasible. It would be wise to consider alternatives. For example moving the JSPs into the same context as the Wicket application, using an iframe (session problem does not go away), or getting rid of the JSPs altogether. Regards, Erik. mfs wrote: Eric, Thanks for the follow-up. Actually i just came across the http://wicket.sourceforge.net/apidocs/wicket/markup/html/include/Include.html Include component in Wicket which i believe does the same as you suggested to implement...i.e. opens up a new http-connection to the server/url from where the contents are to be embedded...Isn't it ? Secondly since this would mean a separate request would be opened for contents to be included, and hence wouldn't be carrying the request parameters, cookies etc. Which i would have to figure out a way to pass-on/embed manually. Farhan. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ -- View this message in context: http://www.nabble.com/Embedding-html-from-an-external-application-tp21593700p21655839.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
wicket jmx panel
Hello, I am interested in bringing the wicket-stuff's jmx panel up to date (that upgrade it to 1.4). How do I go about this? Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Logging from Wicket alone and together with Spring and Hibernate + my own code
Hi Kent, I am using the SLF4j implementation of commons-logging. If you use maven2 take a look at this blog article for an pom example that will set this up with log4j as logging backend: http://day-to-day-stuff.blogspot.com/2007/07/no-more-commons-logging.html. Below is a more up to date pom extract that also adds a java.util.logging to slf4j bridge (you need to call SLF4JBridgeHandler.install() at some point during application init). Regards, Erik. !-- Logging section. -- !-- Do not use commons-loggin! -- dependency groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId version99.0-does-not-exist/version scopeprovided/scope /dependency !-- the slf4j commons-logging replacement -- dependency groupIdorg.slf4j/groupId artifactIdjcl-over-slf4j/artifactId version1.5.2/version /dependency !-- direct java.util.logging to slf4j -- dependency groupIdorg.slf4j/groupId artifactIdjul-to-slf4j/artifactId version1.5.2/version /dependency !-- the other slf4j jars -- dependency groupIdorg.slf4j/groupId artifactIdslf4j-api/artifactId version1.5.2/version /dependency !-- using log4j as backend -- dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.2/version /dependency dependency groupIdlog4j/groupId artifactIdlog4j/artifactId version1.2.14/version /dependency !-- End of logging section. -- Kent Larsson wrote Hi, I have some questions about logging, more specifically about setting it up and making sure it works. The project I'm doing will use Wicket, Spring and Hibernate. I know that Wicket and Hibernate uses Simple Logging Facade for Java (SL4J) and that Spring is using the logging component from Apache Commons. Will they co-exist happily? I thought I would use log4j together with both SL4J and the logging component from Apache commons, do you think that's a good idea? Can I set up them all to output logging data into a common file? Or should I use separate files? Or should I store the logging messages in the database? (I'd rather not, as I find grepping etc on text files quite convenient.) Not strictly Wicket, but for Spring I guess I need some kind of configuration file for the Apache Commons logging component as well where I direct it to use log4j? When I've set these up I guess to see that everything works I set the logging level to INFO as it's fairly certain that all three of the frameworks output some information in that mode? Or is there an even better way to make sure? And my last question. In the project I'm starting, do you recommend that I use SL4J for my own logging purposes? (I thought I would use log4j directly, but that was before I learned a little bit more about logging and a lot of respectable libraries seem to choose the path of a bridge/facade for their logging needs. And if it gets us flexibility without added cost there's no reason not to do it that way.) I'm looking forward to hearing more from you about how you are doing your logging. It's a new area for me which I'm eager to improve myself in. Best regards, Kent -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Martijn, I just went through the source (1.4-rc1) to trace a detach manually and find suspect callers of isVisible. I found none during detach, but I did find one call to isVisible /after/ detach. A simple run confirmed this. The call to isVisible /after/ detach can be found in method ComponentRequestTarget#respond(RequestCycle). That method initiates a detach and then calls page.endComponentRender. This leads to a call to Page#checkRendering which calls isVisibleInHierarchy() and from there isVisible(). Method checkRendering only does something when the debug setting 'componentUseCheck' is enabled (which according to the javadoc is true by default). I vividly remember the pain when I found out that isVisible was called /during/ detach. So I am certain the problem existed at some time in the past (1.2, 1.3?). I can bang my head against the wall for not having documented the problem more thoroughly back then. Anyways, a call to isVisible /after/ detach has similar problems to a call during detach. Regards, Erik. Martijn Dashorst wrote: A short test didn't uncover any calls to isVisible during detach phase (1.4). Might need more extensive tests though... Martijn -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: skip item in populateItem of ListView
There is no such method as populateItem. With these components you just add the sub-components you want to see. In other words, you do the iteration yourself. See the javadoc of RepeatingView (http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/repeater/RepeatingView.html). Regards, Erik. Stephen Swinsburg wrote: Does RepeatingView or RefreshingView allow me to skip an item once inside populateItem() ? thanks. On 15/01/2009, at 8:46 PM, Erik van Oosten wrote: Perhaps it would be more natural to use RepeatingView (or RefreshingView) in such cases. Regards, Erik. Steve Swinsburg wrote: Hi all, I have a situation whereby certain conditions mean I need to skip an item that is being rendered in a ListView. ie inside the populateItem() method I do some processing and if that item fails, it shouldn't be rendered so I'd like to skip to the next item. I know I *could* process the list before it reaches the ListView but I'd prefer not to iterate over the list twice. Is there some way of skipping this item or not showing the item (and making sure none of its content is output)? thanks, Steve -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Hi Jan, Can you point to a place where this is documented? Its not on http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html. Regards, Erik. Jan Kriesten wrote: 3) may be a good improvement, maybe with a new wicket tag (wicket:component type=com.me.MyCustomComp /). let's see what think core developpers hehe - that one already exists, too! : -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Thanks DVD, we already established that it is called more then once. This discussion is talking about: 1. caching the visible value during the render phase to prevent the potentially large performance hit of multiple invocations to isVisible 2. preventing calls to isVisible during or after the detach phase to allow caching in the first place Regards, Erik. DVD wrote: Hello. Pardon me for jumping into this topic as I did not go through previous posts. But I did notice that the isVisible() is called at least three time when a page is rendered I have a SQL call inside the method and the sql log shows multiple sqls were issued. I am running wicket 1.3.5. Sorry I could not provide sample to reproduce this. but I did see it happening. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Yep, I did see that. However, it does not describe the type attribute Pills described: Pills wrote: 3) may be a good improvement, maybe with a new wicket tag (wicket:component type=com.me.MyCustomComp /). let's see what think core developpers Jan Kriesten wrote Hi Erik, Can you point to a place where this is documented? Its not on http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html. actually, it is there. :) ---8--- Element wicket:component wicket:component - Creates a Wicket component on the fly. Needs a class attribute. Though this has been in wicket for a long time, it is still kind of an unsupported feature, as most of the core developers believe that this may lead to misuse of the framework. Before heavily relying on this feature, you might want to contact the user list to discuss alternative strategies. (THIS TAG IS NOT SUPPORTED BY THE CORE TEAM) ---8--- Since wicket:component has some issues (e.g. HeaderContribution doesn't work) I build my own DynComponent some time ago (see my blog for details). Best regards, --- Jan. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Jan Kriesten wrote: just replace 'type' with 'class' and you're there. Also, any other attribute you put into the wicket:component tag is looked a setter on the class for, so you can pass parameters in from you html code. Best regards, --- Jan. Ouch, that is ugly. Now I understand why it is deprecated. Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Please don't turn the logic around. Caching is only needed because isVisible can be a performance hit. /If/ you want caching /then/ isVisible should not be called after detach as detach is needed to clear the cache. Regards, Erik. s...@meiers.net wrote: Ok, IMHO it's a bug that wicket calls isVisible() after detachment. Thus caching isVisible() is not needed. Sven - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Sorry Sven, You of course meant to say: /If/ isVisible would no longer be called after detach /then/ it would be possible to do the caching yourself (as you can use detach to clear the cache). /If/ you can cache yourself /then/ Wicket does not need to cache the result of isVisible. Although I think that logic is completely correct, I also think it would be very convenient to remove the burden of caching the visible flag during render from the programmer. Regards, Erik. s...@meiers.net wrote: Ok, IMHO it's a bug that wicket calls isVisible() after detachment. Thus caching isVisible() is not needed. Sven -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Created an issue: http://issues.apache.org/jira/browse/WICKET-2025 Regards, Erik. Erik van Oosten wrote: Martijn, I just went through the source (1.4-rc1) to trace a detach manually and find suspect callers of isVisible. I found none during detach, but I did find one call to isVisible /after/ detach. A simple run confirmed this. The call to isVisible /after/ detach can be found in method ComponentRequestTarget#respond(RequestCycle). That method initiates a detach and then calls page.endComponentRender. This leads to a call to Page#checkRendering which calls isVisibleInHierarchy() and from there isVisible(). Method checkRendering only does something when the debug setting 'componentUseCheck' is enabled (which according to the javadoc is true by default). I vividly remember the pain when I found out that isVisible was called /during/ detach. So I am certain the problem existed at some time in the past (1.2, 1.3?). I can bang my head against the wall for not having documented the problem more thoroughly back then. Anyways, a call to isVisible /after/ detach has similar problems to a call during detach. Regards, Erik. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Why you should not override isVisible
In the thread Where to process PageParameters I was requested to explain why I think you should not override isVisible, but rather should call setVisible in onBeforeRender (slide 100 in my presentation http://www.grons.nl/~erik/pub/20081112%20Effective%20Wicket.pdf). There are 2 reasons, but only the second one is really important. -1- isVisible is called a lot. It is easily called ten times within 1 request So if you have anything processor intensive going on, it will be a performance hit. Just doing a simple expression is of course no problem. (For fun, just set a breakpoint in something like FeedbackPanel#isVisible and request a page that contains one.) -2- isVisible can make your model be reloaded multiple times within 1 request Consider the following case (pseudo code): MyPanel(id, personId) { super(id, new CompoundPropertyModel(new LoadableDetachablePersonModel(personId))); add( new Label(address) { @Override isVisible() { return getDefaultModel() != null; } }); } The label uses the property 'address' of a person to see if the label should be visible. The person is retrieved by a LoadableDetachableModel subclass (LDM) and then wrapped by a CompoundPropertyModel (CPM). During the render phase, isVisible will delegate getting the address property to the CPM and this model delegates it to the LDM. LDM will load the person from the database only once (well until it is detached). At the end of the render phase everything will be detached. But now something weird happens. The problem is that isVisible is called during the detach phase, on the label /after/ the CPM (and therefore also the LDM) are detached. As isVisible retrieves the model from the CPM, and therefore from the LDM, it will trigger a reload of the person inside the LDM. Now, as visibility is often (if not almost always) determined by a business object (e.g. very often a LDM) I think it makes sense to avoid having to think about the situation described above, and just avoid it all together. Note: I observed this behavior in Wicket 1.3 (1.3.3 I think). If it works differently now, I would be very glad to withdraw this recommendation. Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where to process PageParameters
Michael, I answered on another thread. Regards, Erik. Michael Sparer wrote: Yepp, I also didn't have problems with it as - you're right - I took it at face value without thinking about it too much. I thought to avoid problems when the traffic of our apps grows and/or explodes I'll do it the save way :-) wasn't much effort to change the stuff anyway. But now I'd be interested in hearing Erik's opinion about that - he obviously must have had problems with it Michael -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21475798.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: Why you should not override isVisible
Hi Pierre, I actually thought they were in English, but I now see that the first few are in Dutch. Not sure why I did that. They are not that important, so just read on... Regards, Erik. Pierre Goupil wrote: Good evening, I'm sorry to bug you, but I'be read the presentation you're talking about in this post and was wondering if you have an english-speaking commented one available ? Nice work ! Regards, Pierre Goupil -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Indeed. If this would no longer be the case, overriding isVisible would be no problem (though caching would be nice). Regards, Erik. Martijn Dashorst wrote: What is strange is that isvisible is being checked during detach (I seriously doubt that). That shouldn't be happening: *all* components should be detached regardless of their visibility. Martijn -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: skip item in populateItem of ListView
Perhaps it would be more natural to use RepeatingView (or RefreshingView) in such cases. Regards, Erik. Steve Swinsburg wrote: Hi all, I have a situation whereby certain conditions mean I need to skip an item that is being rendered in a ListView. ie inside the populateItem() method I do some processing and if that item fails, it shouldn't be rendered so I'd like to skip to the next item. I know I *could* process the list before it reaches the ListView but I'd prefer not to iterate over the list twice. Is there some way of skipping this item or not showing the item (and making sure none of its content is output)? thanks, Steve -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Twenty Six Wicket Tricks
Jonathan Locke wrote: I've got 13 tricks coded up now and ideas for a handful more, but if there are any requests out there, please let me know Perhaps something about handling URLs. Like writing your own url coding strategy and how to mount pages with URL that have some variable before the fixed parts (like /{language}/products/{productid}). Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Merb-Rails Merge
Please, no Ruby bashing here (or no bashing whatsoever). The Ruby world has many more options besides Rails and Merb. Camping, Sinatra, Ramaze, Nitro just to name a few. Its not such a ridiculous long list as in the Java world, but hey, Ruby has not been popular for that long. Rails should be a good replacement of PHP, nothing more. I think you severely underestimate both. (When given to the right people of course.) I hope Java web frameworks never got merged together. Too late :) Struts merged with Webworks. But I agree; choice is good. Erik. HHB wrote: I hope Java web frameworks never got merged together. Whenever my Rails dudes points toward how many Java has web frameworks and considering this as a bad thing, I smile. I smile because they don't have an option, just Rails. We (Java guys), have request/action frameworks, component-based frameworks, Java2JavaScript frameworks, Hybrid framework. DHH is a jerk, but a smart one. He tries so hard to convince every body on the planet that his Rails is the ultimate framework. Rails should be a good replacement of PHP, nothing more. The funniest thing when I hear Ruby/Rails guys talking about deploying Rails applications in the enterprise, What a good joke !! -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Filtering data in DataTable
Mike, The phonebook example from wicket-stuff (currently down?) shows how to use the wicket-extra filters. Regards, Erik. Mike wrote: Is there a way to create filter for numeric types in DataTable column that would allow user to enter/choose value for filter state object and choose if values selected to be shown in DataTable should be bigger, lesser or equal to the entered/chosen value? -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-tap operations in Wicket
Apart from letting you guess what a page map is (a collection of visited pages) I think Ernesto gave a very decent response. So lets turn this around: What would you like to know? Regards, Erik. PS. If that really is /the/ gem of Seam, you're in for a treat with Wicket! ;) HHB wrote: This effects all the Wicket pages in the application, right? Seam folks advertise this feature as one of the gems of Seam framework, why Wicket doesn't shed more light on it? Common Wicket, no need to be humble this time :) -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-tap operations in Wicket
Glad that is out of the way :) Wicket and Seam are frequently compared. But I think it is not a fair/possible comparison. We might as well compare TestNG with Mockito, both are about testing but in an entirely different league. Seam's goal (as far as my humble knowledge goes) is targeted at combining a variety of frameworks (in particular EJB3 and JSF). Focus is on managing transactions and passing data around by storing and retrieving it from an array of (untyped) contexts. (Please forgive me if I am completely wrong.) Wicket's goal is to provide a natural OO environment to program a html user interface. (Reusable UI components anyone?) Passing data around is the responsibility of components but is typically done with (fully typed) models. There is no need for contexts to keep state as the entire components are kept as state. This is done by storing complete page component hierarchies to a page map. Usually you have one page map per session. Wicket's transaction support is no better or worse then the next web framework. Regards, Erik. HHB wrote: What I would like to know? If Wicket supports multi-window/tap (beginning a new (what I can call?) a conversation)? Well, yes, it does http://wicketstuff.org/wicket13doc/org/apache/wicket/settings/IPageSettings.html Multi-window/tap isn't the gem of Seam, one of them :) We need to do more marketing for wicket guys:ninja: Erik van Oosten wrote: Apart from letting you guess what a page map is (a collection of visited pages) I think Ernesto gave a very decent response. So lets turn this around: What would you like to know? Regards, Erik. PS. If that really is /the/ gem of Seam, you're in for a treat with Wicket! ;) HHB wrote: This effects all the Wicket pages in the application, right? Seam folks advertise this feature as one of the gems of Seam framework, why Wicket doesn't shed more light on it? Common Wicket, no need to be humble this time :) -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-tap operations in Wicket
Ah :) IMHO it should be added. It might be a small thing in the larger Wicket picture, but it is a big deal for some applications. Care to open a issue? Erik. Ernesto Reinaldo Barreiro wrote: Hi Erik, Still one question remains... Should that feature be added to [1]? Or it is small enough to be discarded... Best, Ernesto [1]-http://wicket.apache.org/features.html -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Dynamic Simple (html) Components
Hi Mito, Basically you are asking for Label. Label can generate anything you want. Look at the source of Label for inspiration if you need more customization.1 Also take a look at TextTemplate. There is also a FreeMarker version, I think its in wicketq-extra. Regards, Erik. mito wrote: So my question is...Can I create dynamic components with Wicket that have no assoicated html markup? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Redirect to mounted page programmatically
Hi Per, Wicket does not have this feature. BTW, you do not need a response page instance, just the class is sufficient: setResponsePage(Page1.class); Optionally you can call this as well (since you are talking about redirects): setRedirect(true); // or false Regards, Erik. Newgro wrote: Hi *, i would like to redirect to a page mounted in application by calling it from another page. Application.init mountBookmarkablePage(PAGE1_ID, Page1.class); AnyPage.myMethod redirectTo(PAGE1_ID) How could a redirectTo(String mountPoint) method look? The normal redirection by requestcycle is not working because i firstly need a responsepage. But how should i get it by a MountPointId? A global registry is not nice in my eyes. Would be nice if someone can help me out here. thanks Per -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Javascript call to wicket
Hello Itay, It was just an experiment. I have never actually used it. Its been a long time ago too.. If may suggest, please try Firebug Lite to debug it. Sorry I can't be of more help. Regards, Erik. itayh wrote: Hi Erik, I used your solution and it works great for ff, while ie seem to have problems with it. Have you run it also in ie? Thanks, Itay Erik van Oosten wrote: I just finished an experiment with something like that. Its still ugly and very static, but here is my code. In the HTML header the function you can call from Flash: function(someValue) { var inputEl = document.getElementById('anchor8'); inputEl.value = someValue; eval(inputEl.getAttribute('onclick')); } Somewhere in the page: form wicket:id=ajaxForm style=display: none;input wicket:id=myField type=hidden value=//form Note that 'anchor8', the Wicket generated id of the input element, still needs te be made dynamic. Not sure how yet. The code: Form form = new Form(ajaxForm); add(form); final HiddenField myField = new HiddenField(myField, new Model(), String.class); form.add(myField); myField.add(new AjaxFormSubmitBehavior(onclick) { @Override protected void onError(AjaxRequestTarget target) { throw new RuntimeException(foutje); // not sure what to do here } @Override protected void onSubmit(AjaxRequestTarget target) { String myValue = (String) myField.getConvertedInput(); processAjaxRequest(target, myValue); } }); Improvements are very welcome. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: LoadableDetachableModel in Listview
So I guess you're not levering the optimistic locking of Hibernate. Regards, Erik. James Carman wrote: It would work the same way, since it grabs its stuff up-front. Behind the scenes, you use a LDM as the actual model. On Mon, Dec 8, 2008 at 1:56 PM, Daan van Etten [EMAIL PROTECTED] wrote: Hi James, How does this work with a Hibernate-managed object? Did you test it with Hibernate? -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: resource mapping and dot in url
Andy, If I read this correctly, this is not a security precaution, but a don't shoot yourself in the foot switch. (Note the 'yourself'.) So if set up the right way, you don't need this at all. You certainly don't need it for a Wicket site. You'll have to do some heavy URL rewriting (or Wicket patching) to get around this one. Regards, Erik. ak wrote: The problem is with security procedures set forth by IIS admin folks. Please follow this link for more nicer explanation. http://forums.iis.net/p/1150133/1872812.aspx Hope I am making myself clear. Any ideas ? Thanks, Andy -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: FileUploadField usage changed in 1.4 rc-1?
Yeah, I run into the same thing. Just pass FileUploadField an empty model: new ModelFileUpload() Regards, Erik. Bruno Cesar Borges schreef: Yes, you need to set a Model object into FileUploadField. :-) Bruno -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to load Wicket app in hosting provider
Maybe this helps. I've found that you need to start Tomcat from a directory that is writable for the user you are using (no idea why though). Besides the application log, you should also check Tomcat's log files. Good luck, Erik. moraleslos wrote: Hi, I'm running into an issue where my Wicket-based application will absolutely not load in the shared hosting environment. I'm trying out GoDaddy's Java Web hosting that uses Java 1.5 and Tomcat 5.0.27. I have this same setup on my box and deploying my Wicket 1.3.4-based application works -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Quickstart 1.4-rc1 exception
Hi, I want create a quickstart to demonstrate a potential bug in 1.4-rc1. However if I choose that release I get the following exception. [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/apache/commons/lang/StringUtils [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(ResourceManagerImpl.java:165) at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:594) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:116) Is this a known problem? I am doing something wrong? Maven version was 2.0.8, an upgrade to 2.0.9 did not help. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quickstart 1.4-rc1 exception
Tried it with several other Wicket releases 1.3.5 and 1.3.3 (Maven 2.0.9) but I get the same error. Regards, Erik. Erik van Oosten wrote: Hi, I want create a quickstart to demonstrate a potential bug in 1.4-rc1. However if I choose that release I get the following exception. [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/apache/commons/lang/StringUtils [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(ResourceManagerImpl.java:165) at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:594) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:116) Is this a known problem? I am doing something wrong? Maven version was 2.0.8, an upgrade to 2.0.9 did not help. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quickstart 1.4-rc1 exception
Sorry, I do not understand your suggestion. I am running in a new shell, there are no environment variable like CP set. The command I execute is: mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=nl.grons -DartifactId=homepagebug The only classpath I see is in the mvn script: exec $JAVACMD \ $MAVEN_OPTS \ -classpath ${M2_HOME}/boot/classworlds-*.jar \ -Dclassworlds.conf=${M2_HOME}/bin/m2.conf \ -Dmaven.home=${M2_HOME} \ ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS So how do I remove wicket-velocity from the classpath? Why is this related to wicket-velocity at all? Isn't this a package from velocity (not wicket-velocity)? Regards, Erik. Martijn Dashorst wrote: org.apache.velocity.app.VelocityEngine remove wicket-velocity from your classpath On Fri, Nov 14, 2008 at 4:05 PM, Erik van Oosten [EMAIL PROTECTED] wrote: Tried it with several other Wicket releases 1.3.5 and 1.3.3 (Maven 2.0.9) but I get the same error. Regards, Erik. Erik van Oosten wrote: Hi, I want create a quickstart to demonstrate a potential bug in 1.4-rc1. However if I choose that release I get the following exception. [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/apache/commons/lang/StringUtils [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(ResourceManagerImpl.java:165) at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:594) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:116) Is this a known problem? I am doing something wrong? Maven version was 2.0.8, an upgrade to 2.0.9 did not help. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quickstart 1.4-rc1 exception
It appears that my Maven repository (artifactory) is not functional anymore. Somehow its empty. I'll switch to central for a moment. Sorry for the hassle. Regards, Erik. Erik van Oosten wrote: Sorry, I do not understand your suggestion. I am running in a new shell, there are no environment variable like CP set. The command I execute is: mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=nl.grons -DartifactId=homepagebug The only classpath I see is in the mvn script: exec $JAVACMD \ $MAVEN_OPTS \ -classpath ${M2_HOME}/boot/classworlds-*.jar \ -Dclassworlds.conf=${M2_HOME}/bin/m2.conf \ -Dmaven.home=${M2_HOME} \ ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS So how do I remove wicket-velocity from the classpath? Why is this related to wicket-velocity at all? Isn't this a package from velocity (not wicket-velocity)? Regards, Erik. Martijn Dashorst wrote: org.apache.velocity.app.VelocityEngine remove wicket-velocity from your classpath On Fri, Nov 14, 2008 at 4:05 PM, Erik van Oosten [EMAIL PROTECTED] wrote: Tried it with several other Wicket releases 1.3.5 and 1.3.3 (Maven 2.0.9) but I get the same error. Regards, Erik. Erik van Oosten wrote: Hi, I want create a quickstart to demonstrate a potential bug in 1.4-rc1. However if I choose that release I get the following exception. [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/apache/commons/lang/StringUtils [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(ResourceManagerImpl.java:165) at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:594) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:116) Is this a known problem? I am doing something wrong? Maven version was 2.0.8, an upgrade to 2.0.9 did not help. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IDataProvider Implementation.
Not a good idea for large objects. A few days back I improved load time of a page from more then 40 sec to about 5 sec by replacing new Model(object) with a proper LoadableDetachableModel. Nevertheless, there is no reason to let the LoadableDetachableModel get the object if you already have it, just pass the object to the constructor! E.g. see first ctor below. public class LoadableMemberModel extends LoadableDetachableModelMember { @SpringBean private MemberService memberService; private long memberId; // // Constructor that has object has direct parameter // public LoadableMemberModel(Member member) { super(member); this.memberId = member.getId(); } * *public LoadableMemberModel(long memberId) { this.memberId = memberId; } protected Member load() { InjectorHolder.getInjector().inject(this); return memberService.getById(memberId); } } Regards, Erik. Graeme Knight wrote: Hey Jeremy, Thanks for the heads up - actually that's what I ended up doing this morning. Works like a charm! Cheers, Graeme. Jeremy Thomerson-5 wrote: In my apps, I bring them all in whenever the first call to iterator or size is done, and cache them until detach. It's a very reasonable pattern. Then in the model method, I basically do new Model(object) -- Jeremy Thomerson http://www.wickettraining.com On Tue, Nov 11, 2008 at 8:03 AM, Graeme Knight [EMAIL PROTECTED] wrote: Hi. From the examples I've seen the IDataProvider implementation of the iterator method brings back (for example) a list of keys from the database. The model method uses something like a LoadableDetachableModel to populate a model for use by the consumer using the list of keys previously retrieved. This seems like a lot of database hits to me. Is this simply because of the serialization/model mechanism? It seems to me that the iterator could/should bring back the data in one hit and then after use be detached. Is this common? Many thanks, Graeme. -- View this message in context: http://www.nabble.com/IDataProvider-Implementation.-tp20440141p20440141.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket prepends unnecessary ../ before href/src html element attributes
Anirban, Your resources still start with xxweb. If you want them to be served by wicket replace it with xx/web or something like that. If you want them to be served by something else (context xxweb?) prepend a /. Regards, Erik. Alan Romaniusc wrote: Could it be anything like this? http://www.nabble.com/Wicket-1.4-m3,-wicket-auth-roles-and-Context-Path-td20249711.html On Tue, Nov 11, 2008 at 9:51 AM, Anirban Basak [EMAIL PROTECTED] wrote: (replacing proprietary names/texts with xx) I'm running wicket web app with context 'xx'. As long I'm mounting pages with mountBookmarkablePage(..) or other URL encoding strategies (http://www.test-server.com/xx/web/page/partner) or mentioning /xx/* as the filter pattern, everything is running fine. But I was told not to append any word after the context (http://www.test-server.com/xx/). I tried removing URL encoding strategies, but wicket returning wrong relative urls by prepending unnecessary '../' to the resource uris like: link href=xxweb/css/styles.css rel=stylesheet type=text/css / link rel=stylesheet href=xxweb/css/dhtmlwindow.css type=text/css / script type=text/javascript src=xxweb/js/dhtmlwindow.js/script script type=text/javascript src=xxweb/js/partnerpages.js/script Wicket converting them into: link href=../xxweb/css/styles.css rel=stylesheet type=text/css / link rel=stylesheet href=../xxweb/css/dhtmlwindow.css type=text/css / script type=text/javascript src=../xxweb/js/dhtmlwindow.js/script script type=text/javascript src=../xxweb/js/partnerpages.js/script This makes the browser unable to fetch the resources as ../xxweb/css/styles.css == http://www.test-server.com/xxweb/css/styles.css; Structure of the WAR xx-snapshot.war |-- index.html (incase wicket not running) |-- xx-config.xml |-- WEB-INF |-- web.xml |-- lib |-- classes |-- xxweb |-- css |-- images |-- js Web.xml filter filter-namewicket.xx/filter-name filter-class org.apache.wicket.protocol.http.WicketFilter /filter-class init-param param-nameapplicationClassName/param-name param-valuecom.xx.xx.xxWebApplication/param-value /init-param /filter filter-mapping filter-namewicket.xx/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping Is this because of any wicket specific restriction or something else? Anirban -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question on PageMap
I am not sure what the default is set to Look at the constructors of DiskPageStore. My end goal is to try and squeeze more performance out of my application. If that is your goal you are on the wrong track. The disk store is a rotating logging based, mostly write-only store. Logging based as new content is written sequentially from start to end of the file, rotated because when the file is full it starts at byte 0 thereby overwriting old pages. It is mostly write-only as only when a user presses the back button data may be read back from the page store. Early removal of data will only mean more disk-head movements making it slower instead of faster. Regards, Erik. David R Robison wrote: I have been monitoring the size of the pm-null file stored in the Work directory from Tomcat. I assume that it is the serialized version of the PageMap. I have an application where, if I navigate from page A to page B and then back to page A, the pm-null file keeps growing. I understand that I can set the maximum number of pages saved in the PageMap but I am not sure what the default is set to. Also, if I am leaving a page with a form and do not intend to return to that page and submit its values, do I even need it in the PageMap? Is there a way I can remove my page from the PageMap when I know I am no longer going to need its values? My end goal is to try and squeeze more performance out of my application. I hope this is understandable... any thoughts? -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling exceptions during render
It won't. I think you have to dig deeper into the request rendering. Perhaps that overriding MarkupContainer#renderAll on all your Panels that have expected exceptions will help. But then again, exceptions are intended for controlling the non-expected. You should not use exceptions for normal page flow. In other words: just make sure that no exceptions are thrown. Regards, Erik. aditsu wrote: Ok, but how would that let me render the rest of the page? Alex Objelean wrote: There are more threads about this issue... In order to catch all runtime exception, you have to override default RequestCycle (newRequestCycle method) in your application class and override onRuntimeException method. Example: [CODE] @Override public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response) { @Override public Page onRuntimeException(final Page page, final RuntimeException e) { //do something return null; } } } [/CODE] Alex Objelean -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]