Re: Create custom UrlCodingStrategy

2008-12-03 Thread Peter Ertl
maybe this would be the time to apply my patch? :-) https://issues.apache.org/jira/browse/WICKET-1666 Am 03.12.2008 um 16:18 schrieb Mathias P.W Nilsson: Yes, thanks! This is what I have been trying to do but with no luck. -- View this message in context:

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread Peter Ertl
Wouldn't it be more powerful to override / hook into the process of adding a component of a container? Something like that ... new WebMarkupContainer(id) { @Override public void onComponentAdd(Component child) { // check the sealed flag, decorate the child, throw exception, or do

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread Peter Ertl
, 2008 at 11:27:39AM +0100, Peter Ertl wrote: Wouldn't it be more powerful to override / hook into the process of adding a component of a container? Something like that ... new WebMarkupContainer(id) { @Override public void onComponentAdd(Component child) { // check the sealed flag, decorate

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread Peter Ertl
+0100, Peter Ertl wrote: I was thinking about something like this: [warning, sketchy pseudo code will follow] method org.apache.wicket.MarkupContainer.add(Component... children) : - call empty overridable method onComponentAdd(Component child) for each component - add component protected

Re: Render a Wicket page to a string for HTML email

2008-11-06 Thread Peter Ertl
WicketRuntimeException(e.getMessage(), e); } catch (ExecutionException e) { throw new WicketRuntimeException(e.getMessage(), e); } } Peter Ertl wrote: ... return new String(tester.getServletResponse().getBinaryContent

Re: Render a Wicket page to a string for HTML email

2008-11-06 Thread Peter Ertl
) { throw new WicketRuntimeException(e.getMessage(), e); } } Peter Ertl wrote: ... return new String(tester.getServletResponse().getBinaryContent(), tester.getServletResponse().getCharacterEncoding()); ... -- View this message in context: http

Re: Render a Wicket page to a string for HTML email

2008-11-05 Thread Peter Ertl
Great work! You should put this on the Wiki :-) Am 05.11.2008 um 11:22 schrieb Jörn Zaefferer: No voodoo neccessary, got it working: protected String renderPage(Class? extends Page pageClass, PageParameters pageParameters) { //get the servlet context

Re: Render a Wicket page to a string for HTML email

2008-11-05 Thread Peter Ertl
Won't it be easier / will it work to use WicketTester for this? Am 05.11.2008 um 17:26 schrieb Igor Vaynberg: make sure you do this in a thread other then the request thread so you dont mess up any threadlocals. -igor On Wed, Nov 5, 2008 at 2:22 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote:

Re: Render a Wicket page to a string for HTML email

2008-11-05 Thread Peter Ertl
) { e.printStackTrace(); } Am 05.11.2008 um 18:18 schrieb Igor Vaynberg: you still have to do it in a separate thread :) -igor On Wed, Nov 5, 2008 at 9:14 AM, Peter Ertl [EMAIL PROTECTED] wrote: Won't it be easier / will it work to use WicketTester for this? Am 05.11.2008 um 17:26

Re: Render a Wicket page to a string for HTML email

