Re: [DISCUSS] Security Frameworks
[ X ] I use my own custom framework [ X ] I use Shiro For my current Wicket project we started out with Shiro as it promised to be easy to use. However, even though Shiro is feature rich, it still lacks the feature we needed to make it secure (1) and stable (2). We ended up using Shiro as a convenient library with all integration points with Wicket written ourselves. We also needed to extend LDAP integration to get roles/permissions and override Shiro's idea of configuration (it didn't match our way of getting properties files). (1) forget an annotation and your page is visible, we turned that around (2) the annotations are based on Strings, we like Enums better Kind regards, Erik. On 18-10-12 06:08, Jeremy Thomerson wrote: Our of curiosity: among the wider community: what security framework(s) do you use with with Wicket, and why? [ ] I use my own custom framework [ ] I use Shiro [ ] I use Spring Security [ ] I use WASP/Swarm [ ] Other (please specify) And don't forget the "why". -- 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: Efficiency of 1.5 MountMapper weighted/matching algorithm
> I realize it may not be a hotspot but, intuitively at least, it sounds like > your new caching improvement will help reduce CPU load. It should also reduce > the workload of the garbage collector by not having, in the above example, > 2800 objects allocated and then dereferenced with every page render. Don't trust intuition, measure. CPUs and garbage collectors behave different then you might think. Introducing caching means introducing thread collaboration. Any synchronisation on modern cpus quickly take more time then any business processing you can program. In addition, short lived object cost nothing. The gc can easily handle millions per second. In other words: don't add caching unless you are willing to measure the throughput gains (on the intended target systems). Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com Op 17 okt. 2011, om 22:06 heeft Chris Colman het volgende geschreven: >> We have already discussed this problem before. >> I agree that caching will improve the performance and I'll try to >> implement it soon. > > Cool! > >> Topicus' (Martijn's daily job) biggest application have ~ 700 mounted >> pages and this code is not a hotspot for them, that's why no one spend >> time on optimizing it so far. > > Wow that's big! If you had a variety of main and side bar menus on each page > that had links to say 40 or so Bookmarkable pages that would mean each page > render would result in building 40 weight/mount pair collections, each with > 700 entries - and then throwing them away after each bookmarkable page link > has been created. > > I realize it may not be a hotspot but, intuitively at least, it sounds like > your new caching improvement will help reduce CPU load. It should also reduce > the workload of the garbage collector by not having, in the above example, > 2800 objects allocated and then dereferenced with every page render. > >> >> On Sun, Oct 16, 2011 at 1:27 PM, Chris Colman >> wrote: >>> I'll try to get some time to build a test to get some timings. >>> >>>> -Original Message- >>>> From: Jeremy Thomerson [mailto:jer...@wickettraining.com] >>>> Sent: Sunday, 16 October 2011 11:55 AM >>>> To: users@wicket.apache.org >>>> Subject: Re: Efficiency of 1.5 MountMapper weighted/matching algorithm >>>> >>>> On Sat, Oct 15, 2011 at 8:28 PM, Chris Colman >>>> wrote: >>>> >>>>> Obviously this isn't a problem during debug with a single user but >>> when >>>>> 1000s of pages need to be rendered each minute the time spent >>> performing >>>> the >>>>> above operations may become significant. I haven't done any benchmark >>>>> testing but from experience, the frequenct allocation and compiling >>> of >>>>> collections and sorting can get CPU expensive and switching to a >>> caching >>>>> alternative usually leads to significant performance >>> improvements. >>>>> >>>>> >>>> It'd definitely be worth optimizing if we can prove it's a bottle-neck. >>>> But >>>> we try to avoid premature optimization. Can you put together some >>> numbers >>>> to see what kind of processing load we're talking about? I'd be >>> interested >>>> in seeing % of overall processing time under load. Something like >>> "with X >>>> clients browsing Y pages per minute, each page render took an average R >>>> milliseconds, and Z milliseconds of this was in creating link URLs". >>> Or >>>> something like that. >>>> >>>> -- >>>> Jeremy Thomerson >>>> http://wickettraining.com >>>> *Need a CMS for Wicket? Use Brix! http://brixcms.org* >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> >> >> -- >> Martin Grigorov >> jWeekend >> Training, Consulting, Development >> http://jWeekend.com >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org >
Re: introducing wicket:for attribute
Its not @literal that removes the linebreaks. If you combine it with it works. (No need to add as well.) *{@literal * * Name: * * * } * Regards, Erik. Op 13-07-11 17:55, Igor Vaynberg schreef: sweet, too bad @literal does not preserve linebreaks. what we really need is a CDATA like javadoc tag. -igor On Wed, Jul 13, 2011 at 4:12 AM, Erik van Oosten wrote: Amazing stuff! You can write straight html in javadoc with the {@literal} syntax. E.g.: * * Given markup like this: * *{@literal *Name: * } * * If the {@code name} component has its label set to 'First Name' the resulting output will be: *{@literal *First Name: * } Regards, Erik. Op 13-07-11 01:50, Igor Vaynberg wrote: based on some feedback i changed the class name of the inner span from "text" to "label-text" to reduce chance of css collisions -igor On Fri, Jul 8, 2011 at 9:22 PM, Igor Vaynberg wrote: just implemented the wicket:for attribute. check out the javadoc here: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java?view=markup&pathrev=1144589 1.4.x only for now, still needs to be forward-ported to trunk. feedback? -igor - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: introducing wicket:for attribute
Amazing stuff! You can write straight html in javadoc with the {@literal} syntax. E.g.: * * Given markup like this: * *{@literal *Name: * } * * If the {@code name} component has its label set to 'First Name' the resulting output will be: *{@literal *First Name: * } Regards, Erik. Op 13-07-11 01:50, Igor Vaynberg wrote: based on some feedback i changed the class name of the inner span from "text" to "label-text" to reduce chance of css collisions -igor On Fri, Jul 8, 2011 at 9:22 PM, Igor Vaynberg wrote: just implemented the wicket:for attribute. check out the javadoc here: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java?view=markup&pathrev=1144589 1.4.x only for now, still needs to be forward-ported to trunk. feedback? -igor -- 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: internationalizing page title
You will need the following in your application's init: getMarkupSettings().setStripWicketTags(true); Regards, Erik. Op 27-02-11 18:26, Josh Kamau schreef: Anton, This worked. Wicket Demo regards Josh. On Sun, Feb 27, 2011 at 7:13 PM, Anton Bessonovwrote: Hello Josh, have you found any solution? Best regards, Anton Am trying to internationalize the page title. The below snipplet doesnt seem to work. Where am i going wrong? regards Josh -- 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: URL generation
Hi Uwe, I sometimes use absolute URLs in a project. For code see https://issues.apache.org/jira/browse/WICKET-1974 Regards, Erik. Op 04-02-11 16:46, Uwe Schäfer schreef: Hi i am working on a wicket app which is to be included in some 3rd party page. the page somewhat uses a thing like $.load to include the wicket-generated code. To sum up, wicket has no idea that its created page will be sliced into pieces and included in some other page. any url wicket creates, is relative to the generated page, like: <http://localhost:8080/home#>"../../../?wicket:interface=:0:wrapper:form::IFormSubmitListener::" for posting a form. is there a way to make wicket create absolute URLs instead? cu uwe -- 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: UrlRewrite rule and Wicket
Hi Krzysztof, Sorry to hear that, I must admit I never thought of testing this with forms. I just assumed that the form would have a wicket generated URL and that from that point on it would work the normal way. Regards, Erik. Op 02-12-10 16:32, Krzysztof Kowalczyk wrote: Thank you Erik, the idea is nice, but it does not work ;) I wanted to implement my own ~ Root Mounting Strategy just when I've got your email. The idea with overriding getRequestPath sounds good, I was afraid that I will need to implement my own RequestCycle with custom logic replacing "path.startWith(mountPath())" part. Unfortunately your solution doesn't seem to play well with forms. When using the RootWebRequestProcessor pages using HybridUrlCodingStrategy work on first get request, but after button submit they are redirected to "?wicket:..." page and the state of the page is lost (all values of fields, no validation errors). I have no idea why it works like that and does it breaks other strategies. ps. I had to add / to the POM to make the example run properly with jetty:run. The default configuration mount the app on /wicket-rootmount-demo so most of the links does not work. Regards, Krzysztof Kowalczyk On Wed, Dec 1, 2010 at 1:59 PM, Erik van Oosten wrote: You can try the approach from http://blog.jteam.nl/2010/02/24/wicket-root-mounts/ This allows you to install a URL mounter that implements the following interface: interface RootMountedUrlCodingStrategy { boolean accepts(String rawPath); } Regards, Erik. Op 30-11-10 11:21, Krzysztof Kowalczyk wrote: Hi, We have existing urls in a form: /long,and,complex,title,id/new_opinion /long,and,complex,title,id/something or sometimes /long,title/id/new_opinion The links like "/long,and,complex,title" are managed by fast and scalable view, and are stateless. Now we are using Wicket in the same war. It is mounted to "/cms". We are trying to replace forms, that are pure evil in the first technology with wicket based forms. But we need to keep the links untouched. So I created UrlRewrite (http://www.tuckey.org/urlrewrite/) rules: ^/(.*),(\d+)/new_opinion$ /cms/new_opinion/id/$2/url/$1 ^/(\?wicket.*) /cms/$1 ... I have a wicket page - that is mounted on "/new_opinion" with enhanced HybridUrlCodingStrategy with: - redirectOnBookmarkableRequest = false First rule forwards the request to proper place. Wicket gets the correct requestUri and all the stuff. But the rule does not work if we have redirectOnBookmarkableRequest = true because Wicket constructs wrong urls in ServletWebRequest.getRelativePathPrefixToWicketHandler : if (!Strings.isEmpty(forwardUrl)) { // If this is an error page, this will be /mount or /?wicket:foo relativeUrl = forwardUrl.substring(1); relativeUrl = relativeUrl.substring(filterPath.length()); } before this fragment Wicket has correct link, after this we get: "g,and,complex,title,id/new_opinion", or errors (sometimes the link is shorter and I get array index out of bounds). If method does not throw exception it returns wrong number of ../ . Unfortunately redirectOnBookmarkableRequest = false does not solve the problem as the second rule catches Wicket that are redirected if they hit bookmarkable page. So this fragment need to be fixed in order to have working bookmarkable links with UrlRewrite. My temporary workaround is custom delegating WebRequest with small hack: public String getRelativePathPrefixToWicketHandler() { HttpServletRequest httpRequest = getHttpServletRequest(); String forwardUrl = (String)httpRequest.getAttribute("javax.servlet.forward.servlet_path"); final String filterPath = (String)httpRequest.getAttribute(WicketFilter.FILTER_PATH_ATTR); if (!Strings.isEmpty(forwardUrl)) { int count = forwardUrl.split("/").length; String string = ""; for (int i = 1; i<count; i++) { string += "../"; } return string + filterPath; }else { return wrappedReqest.getRelativePathPrefixToWicketHandler(); } } I guess it will not work in all cases though... If there is a different way of doing url rewriting? If not, I consider it a bug in Wicket. Regards, Krzysztof Kowalczyk -- Sent from my SMTP compliant software 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: [OT] Need Feedback from WicketForge users (IDEA plugin).
Hi Minas, Providing code completion for component id's would be great! In particular in the java code, slightly less so in markup. Warnings for unknown component id's in java code would also be a very nice feature! It would probably be useful to be able to suppress the warning with a comment or annotation. Warnings in the markup are less useful as I often create components that infer their component id at run-time from another component. I'd hate to have warning suppressing comments in the markup. Regards, Erik. PS. I don't find this OT at all! Anything that helps (many) Wicket developers, should be welcome on this list. Op 13-12-10 02:36, Minas Manthos wrote: Hi I plan to make a core change to WicketForge plugin and need some user feedback. So if you like please follow up to http://groups.google.com/group/wicketforge/t/f5b0f57d184d6f0f Since this is not directly wicket related, please do not reply here. Thanks Minas. -- Sent from my SMTP compliant software 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 question
Simply put them there with a Label. Regards, Erik. Op 01-12-10 18:26, 96silvia write: the problem is the hidden input values are coming from a wicket session. so if I use a non wicket form how do I get the values from a wicket session to the non wicket 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: UrlRewrite rule and Wicket
You can try the approach from http://blog.jteam.nl/2010/02/24/wicket-root-mounts/ This allows you to install a URL mounter that implements the following interface: interface RootMountedUrlCodingStrategy { boolean accepts(String rawPath); } Regards, Erik. Op 30-11-10 11:21, Krzysztof Kowalczyk wrote: Hi, We have existing urls in a form: /long,and,complex,title,id/new_opinion /long,and,complex,title,id/something or sometimes /long,title/id/new_opinion The links like "/long,and,complex,title" are managed by fast and scalable view, and are stateless. Now we are using Wicket in the same war. It is mounted to "/cms". We are trying to replace forms, that are pure evil in the first technology with wicket based forms. But we need to keep the links untouched. So I created UrlRewrite (http://www.tuckey.org/urlrewrite/) rules: ^/(.*),(\d+)/new_opinion$ /cms/new_opinion/id/$2/url/$1 ^/(\?wicket.*) /cms/$1 ... I have a wicket page - that is mounted on "/new_opinion" with enhanced HybridUrlCodingStrategy with: - redirectOnBookmarkableRequest = false First rule forwards the request to proper place. Wicket gets the correct requestUri and all the stuff. But the rule does not work if we have redirectOnBookmarkableRequest = true because Wicket constructs wrong urls in ServletWebRequest.getRelativePathPrefixToWicketHandler : if (!Strings.isEmpty(forwardUrl)) { // If this is an error page, this will be /mount or /?wicket:foo relativeUrl = forwardUrl.substring(1); relativeUrl = relativeUrl.substring(filterPath.length()); } before this fragment Wicket has correct link, after this we get: "g,and,complex,title,id/new_opinion", or errors (sometimes the link is shorter and I get array index out of bounds). If method does not throw exception it returns wrong number of ../ . Unfortunately redirectOnBookmarkableRequest = false does not solve the problem as the second rule catches Wicket that are redirected if they hit bookmarkable page. So this fragment need to be fixed in order to have working bookmarkable links with UrlRewrite. My temporary workaround is custom delegating WebRequest with small hack: public String getRelativePathPrefixToWicketHandler() { HttpServletRequest httpRequest = getHttpServletRequest(); String forwardUrl = (String)httpRequest.getAttribute("javax.servlet.forward.servlet_path"); final String filterPath = (String)httpRequest.getAttribute(WicketFilter.FILTER_PATH_ATTR); if (!Strings.isEmpty(forwardUrl)) { int count = forwardUrl.split("/").length; String string = ""; for (int i = 1; i< count; i++) { string += "../"; } return string + filterPath; }else { return wrappedReqest.getRelativePathPrefixToWicketHandler(); } } I guess it will not work in all cases though... If there is a different way of doing url rewriting? If not, I consider it a bug in Wicket. Regards, Krzysztof Kowalczyk - 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: StackOverflowError
I have seen an application (not mine!) fail horribly and costly on the second example. The problem with getting an object from the session and passing the reference to a (Compound)PropertyModel is that the natural assumption, the session object is updated too, is wrong. So this is exactly the same problem as keeping a reference to the session itself, only now restricted to less data. Regards, Erik. Op 22-11-10 20:51, Igor Vaynberg schreef: no. the example below doesnt hit any pitfalls because it doesnt reference the session itself. as long as objects retrieved from session do not contain references back to session he is ok. however, declaring Session instance as final is not a good idea because it makes it easy to reference it in anonymous classes. -igor On Mon, Nov 22, 2010 at 11:49 AM, Erik van Oosten wrote: Yes, both are very wrong. Pitfalls are in earlier messages in this thread. On 22-11-10 16:36, mzem...@osc.state.ny.us wrote: By "keep a reference to the session in their class" do you mean something like this? Are there any pitfalls to doing this? final Session session = getSession(); add(new Label("userNameLabel", new Model(session.getUser ().getUserName(; How about this? final UserDTO dto = session.getUser(); CompoundPropertyModel cpm = new CompoundPropertyModel(dto); -- Sent from my SMTP compliant software 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: StackOverflowError
Yes, both are very wrong. Pitfalls are in earlier messages in this thread. On 22-11-10 16:36, mzem...@osc.state.ny.us wrote: By "keep a reference to the session in their class" do you mean something like this? Are there any pitfalls to doing this? final Session session = getSession(); add(new Label("userNameLabel", new Model(session.getUser ().getUserName(; How about this? final UserDTO dto = session.getUser(); CompoundPropertyModel cpm = new CompoundPropertyModel(dto); -- Sent from my SMTP compliant software 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: StackOverflowError
Pedro's solution allows you to turn serialisation on and off for a given thread so you won't mess with serialisation by other users (such as the servlet container). Clever. The only missing piece is an override of the default serialisation to temporarily flip the switch. Still, in core it would be much more useful. Users that can configure this kind of tricks don't tend to make the mistake of referring a session anyway. Regards, Erik. Op 18-11-10 18:31, Martijn Dashorst schreef: Sessions are meant to be serialized. That's the way they travel through a cluster, or how sessions are preserved during a server restart. I'd like to not break that by adding this functionality. Martijn On Thu, Nov 18, 2010 at 6:19 PM, Pedro Santos wrote: Ok, I still don't know how interest is to have it in the core. You can do it at an session extension, like: 1- providing some API MySession extends Session{ private ThreadLocal sessionSerializationRestrictor = new ThreadLocal(); public void inhibitSerializationOnThread(Object restrictor){ sessionSerializationRestrictor.set(restrictor); } public void removeSerializationRestriction(){ sessionSerializationRestrictor.set(null);} private void writeObject(java.io.ObjectOutputStream out) throws IOException { if (sessionSerializationRestrictor.get() != null) { throw some exception explaining that the restrictor do not allow this serialization; } else { out.defaultWriteObject(); } }} 2- providing some Page.IPageSerializer that calls inhibitSerializationOnThread and removeSerializationRestriction before and after the page serialization. On Thu, Nov 18, 2010 at 6:48 AM, Erik van Oostenwrote: That won't work in general as some servlet containers (like tomcat) serialise the session to disk when its idle for too long. What I meant is that when the page is serialised, it _must_ not contain a reference to session. but than some other developers can complain because they are deliberated serialializing some session. They won't complain when the exception text specifies why this is wrong. See Martijn's e-mail in this discussion thread for why it is wrong. Regards, Erik. Op 17-11-10 21:05, Pedro Santos schreef: I think it is to specific. You can override the Session on your app an catch this situation like: private void writeObject(java.io.ObjectOutputStream out) throws IOException { if (Application.get() != null&& Application.get().getConfigurationType().equals(Application.DEPLOYMENT)) { log.info("Session is being serialized in the development environment, which is an not a desirable behavior."); }} but than some other developers can complain because they are deliberated serialializing some session. On Wed, Nov 17, 2010 at 4:49 PM, Erik van Oosten wrote: Shouldn't serialization fail when it references session/application? Perhaps only in development mode. Regards, Erik. Op 16-11-10 19:03, Igor Vaynberg schreef: added a log warning to property models when they reference session. -- Sent from my SMTP compliant software 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: StackOverflowError
That won't work in general as some servlet containers (like tomcat) serialise the session to disk when its idle for too long. What I meant is that when the page is serialised, it _must_ not contain a reference to session. but than some other developers can complain because they are deliberated serialializing some session. They won't complain when the exception text specifies why this is wrong. See Martijn's e-mail in this discussion thread for why it is wrong. Regards, Erik. Op 17-11-10 21:05, Pedro Santos schreef: I think it is to specific. You can override the Session on your app an catch this situation like: private void writeObject(java.io.ObjectOutputStream out) throws IOException { if (Application.get() != null&& Application.get().getConfigurationType().equals(Application.DEPLOYMENT)) { log.info("Session is being serialized in the development environment, which is an not a desirable behavior."); }} but than some other developers can complain because they are deliberated serialializing some session. On Wed, Nov 17, 2010 at 4:49 PM, Erik van Oostenwrote: Shouldn't serialization fail when it references session/application? Perhaps only in development mode. Regards, Erik. Op 16-11-10 19:03, Igor Vaynberg schreef: added a log warning to property models when they reference session. -- Sent from my SMTP compliant software 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: NonCachingImage for CSS?
Images referred to from css are resolved relative to the css file. So, just put the images next to the css file and use no path in the image url: background: url('home_willkommen.jpg') left top no-repeat; Regards, Erik. Op 15-11-10 16:59, Benjamin Lorenz schreef: Hello, I am including dynamic images into my webapp, using code like this: add(new NonCachingImage("image", new AbstractReadOnlyModel() { @Override public Object getObject() { return new ImageResource(verify.getImage(), "jpg"); } })); Now, I also have a background image, referenced from a .css file, which I want to be served dynamically. (How) can I do it? I was thinking of writing my own image servlet that gets referenced in the css, like: #welcomeMessage a { background: url('/servlet/images/welcome') left top no-repeat; display: block; ... instead of #welcomeMessage a { background: url('../images/home_willkommen.jpg') left top no-repeat; display: block; ... But it would be interesting if there's also a wicket way of doing it. Thanks! Benjamin - 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: StackOverflowError
Shouldn't serialization fail when it references session/application? Perhaps only in development mode. Regards, Erik. Op 16-11-10 19:03, Igor Vaynberg schreef: added a log warning to property models when they reference session. -igor On Tue, Nov 16, 2010 at 9:46 AM, Douglas Ferguson wrote: We found it.. Finally!!! There was a property model that was using the session as the model object. It would be cool if PropertyModel, etc would check for this and blow up on construction. i.e. not allow Page, Session, Application as the model object... -- 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: could not serialize the page java.lang.OutOfMemoryError: PermGen space
fachhoch, Please investigate whether any of your components can have references to something too big. Regards, Erik. Op 13-10-10 16:25, fachhoch schreef: could not serialize the pagejava.lang.OutOfMemoryError: PermGen space , I got this error, it happens once in a while , its hard to reproduce, please tell me can wicket cause memory errors for any reason ? I am using 1.4.8 -- Sent from my SMTP compliant software 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: Modular XHTML DTD for Wicket?
Hello Ichiro, Bring it on! Find all xhtml tags here: https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html. Here you will also find a link to the current DTDs. Regards, Erik. Op 28-09-10 04:53, Ichiro Furusato schreef: I brought this up previously under "Wicket pages are invalid XHTML" on Thu, 16 Sep 2010 13:11:06 +1200 but the conversation got sidetracked by a solution to a question I'd asked without addressing an offer I'd made. Would anyone be interested in replacing the misnamed and incomplete XHTML DTD used by the Wicket project with a modular XHTML DTD that had its own Wicket module? This could be used to validate Wicket-ised documents. I'm versed in building modular DTDs using the W3C toolkit. (I note WICKET-693 exists) and can also flatten the DTD to a single file using a tool I have. I'd be willing to supply that DTD if someone could provide documentation on the extant wicket elements and attributes, and where in the document model they are permitted. If this is something properly directed at the Wicket dev list let me know and I'll resend it there (I'm not currently a member of that list). Or if this isn't a priority for the project (it may not be if well-formed XML is sufficient during dev) I'll drop the issue. Thanks, Ichiro - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Sent from my SMTP compliant software 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: Setting Checked Boxes in CheckGroup
See http://wicket.apache.org/start/quickstart.html Use this to create a small application that exhibits the bug. Regards, Erik. Op 23-09-10 19:26, Shelli Orton schreef: What do you mean by "quickstart"? Shelli -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Thursday, September 23, 2010 10:57 AM To: users@wicket.apache.org Subject: Re: Setting Checked Boxes in CheckGroup im going to guess something is wrong with your model. hard to tell without a quickstart. -igor -- 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: announcing Granite - a Wicket-Scala-DB4O web application stack
I have looked at the example and it looks very promising. However, if you want more attention there should at the absolute minimum be a bunch of links somewhere that give starting points for someone to understand the project. E.g. links to important classes, important examples. Either an architecture overview or a small programming guide would be great too of course :) Regards, Erik. Op 22-09-10 03:41, Sam Stainsby schreef: Today we officially announced our project to provide a Wicket-DB4O-Scala web application stack: http://sustainablesoftware.com.au/blog/?p=77 "I’m pleased to announce a new web application framework, called Granite, and an associated set of reusable libraries, called Uniscala. Please note that this is a work in progress: we are not announcing a release yet, or even a beta. A number people have started asking about the project, and so I felt it would be helpful to let the wider world know what is going on." "Granite is a lightweight framework for the rapid development of web applications. It is based on the very cool and richly featured Apache Wicket web framework. Granite uses an embedded object database that avoids the need for SQL or Object-Relational Mappers (ORMs), and, in the Wicket tradition, is proud of, if not smug about, its distinct lack of external XML configuration files." - 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: A bug in CryptedUrlWebRequestCodingStrategy
Bjorn, Please open a Jira issue so that the Wicket core team can track this issue. Regards, Erik. Op 15-09-10 11:24, Bjorn S schreef: Wicket version: 1.4.9 (rolled back due to AJAX problems in later release) I've detected some odd behaviour with CryptedUrlWebRequestCodingStrategy, specifically CryptedUrlWebRequestCodingStrategy.DecodedUrlRequest; When using a QueryStringStrategy for mounting a page and passing certain specific strings I was getting them back with characters missing. It appears that CryptedUrlWebRequestCodingStrategy performs double-decoding. We have a search system which uses + as a means of denoting requirements, this is what happened; When entering a search string like "car +red" it was correctly encoded to "car+%2Bred" and passed along. When decoding I saw that this became "car +red" and then was decoded again to "car red" [note double space]. I fixed this by extending CryptedUrlWebRequestCodingStrategy, overloading the decode method and implementing my own copy of DecodedUrlRequest where I removed the following line from the constructor; decodedParamReplacement = WicketURLDecoder.QUERY_INSTANCE.decode(decodedParamReplacement); This seems to have fixed our problem though I won't guarantee that it hasn't introduced new ones. Hope this can get a better resolution. Regards, Bjørn Soldal -- Sent from my SMTP compliant software 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: Expiring pages in form submit and onAfterRender...
Did you already look at StatelessForm? Regards, Erik. Op 26-07-10 23:14, Erik Brakkee wrote: Hi, I am experimenting a bit with page expiry. One solution that works is to remove the page from the pagemap in the submit of a form. However, removing the page from the pagemap in the onAfterRender() of a page does not seem to work. In fact, I see the same page id and version being rendered every time. Is this the way it should be? Is there another generic callback in a wicket page in which I could remove the page from the pagemap to expire it? What makes the form's onSubmit() special? Alternatively, I am considering to use a strategy whereby I set an expired flag on form submit and then in the onBeforeRender() use setResponsePage() to delegate to a specific page providing also a specific message. That would allow total control on form submit. Would that strategy work? Cheers Erik -- Sent from my SMTP compliant software 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: colocating wicket with servlets...
Hi Erik, Non-bookmarkable links either start with /resources or take the form /?wicket... You could indeed manage that by creating your own RequestCodingStrategy, but having done so a couple of times, I would like to warn you not to tweak too much. In Wicket 1.5 it is probably going to be a lot easier. Regards, Erik. Op 26-07-10 20:37, Erik Brakkee wrote: I would like to colocate a wicket application with a servlet. What I want is for the servlet to have access to the wicket session. Looking at the code I see that Session.get() uses thread-specific storage, so I want the wicket filter to intercept all requests. Next, I want to make sure that requests for the servlet are forwarded to the servlet and not handled by wicket. The wicket filter provides one way of doing this by specifying a number of ignored paths. But, how do I now which paths I can safely ignore? I can create mounts for all bookmarkable pages but how can I control the paths of non-bookmarkable URLs. Should I create a separate request coding strategy decorator (like CryptedUrlWebRequestCodingStrategy) or is there an easier way? Cheers 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: new feature in trunk and branch: Component#onConfigure()
Excellent! Op 21-07-10 07:05, Igor Vaynberg wrote: another new callback added to 1.4/trunk that is aimed at making life easier when managing component states such as visibility, enabled, etc. -- 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: new feature in trunk and branch: Component#onInitialize()
I always wonder about the order and worry what could go wrong. A small sentence in the javadoc would stop that. E.g. something simple like: * * Markup containers are initialized prior to their children. * would be marvelous. Regards, Erik. Op 13-07-10 17:16, Igor Vaynberg wrote: On Tue, Jul 13, 2010 at 1:05 AM, vladimir.kovalyuk wrote: The sources shows that the markup container is initialized prior to children initialization. As expected. im pretty sure that is a safe assumption to make, not sure if its javadoc worthy. -igor I used to double check due to onBeforeRender() method. Should javadoc mention aforementioned? The great news is that onBeforeRender() will never be used for component initialization just for rendering event. Looking forward for 1.4.10 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/new-feature-in-trunk-and-branch-Component-onInitialize-tp2286924p2287133.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Sent from my SMTP compliant software 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: Single inheritence in parts
Indeed, multiple inheritance is not the correct term in this case. The point is that the parent class' markup may contain multiple places to place components from sub-classes. Regards, Erik. Op 06-07-10 18:03, Arjun Dhar wrote: On a last note; ..am confusedmultiple inheritance generally means MANY PARENT, ONE CHILD (child inherits from multiple parents). Here there is only ONE PARENT MARKUP required and ONE CHILD markup. Maybe my perspective is not right. I'll search more material on this and educate myself. -- 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: Single inheritence in parts
I must have been listening to the wrong people then. Sorry to continue any false hopes. Too bad; there is only a small sweet spot for markup inheritance, but with this extension it would be very sweet indeed. Thanks for the link Jeremy. Regards, Erik. On 06-07-10 22:08, Jeremy Thomerson wrote: It has not been "promised". It has been "disCUSSed" at length. Here's the most relevant thread I remember. Look at some of the very valid points of why it would create problems from Johan / Igor. Personally, I'm against it. You can *very easily* accomplish the same thing with panels, without a whole mess of other issues. http://bit.ly/awiK6L -- 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: non-bookmarkable pages with pageparameters?
use the method setResponsePage(Class, PageParameters) Erik. Op 06-07-10 16:24, Muro Copenhagen schreef: Hi Erik, I tried that with no luck... How would i do this: setResponsePage(new DeliverySecure(deliveryInfo)), and at the same time send pageparameters to the same page? Best Regards Muro -- Sent from my SMTP compliant software 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: non-bookmarkable pages with pageparameters?
Hi Muro, Mount your page with a HybridUrlCodingStrategy. For example the MixedParamHybridUrlCodingStrategy. Regards, Erik. Op 06-07-10 15:30, Muro Copenhagen wrote: Hi I have a page that is session based(nonbookmarkable) but at the same time i want to make sure a request parameter is shown in the url... How would i achieve that ? This is what i am trying to achieve, with example from my code: My page code constructors: public DeliverySecure() { this(new DeliveryInfo()); } public DeliverySecure(DeliveryInfo deliveryInfo) { ... } This page is called to separete ways: 1 - setResponsePage(DeliverySecure.class, new PageParameters("secure=on")); 2- setResponsePage(new DeliverySecure(deliveryInfo)); When i call the DeliverySecure page with approach 1, i get a url with the request parameter: ...&secure=on, surely because it treats the page as bookmarkable. But with the 2. approach i get a url like: ...wicket:interface=:7 Can i somehow force wicket to add the browser parameter&secure=on, when loading the nonbookmarkable page with approach 2 ? If so how would i achieve that, even though i want load the page with the session based deliveryInfo object i have...? Best Regards Muro -- Sent from my SMTP compliant software 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: Single inheritence in parts
Yes, this has been promised many times. And I am looking forward to it :) Regards, Erik. Op 06-07-10 07:53, Ernesto Reinaldo Barreiro wrote: Hi Jeremy, Wasn't this on the which list for 1.5? [1] and [2]? Cheers, Ernesto 1-https://cwiki.apache.org/WICKET/wicket-15-wish-list.html#Wicket1.5WishList-multiplychild%252Fextendinheritance 2-https://issues.apache.org/jira/browse/WICKET-1134 -- Sent from my SMTP compliant software 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 Sessions and Load Balancing
Steven, Have you tried to enforce creation of a session on the home page? A WebSession.get().bind() in the homepage will do the trick. This only makes a difference when your homepage is stateless. Regards, Erik. 2010/7/1 Steven Haines My guess is that when the homepage is loaded that Wicket provides a new jsessionid (I sometimes see it coming in the submission url) but then the user is directed to another server on the next request, and because the user does not yet have a JSESSIONID cookie, but does have the jsessionid in the URL, the Wicket instance that receives the request searches and cannot find the session id and marks the page as expired. The next request then populates the browser's cookie and the sticky session works.This is just a theory, but it would explain the behavior. -- Sent from my SMTP compliant software 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: Getting started with Scala, Spring, Hibernate & Wicket
The latest and greatest in the domain-driven world would be CQRS where the UI code needs two types of dependencies: the command bus and a repository. No more need of a 'services' layer. I adore CQRS because it provides a simple and clear view of what code to put where. Though the amount of code stays the same, it will be simpler. Regards, Erik. PS. Kent, thanks for taking the time to write this tutorial. Op 19-06-10 17:39, James Carman wrote: On Sat, Jun 19, 2010 at 10:10 AM, Kent Tong wrote: I agree that if the service is simply delegating to the DAO without adding anything, then it is probably be a good idea to merge them. However, this sample application is meant to demonstrate how to do it in a general case where the service does more than simple delegation. If you use a more domain-driven approach, you don't need services as much. Your entities can have the repositories (daos) injected into them via Spring's @Configurable/@Autowire support. So, you can move a lot of your business logic into the entities themselves. Now, sometimes you just have to use services because there's just no good way to do some things, but for a lot of the usecases you'll encounter, you don't. - 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: ResourceStreamLocator and mvn resource:resource copying resources in the right directory
Hi Bernard, We are using absolute URLs in one application (http://tipspot.com) that does not use the wicket ajax library, only javascript (based on jquery) written by the frontend developer. One of the things we do there is filling popups through ajax requests. As most of that information is completely stateless, we use a wicket page to produce the html fragments. The URL depth and path of the original page (containing the popup), and the page that is pasted into the popup, almost never matches. This is a problem for linking to other pages. I found it easy to make this problem go away by making all URLs absolute. I did not look at RelativePathPrefixHandler as I was unaware of its existence. I am also not certain that any relative schema would be able to solve the problem cleanly/easily. Secondly having absolute paths is a non-issue for this application. Regards, Erik. Op 19-06-10 20:27, b...@actrix.gen.nz wrote: Thanks Erik. Why are you using absolute URLS? Are you using absolute URLs to support editing in the web directory, with a directory structure the same as the java package structure, without breaking images? Then it would look like you have found a different solution for the same problem. Interesting. Both solutions require only small changes. Have you tried to patch RelativePathPrefixHandler? With that change, you would no longer be restricted to absolute paths. Regards, Bernard On Sat, 19 Jun 2010 14:15:44 +0200, you wrote: Hi, https://issues.apache.org/jira/browse/WICKET-1974 describes a way to make all URLs absolute. Unfortunately the patch attached to the issue is still not applied so you'll have to build wicket yourself. Regards, Erik. Op 18-06-10 21:56, b...@actrix.gen.nz schreef: Hi Fernando, obviously quite a few including yourself are separating markup from Java packages to make it accessable to HTML developers. How do you cope with the fact that Wicket markup, when rendered in any folder without flattening the package structure, gets broken images? That is what I am trying to address with "Cannot substitute RelativePathPrefixHandler" https://issues.apache.org/jira/browse/WICKET-2881 The three lines of Java code in RelativePathPrefixHandler are solving this problem. int lastIndex = attrValue.lastIndexOf("../"); if (lastIndex>= 0){ attrValue = attrValue.substring(lastIndex + 3); } Regards, Bernard - 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: ListView + dynamic rows: always remove last row...
Try to use the RemoveLink that is available as inner class of ListView. Regards, Erik. Op 18-06-10 18:29, jOki wrote: Hi!! Im trying to implement a dynamic Form, where you can add textfields and remove as you want. The add button works fine, but the remove button always remove the last testfield and not the selected field. For example: Textfield1 add remove Textfield2 add remove Textfield3 add remove click on remove (row textfield2) and Textfield3 is removed. It should remove Textfield2, doesnt it? Some code: public class KeywordObject implements Serializable { private static final long serialVersionUID = 1L; private String keyword; public void setKeyword(String keyword) { this.keyword = keyword; } public String getKeyword() { return this.keyword; } } And in the form... List keyList = new ArrayList(); keyList.add(new KeywordObject()); final ListView keywordView = new ListView("keywordView", keyList) { @Override protected void populateItem(final ListItem item) { KeywordObject model = (KeywordObject) item.getModelObject(); item.add(new TextField("keyword", new PropertyModel(model, "keyword"))); // keyword add link Link addKeyword = new Link("addKeyword", item.getModel()) { @Override public void onClick() { keyList.add(new KeywordObject()); } }; // keyword remove link Link removeKeyword = new Link("removeKeyword", item.getModel()) { @Override public void onClick() { KeywordObject selected = (KeywordObject) getModelObject(); keyList.remove(selected); } }; item.add(addKeyword); item.add(removeKeyword); } }; add(keywordView); keywordView.setReuseItems(true); Im getting crazy about that... Thanks. -- 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: ResourceStreamLocator and mvn resource:resource copying resources in the right directory
Hi, https://issues.apache.org/jira/browse/WICKET-1974 describes a way to make all URLs absolute. Unfortunately the patch attached to the issue is still not applied so you'll have to build wicket yourself. Regards, Erik. Op 18-06-10 21:56, b...@actrix.gen.nz schreef: Hi Fernando, obviously quite a few including yourself are separating markup from Java packages to make it accessable to HTML developers. How do you cope with the fact that Wicket markup, when rendered in any folder without flattening the package structure, gets broken images? That is what I am trying to address with "Cannot substitute RelativePathPrefixHandler" https://issues.apache.org/jira/browse/WICKET-2881 The three lines of Java code in RelativePathPrefixHandler are solving this problem. int lastIndex = attrValue.lastIndexOf("../"); if (lastIndex>= 0){ attrValue = attrValue.substring(lastIndex + 3); } Regards, Bernard -- 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: get resource translation with specific locale
Hi Marieke, So you are using getString? In that case my suggestion won't work. You could still add an invisible component to the form, but that's about as hairy as temporarily setting the session locale. Erik. Op 09-06-10 14:24, Marieke Vandamme schreef: Hi Erik, problem is that I generate the emailtext in the onSubmit of my form. The data that is printed in my form, and visible to the webuser, needs to be in the locale from the session. So I can't override the getLocale from the Form. Or am I missing something? Thanks, Marieke -- 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: get resource translation with specific locale
Hi Marieke, To force a component to be rendered in another locale (in this case your e-mail), you can override getLocale() from the top-most component that is used to render the e-mail. Regards, Erik. On Tue, Jun 8, 2010 at 3:30 AM, Marieke Vandamme wrote: Hello, Is it possible to use the getString or some other kind of function to get translation not in the language of the session, but one that is different? We need this to send email, but this email is to our internal employees, so needs to be in language other than the one that is requesting something. Now I save the locale from the session into a temp-locale variable, and change the locale from the session to the email-language. Than I can use the getString function. Afterwards I put the temp-locale variable back into the session. I don't find this a perfect solution, so I have you guys have some better alternative. Thanks for any help ! Marieke -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-resource-translation-with-specific-locale-tp2247162p2247162.html -- 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: Clear URL parameters
If the user only browsed stateless pages up to that point there is no http session, but only a new wicket session for each request. You can call WebSession.bind() to force the creation of a http session. Regards, Erik. Op 24-05-10 17:51, andres.santana wrote: Does redirect affects a Custom Session? I mean using setRedirect(true) works but something I set in the WebSession is lost. - -- arsh -- 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: root context, IE, home page is not found
I don't get it. I tested this fix with Tomcat and several IE versions. And "." just worked then whereas "./" did not. Regards, Erik. Op 04-05-10 14:56, Martin Grotzke wrote: Hi, we also just experienced issues with this, and the fix of WICKET-2600 still causes problems (as already described in this post): For the redirect to "." tomcat produces a Location header like http://www.example.org/. (notice the trailing dot), which causes IE to do request exactly this url, for which no page ist mounted. Therefore the 404 page not found. Is there a special reason why "." was chosen here? What do you think about an alternative handling like this: if (redirectUrl.startsWith("./")) { if (redirectUrl.length() == 2)) { WebRequest request = (WebRequest) requestCycle.getRequest(); String contextPath = request.getHttpServletRequest().getContextPath(); // e.g. "/myapp" String servletPath = request.getServletPath(); // e.g. "/" redirectUrl = contextPath + servletPath; } else { redirectUrl.substring( 2 ) } } Cheers, Martin On Sat, 2010-05-01 at 10:47 +0200, Erik van Oosten wrote: This might be related to https://issues.apache.org/jira/browse/WICKET-2600? Regards, Erik. -- Sent from my SMTP compliant software 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: The "better" way tp add component directly
Hi Eyal, I think that the best time to execute this code is inside the Ajax callback method. Perhaps you'll need to set up some kind of notification (event) mechanism. Regards, Erik. Op 02-05-10 16:25, Eyal Golan schreef: actually we do call the addOrReplace method (I copied it incorrectly). However, the question remains, is there a different way of doing it other than in the onBeforeRender ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary 2010/5/2 Uwe Schäfer Am 02.05.2010 15:44, schrieb Eyal Golan: The Main (parent) panel can be changed via ajax. The ajax might change the enum type. if you change it at runtime, would you not want to replace, instead of add? cu uwe -- 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: root context, IE, home page is not found
This might be related to https://issues.apache.org/jira/browse/WICKET-2600? Regards, Erik. Op 29-04-10 16:57, Jimi wrote: I would also like to know if there is any solution (bug fix or workaround) to this bug. Currently each time a IE-user logs out from my web application he gets this ugly 404-error page, stating "The requested resource (/.) is not available". I use Wicket 1.4.7 and the web application is deployed as ROOT context on Tomcat 6.0.26. Is there no solution for this? Regards /Jimi -- 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: URL Encoding strategy
Only Wicket comitters can do that. Please make a jira issue that refers to this discussion, for example with a nabble URL. Regards, Erik. Alex Objelean wrote: I see. But at least could you make the encode method non-final? This would ensure that there is no need for a patch. I just would reuse your code for root mounting. Until wicket-1.5 will be released and adopted, we still have to have a solution for root mounting in wicket-1.4. Thanks! Alex Erik van Oosten wrote: Hi Alex, I am not sure it is a good idea to include this code in Wicket core (or extension). It will make Wicket's URL handling even more nontransparent then it already is. For well tested applications you can use the workaround, but I'd hate to maintain this code for each and every corner case, especially knowing that Wicket 1.5 will thoroughly improve URL handling. Regards, Erik. Alex Objelean wrote: Hi Eric! I've noticed that you have already posted the solution on your blog (http://blog.jteam.nl/2010/02/24/wicket-root-mounts/). Thank you for sharing it with us. One question, why BookmarkablePageRequestTargetUrlCodingStrategy#encode method is still final even in wicket-1.4.7 if there is a good use-case for extending it? Also, maybe you could add this contribution to wicket core or at least wicket-extension? Thank you! Alex Objelean Erik van Oosten wrote: Hi Nishant, This is tricky stuff. Here is some information: http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html Another approach is to do redirects from a servlet filter. If you have a couple of days of patience I'll have finished a blog article on it, with example code to make it a lot easier from within Wicket. Regards, Erik. Op 20-02-10 11:07, Nishant Neeraj wrote: Hi, I wanted to apply URL encoding strategy to application context root but I cant mount empty string because it throws exception at start-up. Is there a work around to this? Regards Nishant -- Sent from my SMTP compliant software 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: URL Encoding strategy
Hi Alex, I am not sure it is a good idea to include this code in Wicket core (or extension). It will make Wicket's URL handling even more nontransparent then it already is. For well tested applications you can use the workaround, but I'd hate to maintain this code for each and every corner case, especially knowing that Wicket 1.5 will thoroughly improve URL handling. Regards, Erik. Alex Objelean wrote: Hi Eric! I've noticed that you have already posted the solution on your blog (http://blog.jteam.nl/2010/02/24/wicket-root-mounts/). Thank you for sharing it with us. One question, why BookmarkablePageRequestTargetUrlCodingStrategy#encode method is still final even in wicket-1.4.7 if there is a good use-case for extending it? Also, maybe you could add this contribution to wicket core or at least wicket-extension? Thank you! Alex Objelean Erik van Oosten wrote: Hi Nishant, This is tricky stuff. Here is some information: http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html Another approach is to do redirects from a servlet filter. If you have a couple of days of patience I'll have finished a blog article on it, with example code to make it a lot easier from within Wicket. Regards, Erik. Op 20-02-10 11:07, Nishant Neeraj wrote: Hi, I wanted to apply URL encoding strategy to application context root but I cant mount empty string because it throws exception at start-up. Is there a work around to this? Regards Nishant -- Sent from my SMTP compliant software 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: Results of AutoCompleteTextField shown "behind" other form components
Don't use relative positioned divs. There is no golden solution, but here is an attempt anyway: https://issues.apache.org/jira/browse/WICKET-1355 Regards, Erik. Andreas Maza wrote: Hello, I am experiencing a strange problem with the AutoCompleteTextField (Wicket 1.4.7): The results of the AutoCompleteTextField are shown "behind" my other form components are not selectable, too. I am extending the DefaultCssAutoCompleteTextField and do not define any custom CSS for the textfield. Has anyone experienced a similar problem or can provide any hint? Thanks in advance, andr -- Sent from my SMTP compliant software 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: Application#get in WicketSessionFilter
That sounds great. Could you update the wiki page with the specifics for Wicket 1.4.8? Regards, Erik. Op 17-03-10 08:20, Jonas schreef: Thanks, Erik, that code would do the trick, too. I've implemented a different workaround, though. In the next release of wicket (1.4.8), WicketSessionFilter will 'expose' both the session and the application, Igor already resolved my JIRA Issue [1]. BTW: Thanks to Igor for picking that up so quickly! cheers, Jonas [1] https://issues.apache.org/jira/browse/WICKET-2778 On Tue, Mar 16, 2010 at 9:05 PM, Erik van Oosten wrote: Hi Jonas, Perhaps this is what you need: http://cwiki.apache.org/WICKET/springbean-outside-wicket.html Regards, Erik. Jonas wrote: Hi all, we're using WicketSessionFilter in our product to access our custom WebSession, which works fine. Now we've tried to also access the org.apache.wicket.Application (e.g. using Session#getApplication or Application#get), which doesn't seem to work, because the application isn't bound to the ThreadLocal. After searching in nabble I found some old threads ([1], [2]) suggesting this should actually work fine, but that doesn't seem to be the case. Is there any special configuration trick I have to apply to make this work, or are those old posts just (no longer) true? If anybody could confirm this is actually a bug, I'd create an issue in JIRA to have this fixed. Regards, Jonas [1] http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786 [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469 -- 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: InMethod Grid: resizing rowcount
I can confirm this. It took me a few days of debugging before I found out :( Another solution is to just replace the inmethod grid with a freshly created instance after data changes. You can share the DataSource, and you may have to copy over the set of selected items. Regards, Erik. Pointbreak wrote: ... Ok thanks for your help. The problem is that inmethod 's call to IDataSource.query() asks for the rows upto the last known total row count. In your case that probably does not matter, since you just return an iterator over the entire datasource, and update the rowcount accordingly. I work with very large datasources, and unknown rowcounts. I can workaround this issue by providing the page-size to my datasource, so that I can fix the IQuery.getCount() asked by inmethod. Not a nice solution, but will work for now. -- Sent from my SMTP compliant software 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: Application#get in WicketSessionFilter
Hi Jonas, Perhaps this is what you need: http://cwiki.apache.org/WICKET/springbean-outside-wicket.html Regards, Erik. Jonas wrote: Hi all, we're using WicketSessionFilter in our product to access our custom WebSession, which works fine. Now we've tried to also access the org.apache.wicket.Application (e.g. using Session#getApplication or Application#get), which doesn't seem to work, because the application isn't bound to the ThreadLocal. After searching in nabble I found some old threads ([1], [2]) suggesting this should actually work fine, but that doesn't seem to be the case. Is there any special configuration trick I have to apply to make this work, or are those old posts just (no longer) true? If anybody could confirm this is actually a bug, I'd create an issue in JIRA to have this fixed. Regards, Jonas [1] http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786 [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469 -- Sent from my SMTP compliant software 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 mounting on root (Was: URL Encoding strategy)
Hi Nishant, Its live: http://blog.jteam.nl/2010/02/24/wicket-root-mounts/ Regards, Erik. Nishant Neeraj schreef: Thanks Erik. I guess, I'll go with sevlet filter approach for now. However, I'll be looking for your blog post. If possible, post the link to the article in this thread when you're done. Thanks again. Nishant On Sat, Feb 20, 2010 at 6:40 PM, Erik van Oosten wrote: Hi Nishant, This is tricky stuff. Here is some information: http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html Another approach is to do redirects from a servlet filter. If you have a couple of days of patience I'll have finished a blog article on it, with example code to make it a lot easier from within Wicket. Regards, Erik. Op 20-02-10 11:07, Nishant Neeraj wrote: Hi, I wanted to apply URL encoding strategy to application context root but I cant mount empty string because it throws exception at start-up. Is there a work around to this? Regards Nishant -- Send from my SMTP compliant software 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: Questions about how wicket serialization works
This has been discussed before (of course) and this is on purpose. If you reload old pages your users will probably wonder what's going on (they are not used to this behavior), and secondly there is a performance hit with no business benefit. However, you should feel free to change these defaults (by overriding setHeaders) for cases where another setting is more appropriate. Regards, Erik. kellerautomat wrote: btw, gere is an interesting point, where IE and Firefox differ from each other. If you click the back-button of Firefox the page does not reload but is loaded from cache. http://blog.httpwatch.com/2008/10/15/two-important-differences-between-firefox-and-ie-caching/ maybe cache-control should be changed to: "Cache-Control: no-cache, no-store, max-age=0, must-revalidate" in org.apache.wicket.markup.html.WebPage.setHeaders(WebResponse) should i open a JIRA? -- Send from my SMTP compliant software 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: Questions about how wicket serialization works
Answers below... David Chang wrote: I am reading the book Wicket in Action. Page 88 about serializing models says: "At the end of the request, after the markup has been sent to the browser, Wicket stores the page, component hierarchy, and associated models (the state) in the page store." Does "Wicket stores the page" means Wicket stores all the page content (markup plus Wicket-inserted content) sent to the the browser? No, only the serialized form of the page hierarchy is stored. From this all other content can be reloaded (note: markup is only read once and cached when in production mode). I did an experiement in which there are two clock pages with dynamtic models (same java class and markup, but differnet class/file names). Clicking on a link goes to the second clock page. When I click IE Back button to go back to the first clock page, it always shows the current date/time. How so? Why not showing the previous date/time when the first clock page was loaded? When you press the back button, you'll see whatever the browser has cached. My understanding is that when a page is refreshed, each Wicket componet on a page calls its getObject to update content. Does the Back button get the getObject method called too? After using the back button, reload the page, and you'll get the re-rendered content. What did I miss? Thanks, David Regards, Erik. -- Send from my SMTP compliant software 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: URL Encoding strategy
Hi Nishant, This is tricky stuff. Here is some information: http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html Another approach is to do redirects from a servlet filter. If you have a couple of days of patience I'll have finished a blog article on it, with example code to make it a lot easier from within Wicket. Regards, Erik. Op 20-02-10 11:07, Nishant Neeraj wrote: Hi, I wanted to apply URL encoding strategy to application context root but I cant mount empty string because it throws exception at start-up. Is there a work around to this? Regards Nishant -- Posted from my SMTP compliant software. 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 Google maps integration
Hi Joshue, I believe wicket-contrib-gmap is not active anymore. You are probably better off with wicket-gmap2 project. Regards, Erik. Josh Kamau wrote: Hi guys; Is the wicket-contrib-gmap project still active? I need to intergrate google maps and i was wondering if i can use it. Regards Joshua -- Send from my SMTP compliant software 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: AbortException
Throwing a RestartResponseException will not redirect but restart the request handling. To force the redirect as well, you can call setRedirect(true) just before throwing the exception. But I doubt it will work for you; when you have an error page without the redirect, you will probably also have it with the redirect. Regards, Erik. Douglas Ferguson wrote: I tried that and it doesn't redirect, it throws the error back up and renders our error page org.apache.wicket.RestartResponseException:null On Feb 7, 2010, at 2:20 AM, Martin Grigorov wrote: throw new RestartResponseException(LinkPartners.class) On Sat, 2010-02-06 at 23:53 -0800, Douglas Ferguson wrote: I may be using this wrong, but my understanding was that if I wanted to redirect a user and hault execution of the current page I could do the following: setResponsePage(LinkPartners.class); throw new AbortException(); However, there seems to be situations where the AbortException actually bubbles back up to the user. What would cause the redirect not to work and the AbortException to make it to the screen? D/ -- Send from my SMTP compliant software 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: setResponsePage in the beggining of a constructor does not work
In Wicket it usually helps to look at the classes that are near in the class hierarchy. In this case RestartResponseException extends from AbstractRestartResponseException. Another subclass of AbstractRestartResponseException is RedirectToUrlException, which does exactly what you ask. Regards, Erik. Chris Colman wrote: Could I use RestartResponseException to redirect to a URL instead of a bookmarkable page? My problem is that all of my pages require a parameter (even the home page but that's fine because the Tomcat container server.xml configures the appropriate redirection for me - users never have to enter the parameters in the address bar) but the "Expired Page" page contains a link that does not contain any parameters. When a session expires the page that appears attempts to go to the 'home' page without any parameters. If I could either change the expired page's link or do a redirect in the home page's constructor that redirect's to "/" then this would work fine. Unfortunately the RestartResponseException seems to only want to redirect to bookmarkable pages. Is there an alternative I could use to redirect to the "/" URL? -- Send from my SMTP compliant software 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: class/interface/enum containing string values for html tag attributes
Hi Haiko, Jericho-parser contains a comprehensive set of all HTML elements, attributes etc. It also groups these constants per type (e.g. inline, open/close or not, etc. etc.). Regards, Erik. haiko van der schaaf wrote: Greetings, I am wondering if there is in wicket or another framework a class/interface/enum containing string values for html tag attributes ? It would be great to use it for instance with SimpleAttributeModifier. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Send from my SMTP compliant software 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: How to simulate browser back button?
Indeed, except that I saw that there were some extraneous slashes there. It should have been: back Any IE that still has JS switched off is useless on about any modern internet site. Just turn it on and accept the security risk or (better) use another browser. Regards, Erik. Riyad Kalla wrote: JavaScript is your only option -- that should work in IE, that's some pretty classic JavaScript right there. If your IE install has JS turned off, I'm not aware of any other way to programatically issue a 'back' to the browser. On Tue, Feb 2, 2010 at 1:09 AM, PDiefent wrote: It's not that simple! My IE doesn't accept the onclick in the tag. Is it poosible to run the code in the onSubmit method of a Wicket button? Erik van Oosten wrote: No problem: # back Peter Diefenthaeler wrote: Hallo Wicket users. is there an easy way to simulate the browsers back button with an own button in a form? Thank in advance Peter -- Send from my SMTP compliant software 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: How to simulate browser back button?
No problem: back Peter Diefenthaeler wrote: Hallo Wicket users. is there an easy way to simulate the browsers back button with an own button in a form? Thank in advance Peter -- Send from my SMTP compliant software 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: Image auto-resize in browser
Perhaps remove the height and width attributes? Regards, Erik. Matt Zemeck wrote: There is a feature of IE that resizes large images automatically. When you hover over the image you can click to expand it to actual size. This feature is not working for my images. -- Send from my SMTP compliant software 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: Localization properties overriding
The search for any given property key is top-down, the first result is found. Why? As I said, to allow an override of the component (which may be third party). Regards, Erik. Marek Šabo wrote: Hi Erik, I understand this - I use it eg. HomePage has title=Home, UserHomePage has title=User's Home etc... and it works top->down as expected. But why does this topmost property title, that should bind itself to key=title of wicket:messages attached to page component itself, got bounded to title two levels deeper in hierarchy precisely defined in lower most level (top->down should use the last found, shouldn't it?). According to what happens my UserHomePage should read only "Home Page" in it's title Sorry to bother, regards, Marek On 01/25/2010 03:39 PM, Erik van Oosten wrote: He Marek, The idea of Wicket i18n is that when you use a component, you can override its default texts with your own. That's why the lookup is top-down and not bottom-up. To solve this you'll need to use a more fine-grained name for the home page's title. Regards, Erik. Marek Šabo write: Hi all, I have a question regarding property binding when using localized property files, consider following: UserHomePage page has one property for localization and that is "title=User's Home" which is then used in markup as: ... This page has inside an UserAddPanel with form with following properties: formContainer.uaForm.title=Title formContainer.uaForm.name=First Name ... for markup: ... The name and other labels are generated fine (no reason not to) but the title is set to "User's Home" which is not desired. I would understood this behavior if I hadn't defined such 'fine-grained' property as formContainer.uaForm.title but why is it overriden when there is precise declaration on lower level? Is there a way to achieve behavior which I described or do I have to rename title in form to something else? TIA, Marek -- 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: Localization properties overriding
He Marek, The idea of Wicket i18n is that when you use a component, you can override its default texts with your own. That's why the lookup is top-down and not bottom-up. To solve this you'll need to use a more fine-grained name for the home page's title. Regards, Erik. Marek Šabo write: Hi all, I have a question regarding property binding when using localized property files, consider following: UserHomePage page has one property for localization and that is "title=User's Home" which is then used in markup as: ... This page has inside an UserAddPanel with form with following properties: formContainer.uaForm.title=Title formContainer.uaForm.name=First Name ... for markup: ... The name and other labels are generated fine (no reason not to) but the title is set to "User's Home" which is not desired. I would understood this behavior if I hadn't defined such 'fine-grained' property as formContainer.uaForm.title but why is it overriden when there is precise declaration on lower level? Is there a way to achieve behavior which I described or do I have to rename title in form to something else? TIA, Marek -- 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: How to close a Wicket application?
There is no hook in Wicket to stop. Wicket normally starts and ends with the web context it is running in. So ending the application is done by undeploying the web-app. You'll need to find hooks in your serlvet container. Spring will automatically shutdown with the web context as well. Regards, Erik. Giovanni wrote: I am using Spring + Wicket. When the Wicket application starts, if some important configuration is missing, I want to close all the application context, destroying all the Spring beans, including also the Wicket application, which is configured as a Spring bean by SpringWebApplicationFactory. I used the close() (I also tried stop() and destroy() methods) of the ApplicationContext, but it doesn't destroy the Wicket app. I then searched for a method of Wicket Application, which allows to stop/close the webapp, but I did not find it. How is it possible to stop a Wicket application from inside the application itself (that is suicide)? Best regards, giovanni -- 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: URL Rewriting in Wicket
Actually, you should override the WebRequestProcessor and return a custom RequestCodingStrategy from there. The custom RequestCodingStrategy would extend one of the default implementation and override urlCodingStrategyForPath and getRequestPath. Regards, Erik. Andreas Maza wrote: Hello, I would like to do a simple URL rewriting in my application: All requests containing a given path (e.g., a "/x/...") should be filtered and redirected accordingly. In other words, for a request to http://www.example.com/x/something I want to do a database lookup based on the value of "something" and then redirect the user to the appropriate wicket page. What is the recommended way to do this in wicket? Make a hook into the WebApplication.newRequestCycle() method? thanks for your help, andr -- 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: Session stealing with wicket-auth-roles
Thats basically the same code as on http://randomcoder.com/articles/jsessionid-considered-harmful. OWASP also has a good deal to say about sessions: http://www.owasp.org/index.php/Session_Management Regards, Erik. James Carman wrote: The Seam folks have a "fix" for removing JSESSIONID from the URLs, too: http://seamframework.org/Documentation/RemovingJSESSIONIDFromYourURLsAndFixingScache -- 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: [1.4.3] RequestUtils.toAbsolutePath("") skips the last value
Hello Smallufo, Please open an issue on the Wicket jira so that the development team can track this bug. Regards, Erik. smallufo wrote: The code is following : WebApplication : mountBookmarkablePage("/TestPage" , TestPage.class); TestPage.html : url = TestPage.java : final String url = RequestUtils.toAbsolutePath(""); add(new Label("url" , Model.of(url))); If I open http://foobar:8080/quickstart/app/TestPage it shows http://foobar:8080/quickstart/app/TestPage , correct if I open http://foobar:8080/quickstart/app/TestPage/a/b/ it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct BUT , if I open http://foobar:8080/quickstart/app/TestPage/a/b it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG -- 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: Howto test redirect to non-wicket base page
Per, You can also throw a RestartResponseException or a subclass thereof. That is the recommended way within a constructor anyway. For you it would be RedirectToUrlException (or something like that). Regards, Erik. Per Newgro wrote: Hi *, i would like to test behavior of my page. In constructor there is a redirect if page parameter not set. But the redirect target is a url and not a wicket page instance. What is the best attribute to add my assertion to? MyPage(PageParams p) { if (p.get("xyz") == null) { redirectTo("http://www.myurl.ch";); } add(new Label("Rendered"); } void redirectTo(String url) { getRequestCycle().setRedirect(true); getRequestCycle().setRequestTarget(new RedirectRequestTarget(url)); } lastRenderedPage is null so i can't add my assertion to this. Cheers Per -- 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: London Wicket Event, Saturday November 21st
Igor Vaynberg wrote: until i see some video proof i will continue to operate under my assumption - there are no presentations, this is just an excuse to get out of the house and go to a pub :) -igor For sure, they /will/ visit a pub... -- 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: Choose one
Call setRequired(false) on the dropdownchoice. Regards, Erik. Gatos wrote: After I choose something in DropDownChoice then 'Choose one' item is removed from the list. If I will try to use "setNullValid(true)" then 'Choose one' string is replaced with '' (emptry string). How is it possible to display 'Choose one' if another item has been selected? -- 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: Absolute urls in forms
I added a patch in Jira. Regards, Erik. Erik van Oosten wrote: > > Anyways, you can make all URLs absolute by following the hints in > https://issues.apache.org/jira/browse/WICKET-1974. > > You'll need to patch Wicket as the issue is not yet solved. (I really > should make the patch, its soo easy, just have to find time.) > -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ -- View this message in context: http://www.nabble.com/Absolute-urls-in-forms-tp25075543p25132710.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: Absolute urls in forms
I've always wondered about that Anyways, you can make all URLs absolute by following the hints in https://issues.apache.org/jira/browse/WICKET-1974. You'll need to patch Wicket as the issue is not yet solved. (I really should make the patch, its soo easy, just have to find time.) Regards, Erik. Igor Vaynberg wrote: thats funny, we worked really had to make all urls relative because it would make it a lot easier to work with proxies... :) -igor -- 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: Removing an element from ListView with AjaxFallbackButton
Perhaps you can use the list editor: http://wicketinaction.com/2008/10/building-a-listeditor-form-component/ Regards, Erik. Major Péter wrote: Any help would be appreciated. Thanks Regards, Peter -- 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: Wicketstuff core 1.4.0 release preparations
Maarten, you just beated me to it. Is the jazzyplugin still needed after your changes? Regards, Erik. Erik van Oosten wrote: Hi, Unfortunately tinymce does /not/ compile. It fails with a missing dependency to jazzyplugin:jazzyplugin:jar:0.2.1. 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
Wicketstuff core 1.4.0 release preparations
Hi, Unfortunately tinymce does /not/ compile. It fails with a missing dependency to jazzyplugin:jazzyplugin:jar:0.2.1. Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- 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: Wicketstuff core 1.4.0 release preparations
Yes, that did it. Running the dryRun in wicket-stuff/wicketstuff-core/yui-parent/yui succeeds. I repeated this for yui-examples. yui-parent, yui and yui-examples are ready to go! Regards, Erik. Erik van Oosten wrote: There is actually one more thing I could have tried: execute the release:prepare goals in de yui sub-sub modules. Igor Vaynberg wrote: mvn clean package release:prepare -DdryRun=true -igor On Thu, Aug 13, 2009 at 8:33 AM, Erik van Oosten wrote: Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? 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: Wicketstuff core 1.4.0 release preparations
Igor, release:prepare automatically also does clean and package. There is actually one more thing I could have tried: execute the release:prepare goals in de yui sub-sub modules. Regards, Erik. Igor Vaynberg wrote: mvn clean package release:prepare -DdryRun=true -igor On Thu, Aug 13, 2009 at 8:33 AM, Erik van Oosten wrote: Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? 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
Wicketstuff core 1.4.0 release preparations
Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- 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: Wicketstuff releases?
Regarding step 2: only change the dependency to Wicket in the wicketstuff-core pom.xml, not the versions of wicketstuff poms themselfs (as I just did). Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- 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: StringResourceModel ignores Converters?
Hi Matt, Converters are only used during form submission. So to answer your question: this seems like a feature. Regards, Erik. Matthias Keller wrote: Hi I need to use a StringResourceModel to compile a string with multiple parameter substitutions. I have a lot of converters active which should take care of all these values and which do work when using for example a PropertyModel elsewhere. Unfortunately it seems the converters are completely ignored for StringResourceModels when doing the parameter substitution? I always get the data in its raw (.toString) form instead of the converted?! Is this a bug or a feature? Thanks 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: How to add Random number to URL ?
You request puzzles me. By default Wicket adds headers to every page that will make any decent browser written since 1996 not cache the page. What is your intention? Regards, Erik. FaRHaN wrote: How can i use this for every request ? As i want to generate a unique URL for every page (not for images), any examples ??? -- 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: Wicketstuff releases?
Maarten, > AFAIK wicketstuff-core trunk is compatible with wicket 1.4.0 Yes, I know. But my client is not really happy about using trunk/snapshots in a production system. And frankly, neither am I. I love snapshot releases, but if I can prevent the extra steps needed to use them in production I would. > Side note: I don't see the version of wicket-stuff has to match exactly > with version of wicket ? > Suppose someone releases wicketstuff-core-1.4.0 today, and tomorrow some > bugs are fixed in wicketstuff-core, then we can't release these bug-fixes > until wicket 1.4.1 is out ? I agree. Its just that right now there is no release at all. As soon as there are more releases of the wicketstuff-core projects and/or wicket, it makes sense to start a compatibility matrix. BTW, I don't really care if wicketstuff-core is completely 100% stable, it will never be. Promoting every first snapshot of the month to a release is good enough for me. Regards, Erik. On Wed, 12 Aug 2009 10:24:07 +0200, Maarten Bosteels wrote: > Hello, > > On Wed, Aug 12, 2009 at 10:16 AM, Erik van Oosten > wrote: > >> >> Hello, >> >> Now that Wicket 1.4.0 is out, I wonder which wicketstuff core version is >> compatible. There is no 1.4.0 version of wicketstuff core (yet?). Should >> I >> use 1.4-rc8-SNAPSHOT? > > > AFAIK wicketstuff-core trunk is compatible with wicket 1.4.0 > > Side note: I don't see the version of wicket-stuff has to match exactly > with version of wicket ? > Suppose someone releases wicketstuff-core-1.4.0 today, and tomorrow some > bugs are fixed in wicketstuff-core, then we can't release these bug-fixes > until wicket 1.4.1 is out ? > > IMO, wicket is just a dependency of wicketstuff-code (as defoined in the > pom) and both projects should use their own unrelated version numbers. > > wdyt ? > > Maarten > > >> >> >> I guess http://sourceforge.net/projects/wicket-stuff/files/ is no longer >> in >> use. >> >> 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
Wicketstuff releases?
Hello, Now that Wicket 1.4.0 is out, I wonder which wicketstuff core version is compatible. There is no 1.4.0 version of wicketstuff core (yet?). Should I use 1.4-rc8-SNAPSHOT? I guess http://sourceforge.net/projects/wicket-stuff/files/ is no longer in use. 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: DataTable with more than one per item
Kariem, There is a hint at http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Elementwicket:container Regards, Erik. Igor Vaynberg wrote: no, a datatable doesnt support that. but it is easy enough with your own repeater. -igor -- 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: Output to input stream for streaming?
With 'output' I meant the servlet request output. But perhaps I misunderstood the question. I guess the problem is that you close 'inputStream' as soon as the request is finished. The thread that tries to write to it is still active at that moment. Regards, Erik. Martin Makundi wrote: Maybe the thread is wrongly written, yes but a servlet CAN read a FILE. A file is always another PROCESS (which supplies the file contents, yes, it's the disk driver etc.). So a similar configuration should be possible between a write operation and an input stream. Anybody have experience with pipedstreams? There is an article about it here, but I may have misunderstood the details: http://ostermiller.org/convert_java_outputstream_inputstream.html ** Martin 2009/8/10 Erik van Oosten : That won't work. Servlets are synchronous; they don't expect anyone writing the output once the servlet finished. 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: Output to input stream for streaming?
That won't work. Servlets are synchronous; they don't expect anyone writing the output once the servlet finished. Regards, Erik. Russell Simpkins wrote: Its not that anything is missing per se, but if you run your output writer in a separate thread, then the rest of your processing is free to continue and in your case I'm guessing that the processing has finished before your output writing has completed. When your servlet finishes, the last thing that happens is the output stream gets closed. Try doing the write outside of a thread and see if you get the same exception. Russ Date: Mon, 10 Aug 2009 15:03:13 +0300 Subject: Re: Output to input stream for streaming? From: martin.maku...@koodaripalvelut.com To: users@wicket.apache.org Well well.. I do not understand why it is not possible, in principle. The input is there. The output is there... what's missing? ** Martin 2009/8/10 Russell Simpkins : Martin, I don't think you can do this in a thread because that lets the HttpServletResponse end and close your ServletOutputStream. Russ Date: Mon, 10 Aug 2009 14:49:58 +0300 Subject: Output to input stream for streaming? From: martin.maku...@koodaripalvelut.com To: users@wicket.apache.org Hi! I have a HSSF document which can be written to an output stream. However, I want to stream it to the website visitor, which requires an inputstream... I have tried the following, but it somehow doesn't seem to work. Anybody know what can be done to fix it? final PipedInputStream inputStream = new PipedInputStream(); final PipedOutputStream out; try { out = new PipedOutputStream(inputStream); } catch (IOException e) { throw new RuntimeException(e); } Executors.newSingleThreadExecutor().execute(new Runnable() { @Override public void run() { try { wb.write(out); } catch (IOException e) { MarkupUtils.handleUnexpectedException(e); } } }); IResourceStream resourceStream = new IResourceStream() { /** * @see org.apache.wicket.util.resource.IResourceStream#close() */ public void close() throws IOException { inputStream.close(); } /** * @see org.apache.wicket.util.resource.IResourceStream#getContentType() */ public String getContentType() { return getAlternateContentType(); } /** * @see org.apache.wicket.util.resource.IResourceStream#getInputStream() */ public InputStream getInputStream() throws ResourceStreamNotFoundException { return inputStream; } /** * @see org.apache.wicket.util.resource.IResourceStream#getLocale() */ public Locale getLocale() { throw new IllegalAccessError("Method not implemented."); } /** * @see org.apache.wicket.util.resource.IResourceStream#length() */ public long length() { try { return inputStream.available(); } catch (IOException e) { MarkupUtils.handleUnexpectedException(e); } return 0; } /** * @see org.apache.wicket.util.resource.IResourceStream#setLocale(java.util.Locale) */ public void setLocale(Locale locale) { throw new IllegalAccessError("Method not implemented."); } /** * @see org.apache.wicket.util.watch.IModifiable#lastModifiedTime() */ public Time lastModifiedTime() { return Time.milliseconds(DatabaseServices.getCurrentTimestamp().getTime()); } }; java.io.IOException: Pipe closed at java.io.PipedInputStream.checkStateForReceive(Unknown Source) at java.io.PipedInputStream.receive(Unknown Source) at java.io.PipedOutputStream.write(Unknown Source) at java.io.OutputStream.write(Unknown Source) at org.apache.poi.poifs.storage.BigBlock.doWriteData(BigBlock.java:55) at org.apache.poi.poifs.storage.DocumentBlock.writeData(DocumentBlock.java:220) at org.apache.poi.poifs.storage.BigBlock.writeBlocks(BigBlock.java:86) at org.apache.poi.poifs.filesystem.POIFSDocument$BigBlockStore.writeBlocks(POIFSDocument.java:603) at org.apache.poi.poifs.filesystem.POIFSDocument.writeBlocks(POIFSDocument.java:275) at org.apache.poi.poifs.filesystem.POIFSFileSystem.writeFilesystem(POIFSFileSystem.java:390) at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1168) ** Martin -- 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: Changing a Form's Model
I am glad you got that right :) If the model has changed, call modelChanged() on the form (and/or the form components, not sure). There is no need to again set the model. Regards, Erik. Troy Cauble wrote: in a form that gets reused (repetitively in the same page). Don't you ever re-use a component! Sharing models/behaviors is fine, sharing components is not. Thanks, Erik, but I'm pretty sure we're talking about different things. I'm just using components on a page and changing the data. (Reusing the form *over time*.) I have Page DropDownChoice Form Fields When an entity is selected with the DDC, the form is made visible and filled with the model/data of the entity. When a save button is hit the form is hidden and the DDC reset ("Choose one..."). You're not saying the Form should be discarded and rebuilt, are you? Thanks, -troy -- 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: Changing a Form's Model
Hi Troy, There is no need to set the same model on both password fields. The confirmation field can be initialized with its own (dummy) model like so: PasswordTextField p2 = new PasswordTextField("repeatPassword", new Model()).setResetPassword(false); This is the same with or without a CPM. > in a form that gets reused (repetitively in the same page). Don't you ever re-use a component! Sharing models/behaviors is fine, sharing components is not. Regarding your other questions: Q1. Is the setChainedModel() call the best solution for this case? No, just don't share components. Q2. It's a good thing to pass models, right? LDM's don't support setObject(). Yes. Actually, you could override setObject of a LDM but I can not really recommend it as LDM is not set up for using the set object. Q3. In general (not this case), for reusing forms with CPM(EntityM) should I replace the CPM or only the EntityM ? See answer to Q1. Regards, Erik. Troy Cauble wrote: I have the following password confirmation pattern borrowed from WIA PasswordTextField p1 = new PasswordTextField("password").setResetPassword(false); docForm.add(p1); PasswordTextField p2 = new PasswordTextField("repeatPassword").setResetPassword(false); --> p2.setModel(p1.getModel()); docForm.add(p2); docForm.add(new EqualPasswordInputValidator(p1, p2)); in a form that gets reused (repetitively in the same page). This used to work fine with a CPM and calling docForm.setModelObject(). I rewrote to pass models instead of objects, changing docForm.setModelObject() to docForm.setModel(new CPM(new EntityModel(...))) and got "No get method defined for class: ... expression: repeatPassword" But the other fields work fine, if I comment out the repeatPasswordField. (My underlying data object has never had a repeatPassword field.) It works if I call cpm.setChainedModel(new EntityModel()); instead, but that seems a little non-obvious. I imagine redoing the p2.setModel(p1.getModel() would work too. Q1. Is the setChainedModel() call the best solution for this case? Q2. It's a good thing to pass models, right? LDM's don't support setObject(). Q3. In general (not this case), for reusing forms with CPM(EntityM) should I replace the CPM or only the EntityM ? Thanks, -troy - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help us release 1.4 sooner by helping out with the migration guide
If I remember correctly: the first link should be use. The second can be edited and will be copied to the first after each change. If the pages are not equal, something went wrong with the copy process. Re. LinkTree: every change should be on this page. Please add it. Regards, Erik. Major Péter wrote: Hmm... On the Wiki page did you forgot the LinkTree modification, or isn't that so relevant, to put it on wiki? Also it is strange that there are two wiki pages for migrating guide: http://cwiki.apache.org/WICKET/migrate-14.html and http://cwiki.apache.org/confluence/display/WICKET/Migrating+to+Wicket+1.4 The second one is a little more detailed, than the first one, but Martijn has linked the first one just before. Don't you need to synchronize this two page? Regards, Peter 2009-07-14 03:47 keltezéssel, Igor Vaynberg írta: thanks major, i added a couple of notes to the wiki. i totally forgot about 2350, i will get it into 1.4.0 for sure. -igor 2009/7/11 Major Péter: Hi, I have recently upgraded my project and I did find these changes: - the first parameter of org.apache.wicket.markup.html.tree.LinkTree#onNodeLinkClicked has been changed from TreeNode to Object, so if you had override this method, you need to change the parametertype. - localization messages for validations works only in form.component.validatorType=message format, the component.validatorType=message format isn't working anymore (but this could be change for final release - for further infos see: https://issues.apache.org/jira/browse/WICKET-2350 ) Besides this, I found in WebApplication#getConfigurationType a FIXME comment, so in theory the init-param's name for filter/servlet (or context-param) should be changed from "configuration" to "wicket.configuration" in final 1.4 release. (See: https://issues.apache.org/jira/browse/WICKET-1317 ) //Also many old component has been genericized, a list of these components would be helpful, (for example TextField, RequiredTF, and so on, if you follow these changes in your code, it would be easier to read next time) p.s: I would wrote this on wiki, but I know how bad my english is. :) Best Regards, Peter Major 2009-07-10 21:22 keltezéssel, Igor Vaynberg írta: We would like to release Wicket 1.4 very soon, but in order to do so we would like to provide our users with a good migration guide. We have started one here: http://cwiki.apache.org/confluence/display/WICKET/Migrate-1.4 but it probably lacks the smaller tweaks necessary to migrate. If you have recently migrated a project, or remember any changes you had to perform, or have any helpful tips or hints please add them to the migration guide. Do not worry about formatting, for now we are looking for content. If you do not want to bother putting them on the wiki simply add them to this thread. Thanks! -igor - 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: wicket rewriting name attributes in form
Hi Bas, Wicket needs to write a generated name attribute so that it knows exactly which value comes back from the client. But since you're not posting to the server but to some other script, why bother with using Wicket components? Just use the raw html, and if you must use Label and WebMarkupContainer to manipulate the html. Regards, Erik. Bas Vroling schreef: I have written an wicket page that collects some user input and calculates values. These values need to be sent to an external python script that does something with this data and renders a results page. This almost works fine but wicket messes up my form. In the HTML template I have specified my form like this: name="protein_id" /> but when wicket renders the page it creates this: name="mutantPredictionSubmitPanel:proteinId" value="adrb2_human"/> The difference is in the name of proteinId value being rewritten from "protein_id" to "mutantPredictionSubmitPanel:proteinId", and this causes the python script at the other end to choke. Is there a way to disable the rewriting of the name attribute, or specify my own name? -- 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: How to link with text or image in run-time?
This probably easiest with fragments. http://wicket.apache.org/examplefragments.html Regards, Erik. Petr Fejfar wrote: Hi all, I have markup [xxx] and Label with text in Java code. But I'd like to generate in run-time either: text or But I don't know how to achieve this. Please, could somebody help me. Thanks, Petr -- 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: Wicketstuff checkout fails
Aacchh!! Me hit forehead with table Martin Funk wrote what are you trying to do? that url is no subversion repo, but a maven repo. maybe you were looking for this: http://sourceforge.net/projects/wicket-stuff/develop mf - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicketstuff checkout fails
Hi, I am trying to do a checkout of wicketstuff but I get redirected to the same URL: e...@oostblok:~/projects/wicketstuff$ svn co http://wicketstuff.org/maven/repository/org/wicketstuff/tinymce/ svn: Repository moved temporarily to 'http://wicketstuff.org/maven/repository/org/wicketstuff/tinymce/'; please relocate e...@oostblok:~/projects/wicketstuff$ Accessing the repo with FF is no problem. Am I doing something wrong? 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: Caching a resource on the browser side
hi We need to provide a flash application (www.amcharts.com if anyone is interested) with some content through some files. As the files are users specific (and determined with data from the session), we went for some page delivering the content like this : public AMChartDataProviderPage(final PageParameters parameters) { Object object = parameters.get(DATA_KEY); if ((object == null) || !(object instanceof String) || "".equals(object)) { throw new IllegalStateException("Expected parameter " + DATA_KEY + " not provided or empty"); } String dataId = (String) object; ByteArrayResource resourceStream; try { resourceStream = new ByteArrayResource("text/csv", IOHelper.getResourceAsByteArray(dataId + ".csv")); } catch (IOException e) { throw ExceptionHelper.wrap(e); } getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream.getResourceStream())); } However, I don't manage to get this resource to be cached on the user browser side, despite the resource being cacheable. From what I've seen, setHeaders() in WebResource is never called... Neither did I manage to set them myself (on the page they're never called neither... and the request cycle has no webresponse on which to define the header). Any clue ? thanks in advance zedros - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- http://www.autoladu.ee - kõik varuosad ühes kohas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- http://www.autoladu.ee - kõik varuosad ühes kohas - 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: Mounting application homepage
Please see this thread. http://www.nabble.com/How-to-catch-unknown-(not-mounted)-URLs--td14949092.html#a14949092 I am not sure, but I think there are more answers out there. Or, ... you could wait for Wicket 1.5 :) Regards, Erik. Roman Uhlig Maxity.de wrote: We currently do a multilanguage site with Wicket and ran across the following problem: To be able to encode the chosen language in the URL, we append it to every URL like www.site.com/sitemap/fr www.site.com/sitemap/en (www.site.com/sitemap would mean default language) This works fine with MixedParamUrlCodingStrategy (in our case) unless you want to do this with the main index page like www.site.com/en because it seems it's not possible to mount the index page like mount(new MixedParamUrlCodingStrategy("/", Index.class, new String[]{ "language" })); or mount(new MixedParamUrlCodingStrategy("", Index.class, new String[]{ "language" })); Would be interesting to hear if anyone was able to achieve this since it's a quite common use case I think. Thanks in advance, Roman - 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: Adding javascript after tab clicked
That can not be right. The javascript added with AjaxRequestTarget#appendJavascript should be executed /after/ the DOM manipulations have finished. Maybe you called prependJavascript by accident? Or do you refer to something another thing when you write 'before the rendering finishes'? BTW, I assume you are using an overriden AjaxTabbedPanel#onAjaxUpdate. Regards, Erik. Cristi Manole wrote: Hello, Tks for the reply. Yes, I'm using that, the problem is it gets called before the rendering finishes. I need something that runs after it got rendered. Any ideas? Cristi On Mon, Aug 3, 2009 at 1:07 PM, Eyal Golan wrote: I'm not sure, but are you looking for this: AjaxRequestTarget #appendJavascript(javascript) ? Eyal Golan egola...@gmail.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: Stateless login form?
Ah, I get it. Yes, you are right too, just never got around rewriting the login to a stateless form. It has no priority though as our session never dies. Regards, Erik. Martin Makundi wrote: Login page is visible, but the form action="/?wicket:interface=:0:1" which is stateful. If my session dies I will definitely get an error. Try clicking this link with a new browser that does not have a session on the site: http://www.tipspot.com/?wicket:interface=:0:1 This is what you would get if your browser loaded the page from cache (or if you let it wait until the session invalidates). Does not look professional and it is totaly unnecessary, in my opinnion. It should be possible to handle forms on "virgin" (=no state bound yet) invocations too. ** Martin 2009/8/2 Erik van Oosten : Martin, I am not sure what you mean. On the site you are referring, the login page is always visible under /login. Regards, Erik. Martin Makundi wrote: If I understood correctly, you might find this interesting: http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html Does appear to make stateless-looking urls AFTER you CLICK/REDIRECT (looking at the example page referred on the site). Not BEFORE you CLICK... -- 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: Stateless login form?
Martin, I am not sure what you mean. On the site you are referring, the login page is always visible under /login. Regards, Erik. Martin Makundi wrote: If I understood correctly, you might find this interesting: http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html Does appear to make stateless-looking urls AFTER you CLICK/REDIRECT (looking at the example page referred on the site). Not BEFORE you CLICK... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to use Session.replaceSession() ??
Try this in a method of your WebSession subclass: ((WebRequest) RequestCycle.get().getRequest()).getHttpServletRequest().getSession().invalidate(); // Bind forces a connect of the current Wicket session to the new HTTP session. bind(); Regards, Erik. Matthias Keller wrote: Hi I'm writing our custom internal error handler which is supposed to terminate the current session and create a new one (in order to pass over the locale to the new session). I've stumbled upon the Session.replaceSession() method which, according to the javadoc, should just exactly do that. But when I call this method, nothing happens. The same session continues to be used and no new session is being created at all?! I've got it to work by using: Session newSession = getApplication().newSession(getRequest(), getResponse()); newSession.setLocale(getSession().getLocale()); getSession().invalidateNow(); Session.unset(); newSession.replaceSession(); But I think there must be something easier... ???! Thanks 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: Ajax indicator turning off
This seems like something that warrants a new Jira issue. Regards, Erik. John Patterson wrote: > > > > paolo di tommaso wrote: >> >> Yep, intercept the ajax call and inc/dec a counter >> >> -- paolo >> > > Although I could correct the indicator behaviour in all my own AJAX > components, it would probably make more sense to incorporate it into > wickets default AJAX behaviour. If people think it makes sense I can > supply a patch. > > John > -- View this message in context: http://www.nabble.com/Ajax-indicator-turning-off-tp24655744p24694924.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: UnauthorizedActionException wrapped in an InvalidUrlException -> how to deal with it ?
Sorry Olger, that was a copy paste error. Please see Alex' e-mail. Regards, Erik. Erik van Oosten schreef: Olger Warnier schreef: Intresting, I assume that it is of value to have this construction, could you give me the link to the RFE ? https://issues.apache.org/jira/browse/WICKET-2200 -- 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: UnauthorizedActionException wrapped in an InvalidUrlException -> how to deal with it ?
Olger Warnier schreef: Intresting, I assume that it is of value to have this construction, could you give me the link to the RFE ? https://issues.apache.org/jira/browse/WICKET-2200 -- 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: Questions about Wicket sessions
Igor Vaynberg wrote: 2. If I start IE or FF in another window, visitor activities on the same Wicket app are considered in the same or different session? always a different sessions, browsers do not share sessions. I think it depends on what David meant by 'another window'. I assumed it to be the 'open in new window' function. Then you still have the same browser, but another window. 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