2008-11-05 Thread Peter Ertl
wickettester the actual application object also. -igor On Wed, Nov 5, 2008 at 9:26 AM, Peter Ertl [EMAIL PROTECTED] wrote: So would this be ok ?! (caution! untested!) try { final String html = Executors.newSingleThreadExecutor().submit(new CallableString() { public String call

Re: Returning XML to JS

2008-10-21 Thread Peter Ertl
have a look at XStream :-) Am 21.10.2008 um 11:25 schrieb [EMAIL PROTECTED]: Hi, What's the nice / correct way to do this in Wicket: I have a client side bit of JS that looks something like getData(URL); It expects to get back an XML document like data entryfoo/entry

Re: html code in component class

2008-10-09 Thread Peter Ertl
If it's just a line use Label Am 09.10.2008 um 21:01 schrieb miro: Using panel I have to write a .html file which I dont want to do becasue my html code is very little just a line , next option is Fragment but this is not clear, neither the api doc nor the wicket examples please can

Re: Discussion on Wicket Interface Speed-Up

2008-08-29 Thread Peter Ertl
. Cheers Peter Am 29.08.2008 um 08:17 schrieb Stefan Fußenegger: honestly, no, I didn't. however, using last modified times still results in an HTTP request and a 304 Not Modified reply. better than nothing, but client-side caching is still preferable. regards Peter Ertl wrote: @stefan

Re: Discussion on Wicket Interface Speed-Up

2008-08-29 Thread Peter Ertl
shouldn't be served by Wicket at all, but I really don't like to use proxies, CDNs or whatever voodoo for low traffic web sites: server-side performance isn't an issue there while client-side performance is. regards Peter Ertl wrote: That's not true. this settings will generate urls like

Re: Wicket,tomcat and UTF-8

2008-08-29 Thread Peter Ertl
It's a standard tomcat problem that everybody sooner or later encounters... This will work for you: http://cagan327.blogspot.com/2006/05/utf-8-encoding-fix-tomcat-jsp-etc.html Just use the EncodingFilter and I bet my [EMAIL PROTECTED]@#$ it will work :-) Am 29.08.2008 um 11:04 schrieb Ray

Re: Discussion on Wicket Interface Speed-Up

2008-08-29 Thread Peter Ertl
why don't you open up an issue in JIRA? Am 29.08.2008 um 12:22 schrieb Jörn Zaefferer: Here is a first patch for the RevisionVersionProvider: Index: src/main/java/org/wicketstuff/mergedresources/versioning/ RevisionVersionProvider.java

Re: Discussion on Wicket Interface Speed-Up

2008-08-28 Thread Peter Ertl
@stefan: did you take into account getApplication ().getResourceSettings ().setAddLastModifiedTimeToResourceReferenceUrl(true)?? Cheers Peter Am 28.08.2008 um 18:20 schrieb Igor Vaynberg: sfussenegger now has access to wicketstuff... i dont know which parts should go into

Re: WANG–Wicket Ajax Next Generation–bei ng based on YUI (MD)

2008-08-26 Thread Peter Ertl
+1 for including support for cometd in wicket core I expect server side push the next great thing in web development :) my 2 pct Am 26.08.2008 um 22:19 schrieb Matej Knopp: Hi, On Tue, Aug 26, 2008 at 9:24 PM, jWeekend [EMAIL PROTECTED] wrote: Matej, What are the implications of the

Re: Wicket merchandise take 2

2008-08-25 Thread Peter Ertl
Just having the logo would look even more magical *g* Less is more Loads of people would ask what this 'wicked' logo means and you have all the attraction you possibly want :-) This would make it easier to proselytize alien web developers because you don't have to hunt them down first

Re: I'm adding a new item to a ListView via ajax - how to get reference to the new item?

2008-08-17 Thread Peter Ertl
use AjaxRequestTarget.get() Am 17.08.2008 um 15:36 schrieb Martin Grigorov: On Sun, 2008-08-17 at 13:36 +0200, Wayne Pope wrote: Hi, But how do I get that target? As the items are being rendered using a ListView - the only time I can get access is during the populateItem - but thats a

Re: Comparing JSF and Wicket

2008-08-07 Thread Peter Ertl
I don't need nearly as much extensions for wicket because it's such a no-brainer to write my own custom components... I think JSF is a big joke with nobody laughing :) my 2 % Cheers Peter Am 07.08.2008 um 17:59 schrieb Timm Helbig: Sorry, not really. *) JSF doesn't consume less Memory

Re: why are we coding Web apps?

2008-07-17 Thread Peter Ertl
Even Mac guys agree that development by Sun would be much better :-) They still lag behind with java 1.6 (no current 1.6.0_07), do not support powerpc for 1.6 anymore, can't run 32bit on 1.6 and can't run 64bit on 1.5 etc. Yeah, java by apple suckzz ! Am 17.07.2008 um 16:08 schrieb

Re: [PROPOSAL] Use path in URL when target is instance of BookmarkablePageRequestTarget

2008-07-02 Thread Peter Ertl
However this will not be true if you change the render strategy *imho* getRequestCycleSettings ().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER) +1 for applying the patch as it's not only a matter of correctness but also of taste Am 02.07.2008 um 16:06 schrieb Johan

Re: [PROPOSAL] Use path in URL when target is instance of BookmarkablePageRequestTarget

2008-06-30 Thread Peter Ertl
+1 -- sounds reasonable, doesn't break anything (hopefully :-), easier path-based security on apache front end proxy, Good work, David :-) Am 30.06.2008 um 07:33 schrieb David Leangen: Wouldn't this be useless except from the fact of been pretty ? Yes, it would indeed be useless

Re: Home page accepting IndexedParamUrlCodingStrategy

2008-06-27 Thread Peter Ertl
pseudo code example: mount(/, ... indexed HomePage.class) mount(/foo, FooPage.class) What should happen with this path: url = /foo - call HomePage with indexed parameter 'foo' ? - call page FooPage.class ? not having indexed urls for '/' makes sense for me Am 27.06.2008 um

Re: How to send response without HTML code

2008-06-11 Thread Peter Ertl
I think this is what AbortWithWebErrorCodeException is for Am 11.06.2008 um 13:24 schrieb Erik van Oosten: Hi Milan, I think you should throw the exception AbortWithHttpStatusException. If you change your mind and want to set the HTTP status code, but provide content as well, then call

Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-09 Thread Peter Ertl
Strong typing is my friend. Refactoring is my friend. The stronger and clearer we make typing throughout Wicket the happier I'll be. Code is written once and maintained a hundred thousand times. I'd always trade verbosity for maintainability. +1 for that --- very nice said! I totally

Re: wicket generics

2008-06-07 Thread Peter Ertl
+1 for do it right, no matter if the api breaks or not Am 07.06.2008 um 09:20 schrieb Igor Vaynberg: so i tried to remove the generic type from component in sandbox/ivaynberg/wicket-generics branch and ran into what i think is a deal breaker for this design class component { public void

Re: (Class? extends Page?) casting troubles

2008-06-04 Thread Peter Ertl
I remember that having more than one wildcard in an type expression seems to be inherently broken. Usually you can rewrite something like void foo(Class? extends Page? pageClass) into something like X extends Page? void foo(ClassX pageClass) I would bet this solves your problem :-)

Re: decode() in WebRequestCodingStrategy

2008-06-02 Thread Peter Ertl
Eventually you might be interested in https://issues.apache.org/jira/browse/WICKET-1666 Am 02.06.2008 um 09:02 schrieb reikje: why do you want to add extra params in the RequestParameters? The use case is this. The request comes in with a URL like /press/article/headline.html. I will take

Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-01 Thread Peter Ertl
1) Generifying* Wicket [X ] Can best be done in a limited fashion, where we only generify IModel but not components. I care more about what generifying can do for API clarity (declaring a component to only accept certain models for instance) than static type checking. 2) How strongly do you

Re: AutoCompleteTextField - autocomplete multiple fields

2008-05-30 Thread Peter Ertl
I filed an issue in April 2007 (the patch probably unusable right now) to support autocompleting multiple fields https://issues.apache.org/jira/browse/WICKET-488 An example would be to select an address from the autocompleter which will fill in the fields for street, zip code, city, etc.

Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Peter Ertl
I just uploaded a patch a few days ago to support indexed resource urls. Hopefully the wicket devs will apply it to the codebase. I guess it would be a good base for RESTful resources without explicit session state. It's like Martijn describes, but for shared resources. Cheers Peter Am

Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Peter Ertl
Damn it, forgot to mention the jira issue: https://issues.apache.org/jira/browse/WICKET-1666 I don't think there already something in wicket like this... Am 29.05.2008 um 17:01 schrieb Peter Ertl: I just uploaded a patch a few days ago to support indexed resource urls. Hopefully the wicket

Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Peter Ertl
of REST *imho* Am 29.05.2008 um 17:05 schrieb Johan Compagner: we already can mount shared resources and you can give them parameters so that you dont have to have session but can create the same resource depending on the params johan On Thu, May 29, 2008 at 5:01 PM, Peter Ertl [EMAIL

Re: (Class? extends Page?) casting troubles

2008-05-22 Thread Peter Ertl
+1 for finishing generics (no matter how ugly it gets), then refactoring / removing the things that suck Am 22.05.2008 um 11:37 schrieb Johan Compagner: exactly Repeaters is very nice that the populateItem is generified.. I think that is really handy.. And if the EditPage now wanted a

Re: Spring?

2008-05-21 Thread Peter Ertl
at this point because of the convenience and flexibility it offers. Guice looks nice, but the tool support isn't there yet. That's why I use guice. Because you don't even need tools :-) Am 21.05.2008 um 03:32 schrieb Nick Heudecker: I have to agree with James. I wouldn't build an

Re: (Class? extends Page?) casting troubles

2008-05-21 Thread Peter Ertl
I suspect the multiple wildcards (?) in one type expression causing all that trouble. probably an issue of the compiler and not of the language spec. public class Test { public static void main(String[] args) { bad(Derived.class); // ok bad(Base.class); // compile error

Re: (Class? extends Page?) casting troubles

2008-05-21 Thread Peter Ertl
Also if you use CompoundPropertyModels (widely used) then generics are completely not used anymore at all.. Speaking for me, I never use expression based property models in any mid- to large-sized project to have complete(!) refactoring support in my IDE. String expression are a lot less

Re: (Class? extends Page?) casting troubles

2008-05-21 Thread Peter Ertl
Maybe this can help a little: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6384510 (verified with java 1.5 on mac os x leopard) Am 21.05.2008 um 11:13 schrieb Martijn Dashorst: On Wed, May 21, 2008 at 11:03 AM, Johan Compagner [EMAIL PROTECTED] wrote: if we drop that then we can

Re: Forum?

2008-05-20 Thread Peter Ertl
Don't forget to make it language independent so it runs on C#, Scala, Fortran or Algol 68 as well :-) Am 20.05.2008 um 22:15 schrieb James Carman: If you are creating a product, why do you need to be able to plugin a different IoC container (Guice vs. Spring for example)? Do you think a

Re: Forum?

2008-05-20 Thread Peter Ertl
, Peter Ertl [EMAIL PROTECTED] wrote: Don't forget to make it language independent so it runs on C#, Scala, Fortran or Algol 68 as well :-) Am 20.05.2008 um 22:15 schrieb James Carman: If you are creating a product, why do you need to be able to plugin a different IoC container (Guice vs

Re: Using generics with some non-generic classes in Wicket

2008-05-15 Thread Peter Ertl
this one will do: public X extends Component? void foo(ClassX clazz); however, the subtle differences between this and igors version are really hard to get. Am 15.05.2008 um 16:31 schrieb Igor Vaynberg: this is the usecase we are talking about. i get a compile error, which sucks.

Re: Using generics with some non-generic classes in Wicket

2008-05-15 Thread Peter Ertl
(ClassX clazz); ??? seems like this is our first generic bug :-) Am 15.05.2008 um 16:41 schrieb Peter Ertl: this one will do: public X extends Component? void foo(ClassX clazz); however, the subtle differences between this and igors version are really hard to get. Am 15.05.2008 um

Re: Using generics with some non-generic classes in Wicket

2008-05-14 Thread Peter Ertl
StringModel looks ambigious to me, will it extend - LoadableDetachableModel - IModel - Model - AbstractReadOnlyModel - ??? Am 14.05.2008 um 15:47 schrieb Doug Donohoe: Let me outline what I believe the benefits are. For example: add(new LabelString(tournamentName,

Re: Using generics with some non-generic classes in Wicket

2008-05-14 Thread Peter Ertl
In IDEA it is annoying when you enable inspection 'Raw use of parametrized class' which is generally quite useful it will complain on protected boolean isPageAuthorized(final Class? extends Page pageClass) so, no, you don't get a warning but a potentially useful inspection is more or

Re: Using generics with some non-generic classes in Wicket

2008-05-14 Thread Peter Ertl
used to warnings, i tend to do something about them and clean up my code. i do not want to turn this warning off, because as you said yourself it is a very useful warning, if i turn it off i might as well not be using generics... -igor On Wed, May 14, 2008 at 1:38 PM, Peter Ertl [EMAIL PROTECTED

Re: Using generics with some non-generic classes in Wicket

2008-05-14 Thread Peter Ertl
wicket 1.6 = scala-based ? *lol* Am 14.05.2008 um 23:28 schrieb Eelco Hillenius: On Wed, May 14, 2008 at 2:25 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: the whole generics thing turned out to be quiet a lot crappier then i thought it would. :-) Generics for models: great. Generics for

Re: Javascript error in wicket

2008-05-02 Thread Peter Ertl
Of course it's there... The script seems to be broken (Firefox issue, not Wicket) Am 30.04.2008 um 16:44 schrieb Vitaly Tsaplin: This file exists. I can open it... On Wed, Apr 30, 2008 at 2:52 PM, Peter Ertl [EMAIL PROTECTED] wrote: that's not wicket but firefox... try reading

Re: Jquery Attached Behaviors Disappearing During Ajax Calls

2008-04-30 Thread Peter Ertl
Have you tried putting that javascript behavior into an wicket behavior attached to the component? something like... textbox.add(new MyJQueryCustomBehavior()) Am 30.04.2008 um 09:41 schrieb carloc: Hi, I'm using JQuery together with Wicket. I have this problem that whenever I

Re: Is it possible to hide /?wicket:.. from the URLs

2008-04-30 Thread Peter Ertl
A poor man's solution could be: You could rewrite your URL through e.g. a front-end apache and mod_rewrite. response: convert any occurrence of '?wicket' to '?foobar' in url request: convert '?foobar' to '?wicket' Am 30.04.2008 um 03:57 schrieb Johan Compagner: Currently it is not easy

Re: Javascript error in wicket

2008-04-30 Thread Peter Ertl
that's not wicket but firefox... try reading the filename: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js Am 30.04.2008 um 12:17 schrieb Vitaly Tsaplin: Hi everyone, Firebug is complaining as follows: [Exception... Component is not available nsresult:

Re: Problems and Questions about MultiFileUploadField, UploadProgressBar

2008-04-02 Thread Peter Ertl
Great! So could you share your experience? Am 02.04.2008 um 11:58 schrieb Fabien D.: My problem is fixed! :) I search response for my question : is it possible to use MultiFileUploadField, UploadProgressBar together?or UploadProgressBar is only for simpleUpload? -- View this message in

Re: export excel file via an OutputStream

2008-04-01 Thread Peter Ertl
use AbstractResourceStreamWriter Wicket got to have a more structured api for this common task. usually it's not wicket but you when something is not working the way you expect it Am 01.04.2008 um 09:31 schrieb [EMAIL PROTECTED]: Hello: I am trying to export dynamically generated

Re: [vote] Release 1.4 with only generics and stop support for 1.3

2008-03-18 Thread Peter Ertl
+1 Am 18.03.2008 um 10:50 schrieb Gabor Szokoli: +1 On 3/17/08, Martijn Dashorst [EMAIL PROTECTED] wrote: Everybody is invited to vote! Please use [ ] +1, Wicket 1.4 is 1.3 + generics, drop support for 1.3 [ ] -1, I need a supported version running on Java 1.4 Let your voices be heard!

Re: Wicket, Hibernate and Models

2008-03-13 Thread Peter Ertl
please mind that you shouldn't create anonymous model classes as they keep the reference to the page/panel and you will fall into other memory issues. could you elaborate on that? Am 13.03.2008 um 16:47 schrieb Leszek Gawron: Maurice Marrink wrote: I believe refreshingview has better

Re: Wicket, Hibernate and Models

2008-03-13 Thread Peter Ertl
whew - glad to hear :-) [having probably hundreds of anonymous models in his projects] Am 13.03.2008 um 17:46 schrieb Igor Vaynberg: actually not in 1.3. our serialization is smart enough to take this into account if i remember correctly. -igor On Thu, Mar 13, 2008 at 8:47 AM, Leszek

Re: Default Focus Behavior?

2008-03-09 Thread Peter Ertl
-1 for letting components handle focus. There's only _one_ focus that can set on a page at a time. What if several components demand focus? Who will be the winner? Also, not every WebComponent can receive focus (Label, Image, ...) but only FormComponents (input, select, button, ...) I

Re: need to sanitize uploaded file names before saving?

2008-02-20 Thread Peter Ertl
Why not simply use new java.io.File(client_file_name).getName() ? Returns the name of the file or directory denoted by this abstract pathname. This is just the last name in the pathname's name sequence. If the pathname's name sequence is empty, then the empty string is returned.

Re: Embedding in Jetty without web.xml

2008-01-30 Thread Peter Ertl
Dont change wicket, it's fine :-) Actually I got this working without any web.xml or WEB-INF/ and it's possible! The things is: When you use the wicket filter you also need to add the DefaultServlet (or any servlet that is mapped to your wicket filter path) it looks like that in my

Re: Embedding in Jetty without web.xml

2008-01-30 Thread Peter Ertl
Also you should do this instead: Context context = new Context(server, /, Context.SESSIONS); you write: Context context = new Context(server, /);

Re: Ajax History Back support on Stateless pages

2007-12-31 Thread Peter Ertl
As far as I understand your page will not be stateless anymore once you use ajax. Am 31.12.2007 um 12:59 schrieb based: Hi I have a stateless page which holds product datas. And it has a tab component which uses Ajax. I know a way to do it with Page Bookmarks (#tabName). But i wonder is

Re: Two wicket applications in one spring context

2007-12-22 Thread Peter Ertl
I wouldn't separate that but put admin and user into one application. - same code base (easy sharing) - no two web sessions that need to be linked - easy deployment you my 2ct Am 22.12.2007 um 11:12 schrieb Per Newgro: Hi * i try to adapt the phonebook example to my needs. What i try to

Re: How to get session from panel ?

2007-12-20 Thread Peter Ertl
Looks interesting... MySession.get() Will this reliably work in WicketTester or are there implication you should be aware of? Regards Peter Am 20.12.2007 um 10:27 schrieb Sebastiaan van Erk: Or Session.get(), or better yet use MySession.get() where in MySession you define the static

Re: Custom styles for trees

2007-12-12 Thread Peter Ertl
You could submit a suggestion on jira... After all this is open source :-) Am 12.12.2007 um 23:39 schrieb Loren Cole: Ah! thank you. I apologize if I'm resurrecting a dead horse, but why isn't this done with css? I saw some discussion about it from last summer, but the last comment in

<    1   2