Re: Re: [Wicket-user] My take on Spring integration
round 1 of refactoring is in. its much more elegant now. feedback please. -Igor On 11/8/05, Igor Vaynberg [EMAIL PROTECTED] wrote: thats pretty much exactly what i was thinking. -Igor On 11/8/05, Christian Essl [EMAIL PROTECTED] wrote: Very good. I am still playing around with the writeReplace thing.Regarding the refactoring what do you thing about this:Instead of the ISpringContextLocator have ainterface ObjectResolverFactory{ ObjectResolver getObjectResolver(Field field);}interface ObjectResolver{ Object resolve();}The (Spring)Initializer than calls for *each* field theObjectResolverFactory. If the ObjectResolverFactory thinks the field is suitable for injection (ie has a SpringBean Annotation or JNDI Annotation)it returns an ObjectResolver otherwise null.And the code which creates the proxy could than beProxyCreator.create(Class proxyType, ObjectResolver res). This would than make my wrapping context very simple.Thanks,ChristianOn Tue, 8 Nov 2005 13:45:31 -0800, Igor Vaynberg [EMAIL PROTECTED] wrote: ok, got the pure cglib solution working. just had to call enhancer.setInterfaces(new Class[] { Serializable.class}) to weave in the serializable interface. now it appears everything is working. sweet. i am going to do a lot of refactoring today. maybe you can make your wrappingcontext use the same proxies as this thing so we can keep it all in one place. -Igor On 11/8/05, Igor Vaynberg [EMAIL PROTECTED] wrote: I would rather weave it in using cglib and stay away from a spring-specific proxy impl, becuase this thing can easily be generalized to things beyound spring, like jndi lookups, etc. -Igor On 11/8/05, Christian Essl [EMAIL PROTECTED] wrote: On Tue, 8 Nov 2005 11:59:22 -0800, Igor Vaynberg [EMAIL PROTECTED] wrote: Im still getting a class cast exception using cglib directly. im probably doing something dumb, you want to take a look? SpringInitializer line 61 is commented out, thats where proxies are created for concrete objects. I think the problem is in the SpringLazyLookupInterceptor.intercept () method you should at the end call proxy.invoke(target, args) instead of proxy.invokeSuper(). invokeSuper expects that the given argument is the enhanced instance. You need it to call methods on the super (original) class. By the way, the spring one works fine IF the dependency implements Serializable, because then the proxy itself becomes serializable since its a subclass. so im wondering if we can just weave in that interface into the created subclass and that will solve our problem. what do you think? That seems reasonable. I'll post a question on the spring list and see what they say. Christian -Igor On 11/8/05, Christian Essl [EMAIL PROTECTED] wrote: I do not know wheter read/writeObject is called on objects referenced from session attributes (full serialization closure). However the spec does not speak about writeReplace() and readResolve() so 'legaly' you should be on the right side if you rely on these. Enclosed is some code which I guess does what is described on the cglib howto page. I have not tested the code yet. I'll try to do so until tomorrow. Anyway is it so important to inject objects without interfaces? Christian On Tue, 8 Nov 2005 09:07:24 -0800, Igor Vaynberg [EMAIL PROTECTED] wrote: got the proxies for concrete objects working, but another dead endunfortunately. seems cglib proxies are not serializable objects. intheirhowto they recommend overriding read/write resolve and reconstructing theproxy, but those are not guaranteed to be called when nonstandard serialization is used. not sure where to go from here -Igor -- Christian Essl ___ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --Christian Essl ___Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___ Wicket-user mailing list
Re: [Wicket-user] i18n messages in HTML
I'm all for making things easier for the user. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span I'm not sure this makes sense. wicket:id is not a text to be displayed anywhere. It is a name which identifies a component. It definitely won't work. Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and append it to the list of existing ones invoked by MarkupFilter. However you won't be able to handle message: within a tag body; only tag attributes. How does Tapestry do it for body text? An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache. How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it? Lets say your message must contain a reference some other data, e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer to cover everything else. Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only. And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover minor changes in the layout due to labels being of differents length; right-to-left languages etc. Juergen On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote: In my app I never hard-code text so I'm constantly adding Labels to my pages. I was wondering if it would make sense to have a shortcut, similar to how Tapestry does it, for dsplaying localization messages. In Tapestry, you can do this: title=message:page-title, where page-title is the lookup into the property file. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / Thoughts? --Andrew --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] where do I put controller/dispatcher logic?
Hello, On 11/7/05, Steven McNeel [EMAIL PROTECTED] wrote: I consider this sort of thing as analogous to MVC Front Controller (aka Dispatcher) logic. I'm basically unclear as to where that logic belongs in a Wicket app. The fact is, while I'm still new in the area of Components based web frameworks, I think there is a mismatch between the Model 2 way of doing things and the Component oriented way ... ? Could you precise your need ? Because you original post was so general I may have missed the point ? thanks, -- laurent --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] PageableGridDataView and IDataProvider
PageableGridDataView is not GridView in extensions. there are only minor incompatibilities with the old dataview package so you should have no problems migrating. the dataview project is no longer in wicket-stuff cvs btw. -Igor On 11/8/05, Eelco Hillenius [EMAIL PROTECTED] wrote: I don't know much about that package, but afaik the dataview projectwill be dropped in favor of the extensions project.EelcoOn 11/8/05, Gili [EMAIL PROTECTED] wrote: Hi, I'm trying to use recompile code that uses PageableGridDataView which used to work. The problem is that PageableGridDataView has a constructor which takes in wicket.contrib.dataview.IDataProvider in its constructor but HibernateDataProvider now extends wicket.extensions.markup.html.repeater.data.IDataProvider. The two are not compatible. Did you guys plan on dropping wicket.contrib.dataview.IDataProvider in favor of the extensions one? If so, can someone please update PageableGridDataView so this will work? Thank you, Gili -- http://www.desktopbeautifier.com/ --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Re: Validation messages
Sorry, you were right. YES, overriding of validation messages now works as expected. BUT overring of other messages doesn't work any longer. Example: APage - XPanel x - DropDownChoice y Now the string resource for a displayValue 0 will be searched in the following order: APage.properties: - x.y.y.0 - y.0 XPanel.properties - y.y.0 - y.0 This is caused by the following slight difference: - AbstractChoice getLocalizer().getString(getId() + . + displayValue,this,displayValue); - AbstractValidator localizer.getString(resourceKey, formComponent.getParent(),resourceModel, ); Both use the id of the component as a prefix in the resourceKey. But AbstractChoice resolves the string against itself, while AbstractValidator resolves it against the parent of the component. IMHO the id shouldn't be included in the resourcekey, this is now done by ComponentStringResourceLoader anyway. But perhaps you prefer another solution - at least it has to be consistent. Sven It works on my side. I created unit tests and I think they are ok. I enabled logging for the package and it doesn't happen. I tested the formInput example and it works without changes. Did you update AbstractValidator as well? Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Validation messages
I think you are right. I didn't know it is used in AbstractChoice as well (and there seems to be no test for it either). Juergen On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, you were right. YES, overriding of validation messages now works as expected. BUT overring of other messages doesn't work any longer. Example: APage - XPanel x - DropDownChoice y Now the string resource for a displayValue 0 will be searched in the following order: APage.properties: - x.y.y.0 - y.0 XPanel.properties - y.y.0 - y.0 This is caused by the following slight difference: - AbstractChoice getLocalizer().getString(getId() + . + displayValue,this,displayValue); - AbstractValidator localizer.getString(resourceKey, formComponent.getParent(),resourceModel, ); Both use the id of the component as a prefix in the resourceKey. But AbstractChoice resolves the string against itself, while AbstractValidator resolves it against the parent of the component. IMHO the id shouldn't be included in the resourcekey, this is now done by ComponentStringResourceLoader anyway. But perhaps you prefer another solution - at least it has to be consistent. Sven It works on my side. I created unit tests and I think they are ok. I enabled logging for the package and it doesn't happen. I tested the formInput example and it works without changes. Did you update AbstractValidator as well? Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: Validation messages
and there are about 5 more source to be modified. Juergen On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: I think you are right. I didn't know it is used in AbstractChoice as well (and there seems to be no test for it either). Juergen On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, you were right. YES, overriding of validation messages now works as expected. BUT overring of other messages doesn't work any longer. Example: APage - XPanel x - DropDownChoice y Now the string resource for a displayValue 0 will be searched in the following order: APage.properties: - x.y.y.0 - y.0 XPanel.properties - y.y.0 - y.0 This is caused by the following slight difference: - AbstractChoice getLocalizer().getString(getId() + . + displayValue,this,displayValue); - AbstractValidator localizer.getString(resourceKey, formComponent.getParent(),resourceModel, ); Both use the id of the component as a prefix in the resourceKey. But AbstractChoice resolves the string against itself, while AbstractValidator resolves it against the parent of the component. IMHO the id shouldn't be included in the resourcekey, this is now done by ComponentStringResourceLoader anyway. But perhaps you prefer another solution - at least it has to be consistent. Sven It works on my side. I created unit tests and I think they are ok. I enabled logging for the package and it doesn't happen. I tested the formInput example and it works without changes. Did you update AbstractValidator as well? Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: Re: [Wicket-user] My take on Spring integration
Unfortunately the public cvs is late so I can't see your changes yet. Anyway before I've read this mail I started on reworking the proxing code (attached). SerializableLazyProxyCreator is the only thing with content the others are interfaces and one (basic) test. There are quite some changes: - uses as now as said yesterday an ObjectResolver (I've to check with your refactoring) - fixed differend bugs in my original writeReplace/resolve code of the CGLIB proxy - JDK and CGLIB proxies implement LazyInitProxy. This can be useful to see if an object is already a lazy init proxy and to get the ObjectResolver from it (the cglib intercepors don't have to be serialziable anymore). - JDK and CLGIB: added handling of equals/hashCode methods (compares the proxy for identity - instead of forwarind to the target) - CGLIB: truned of the forward of the other Object methods to the target (especially finalize()) - exactly like for JDK proxies (toString() is forwarded) - JDK proxies: better method invocation exception handling - JDK and CGLIB: when the result of a method call is the target itself it returns the proxy (at least one point of leaking of the target can be excluded) - I don't serialize the class but the class name and get it from the context ClassLoader - is this ok? - and finally all is now in one class which automatically makes either a cglib or class proxy (don't know wheter this is good) There is also a rudimentary test case, which however only tests the CGLIB thing. There are also some println statements still in the code (it is hard to properly unit test the writeReplace/readResolve methods). Christian On Wed, 9 Nov 2005 00:20:32 -0800, Igor Vaynberg [EMAIL PROTECTED] wrote: round 1 of refactoring is in. its much more elegant now. feedback please. -Igor SerializableLazyProxyCreator.java Description: Binary data LazyInitProxy.java Description: Binary data ObjectResolver.java Description: Binary data SerializableLazyProxyCreatorTest.java Description: Binary data
Re: [Wicket-user] simple bookmarkable url
I understand. That is why I suggested a url that was more like a typicalurl (no page=) and did not require any special configuration by the developer. Another possibility would be to override Page2.html to mean bookmarkablePage=wicket.examples.template.Page2 so that url: http://www.wicket-library.com/wicket-examples/template/Page2.html is the same as: http://www.wicket-library.com/wicket-examples/template?bookmarkablePage=wicket.examples.template.Page2 Jeff Igor Vaynberg [EMAIL PROTECTED] wrote: you can create a regular _expression_ to go from page=name to bookmarkablePage=namethat along with page aliases whill get you where you want to gowe are concentrating our efforts on 1.2. your request is pretty simple to implement, but we are trying to figure out how to create pluggable and flexible url handlers for 1.2 so that you will be able to do that yourself. everyone has a different idea of how they want their urls to look. today we add page=name, tomorrow someone asks for p=name and so on and so forth. so instead of doing this case by case we are figuring out how to have something general that is easy to customize.-Igor On 11/8/05, Jeff Miller [EMAIL PROTECTED] wrote: Thanks.I'll take a look.With the proper regular _expression_, I maybe able to affect any url.I don't want to program a rule for eachurl.I was hoping you Wicket developers would tell me that my proposal was faily simple to add to Wicket.I was looking for the simple url's tobe as easy and automatic as other Wicket features [no XMLconfiguration :) ]Jeff--- Igor Vaynberg [EMAIL PROTECTED] wrote: or use a url rewriting filter like http://tuckey.org/urlrewrite/ -Igor On 11/8/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: you know you can have that today by implementing it yourself? Take a look WebRequestCrawlerSave and you'll see that you can easily change bookmarkablePage to page; you can make it case insensitive etc. Juergen On 11/8/05, Dan Gould [EMAIL PROTECTED] wrote: Jeff Miller wrote:I considered recommending "page=". It would be better than"bookmarkablePage=". Allowing "page=" in conjunction with alias wouldcertainly allow simpler urls. +1 ---SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click h ere to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user Jeff Miller[EMAIL PROTECTED]__Yahoo! Mail - PC Magazine Editors' Choice 2005http://mail.yahoo.com--- SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42" plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-userJeff Miller[EMAIL PROTECTED] Yahoo! FareChase - Search multiple travel sites in one click.
Re: [Wicket-user] i18n messages in HTML
Juergen Donnerstag wrote: I'm all for making things easier for the user. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span I'm not sure this makes sense. wicket:id is not a text to be displayed anywhere. It is a name which identifies a component. It definitely won't work. Actually, maybe this is not the solution but a way to specify i18n message keys directly in the html through a wicket tag would be VERY handy. Now, in a project I'm working on, for a i18n input form, half of the form elements are i18n labels that I add to the form in java code. Instead of add(new I18nLabel(lbl, hello.mesage)) and span wicket:id=lbl / it would be more handy to have 'something like' span wicket:message=hello.message /span or wicket:message key=hello.message /, w/o poluting java code with i18n keys if it's not necessary (like when you need to compose complex i18n messages which would be done from the code). Just a thought :-) (or maybe I am too intoxicated with Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.) Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and append it to the list of existing ones invoked by MarkupFilter. However you won't be able to handle message: within a tag body; only tag attributes. How does Tapestry do it for body text? An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache. How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it? Lets say your message must contain a reference some other data, e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer to cover everything else. Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only. And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover minor changes in the layout due to labels being of differents length; right-to-left languages etc. Juergen On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote: In my app I never hard-code text so I'm constantly adding Labels to my pages. I was wondering if it would make sense to have a shortcut, similar to how Tapestry does it, for dsplaying localization messages. In Tapestry, you can do this: title=message:page-title, where page-title is the lookup into the property file. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / Thoughts? --Andrew --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
You mean for tag text, correct? span wicket:message=hello.message / What do you think about wicket:message key=../. Than it is clear that the whole label is wicket specific, span wicket:message=key is a bit dangerous because how would we handle span wicket:id=myLabel wicket:message=key? Juergen On 11/9/05, Dorel Vaida [EMAIL PROTECTED] wrote: Juergen Donnerstag wrote: I'm all for making things easier for the user. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span I'm not sure this makes sense. wicket:id is not a text to be displayed anywhere. It is a name which identifies a component. It definitely won't work. Actually, maybe this is not the solution but a way to specify i18n message keys directly in the html through a wicket tag would be VERY handy. Now, in a project I'm working on, for a i18n input form, half of the form elements are i18n labels that I add to the form in java code. Instead of add(new I18nLabel(lbl, hello.mesage)) and span wicket:id=lbl / it would be more handy to have 'something like' span wicket:message=hello.message /span or wicket:message key=hello.message /, w/o poluting java code with i18n keys if it's not necessary (like when you need to compose complex i18n messages which would be done from the code). Just a thought :-) (or maybe I am too intoxicated with Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.) Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and append it to the list of existing ones invoked by MarkupFilter. However you won't be able to handle message: within a tag body; only tag attributes. How does Tapestry do it for body text? An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache. How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it? Lets say your message must contain a reference some other data, e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer to cover everything else. Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only. And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover minor changes in the layout due to labels being of differents length; right-to-left languages etc. Juergen On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote: In my app I never hard-code text so I'm constantly adding Labels to my pages. I was wondering if it would make sense to have a shortcut, similar to how Tapestry does it, for dsplaying localization messages. In Tapestry, you can do this: title=message:page-title, where page-title is the lookup into the property file. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / Thoughts? --Andrew --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___
Re: [Wicket-user] i18n messages in HTML
Thanks for the response. How are your questions related to i18n messages? Sorry I missunderstood the i18n question. I read the preprocessing of the tag-body you mentioned and thought - well the wrong thing. Thanks, Christian ___ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
I think wicket:message key=../ would fit well with our other wicket tags, e.g wicket:panel. IMHO such an addition would be very useful. Sven You mean for tag text, correct? span wicket:message=hello.message / What do you think about wicket:message key=../. Than it is clear that the whole label is wicket specific, span wicket:message=key is a bit dangerous because how would we handle span wicket:id=myLabel wicket:message=key? Juergen On 11/9/05, Dorel Vaida [EMAIL PROTECTED] wrote: Juergen Donnerstag wrote: I'm all for making things easier for the user. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span I'm not sure this makes sense. wicket:id is not a text to be displayed anywhere. It is a name which identifies a component. It definitely won't work. Actually, maybe this is not the solution but a way to specify i18n message keys directly in the html through a wicket tag would be VERY handy. Now, in a project I'm working on, for a i18n input form, half of the form elements are i18n labels that I add to the form in java code. Instead of add(new I18nLabel(lbl, hello.mesage)) and span wicket:id=lbl / it would be more handy to have 'something like' span wicket:message=hello.message /span or wicket:message key=hello.message /, w/o poluting java code with i18n keys if it's not necessary (like when you need to compose complex i18n messages which would be done from the code). Just a thought :-) (or maybe I am too intoxicated with Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.) Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and append it to the list of existing ones invoked by MarkupFilter. However you won't be able to handle message: within a tag body; only tag attributes. How does Tapestry do it for body text? An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache. How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it? Lets say your message must contain a reference some other data, e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer to cover everything else. Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only. And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover minor changes in the layout due to labels being of differents length; right-to-left languages etc. Juergen On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote: In my app I never hard-code text so I'm constantly adding Labels to my pages. I was wondering if it would make sense to have a shortcut, similar to how Tapestry does it, for dsplaying localization messages. In Tapestry, you can do this: title=message:page-title, where page-title is the lookup into the property file. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / Thoughts? --Andrew --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a
Re: [Wicket-user] PageableGridDataView and IDataProvider
That worked, thanks :) Gili Igor Vaynberg wrote: oops, not=now. -Igor On 11/8/05, *Igor Vaynberg* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: PageableGridDataView is not GridView in extensions. there are only minor incompatibilities with the old dataview package so you should have no problems migrating. the dataview project is no longer in wicket-stuff cvs btw. -Igor On 11/8/05, *Eelco Hillenius* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I don't know much about that package, but afaik the dataview project will be dropped in favor of the extensions project. Eelco On 11/8/05, Gili [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I'm trying to use recompile code that uses PageableGridDataView which used to work. The problem is that PageableGridDataView has a constructor which takes in wicket.contrib.dataview.IDataProvider in its constructor but HibernateDataProvider now extends wicket.extensions.markup.html.repeater.data.IDataProvider. The two are not compatible. Did you guys plan on dropping wicket.contrib.dataview.IDataProvider in favor of the extensions one? If so, can someone please update PageableGridDataView so this will work? Thank you, Gili -- http://www.desktopbeautifier.com/ --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user https://lists.sourceforge.net/lists/listinfo/wicket-user -- http://www.desktopbeautifier.com/ --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
I like wicket:message key=../ as long as it would work how normal JSP tags currently work. In other words, I would be able to do this:input type=button value=wicket:message key='labelKey'// orscript alert(wicket:message key='labelKey'/);/script--AndrewOn 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I think wicket:message key=../ would fit well with our other wicket tags, e.g wicket:panel.IMHO such an addition would be very useful.SvenYou mean for tag text, correct? span wicket:message= hello.message /What do you think about wicket:message key=../.Than it is clearthat the whole label is wicket specific,span wicket:message=key is a bit dangerous because how would we handle span wicket:id=myLabel wicket:message=key?JuergenOn 11/9/05, Dorel Vaida [EMAIL PROTECTED] wrote: Juergen Donnerstag wrote: I'm all for making things easier for the user.Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/spanI'm not sure this makes sense. wicket:id is not a text to be displayed anywhere. It is a name which identifies a component. It definitely won't work. Actually, maybe this is not the solution but a way to specify i18n message keys directly in the html through a wicket tag would be VERY handy. Now, in a project I'm working on,for a i18n input form, half of the form elements are i18n labels that I add to the form in java code. Instead of add(new I18nLabel(lbl, hello.mesage)) and span wicket:id=lbl / it would be more handy to have 'something like' span wicket:message= hello.message /span or wicket:message key=hello.message /,w/o poluting java code with i18n keys if it's not necessary (like when you need to compose complexi18n messages which would be done from the code). Just a thought :-) (or maybe I am too intoxicated with Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.) Even better would be that it would recognize the message:label anywherein the HTML.So for example, you could have: input type=submit value=message: label.submit /That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and append it to the list of existing ones invoked by MarkupFilter. However you won't be able to handle message: within a tag body; only tag attributes. How does Tapestry do it for body text? An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache. How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it? Lets say your message must contain a reference some other data, e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer to cover everything else. Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only. And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover minor changes in the layout due to labels being of differents length; right-to-left languages etc. Juergen On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote: In my app I never hard-code text so I'm constantly adding Labels to my pages.I was wondering if it would make sense to have a shortcut, similar to how Tapestry does it, for dsplaying localization messages.InTapestry, you can do this: title=message:page-title, where page-title is the lookup into the property file. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span Even better would be that it would recognize the message:label anywherein the HTML.So for example, you could have: input type=submit value=message: label.submit / Thoughts? --Andrew --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user--- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work. In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or script alert(wicket:message key='labelKey'/); /script No, that was not the intend and I don't like it either. wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=button value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll realy work, because you kind of have to analyze JS. script alert(message:key='labelKey'/); /script Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in _javascript_ would be ok, but I think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS. scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___ Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
i can live with: wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard. Because then we have to parse the complete xml and see if in any attribute something starts with message:key even for non wicket tags as above? johan On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in _javascript_ would be ok, but I think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS. scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___ Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] validators that depends of multiple inputs
http://thread.gmane.org/gmane.comp.java.wicket.user/5512On 11/9/05, pepone pepone [EMAIL PROTECTED] wrote:Hello Is posible in wicket make validation that´s depend on multiple imputsthe simple use case is password match re-passwordother can be input a need to be biger/lesser that input b--- SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard. Because then we have to parse the complete xml and see if in any attribute something starts with message:key even for non wicket tags as above? we have to do it anyway to identify wicket tags. Only analyzing the attributes would be on top Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Hmmmwell, I do think it would provide value to have the attribute way as well. How much slower do you think it is going to make it? Anyone else have any suggestions? --AndrewOn 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote:i can live with: wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard. Because then we have to parse the complete xml and see if in any attribute something starts with message:key even for non wicket tags as above? johan On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in _javascript_ would be ok, but I think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS. scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___ Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
We have different options (as explained in my first mail) - do the replacement while loading the markup, prior to xml reading it. The cached version will have the messages replaced - analyze the attributes while reading xml. The cached version will have the messages replaced for the attrbutes. wicket:message will be executed at render time - do the replacement after rendering the page. Some kind of post-processing Not sure yet what the best approach is Juergen On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Hmmmwell, I do think it would provide value to have the attribute way as well. How much slower do you think it is going to make it? Anyone else have any suggestions? --Andrew On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: i can live with: wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard. Because then we have to parse the complete xml and see if in any attribute something starts with message:key even for non wicket tags as above? johan On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in JavaScript would be ok, but I think there definitely needs to be a way to do it in attributes. Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html --Andrew On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work. In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or script alert(wicket:message key='labelKey'/); /script No, that was not the intend and I don't like it either. wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=button value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll realy work, because you kind of have to analyze JS. script alert(message:key='labelKey'/); /script Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
if you do the replacement at parse time. then every html in the markup cache is specified by a locale? (even if there is not locale in the name of the html) To me it looks like that wicket:message can only be executed at runtime because then the locale is know But we could store one for every locale we encouter if that is faster/better somehow johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: We have different options (as explained in my first mail)- do the replacement while loading the markup, prior to xml readingit. The cached version will have the messages replaced- analyze the attributes while reading xml. The cached version will have the messages replaced for the attrbutes. wicket:message will beexecuted at render time- do the replacement after rendering the page. Some kind of post-processingNot sure yet what the best approach is JuergenOn 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Hmmmwell, I do think it would provide value to have the attribute way as well.How much slower do you think it is going to make it?Anyone else have any suggestions?--Andrew On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: i can live with: wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard. Because then we have to parse the complete xml and see if in any attribute something starts with message:key even for non wicket tags as above? johan On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:Well, I guess not being able to do it in _javascript_ would be ok, but I think there definitely needs to be a way to do it in attributes. Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html --Andrew On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or script alert(wicket:message key='labelKey'/); /script No, that was not the intend and I don't like it either. wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=button value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll realy work, because you kind of have to analyze JS. script alert(message:key='labelKey'/); /script Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: AW: Re: [Wicket-user] My take on Spring integration
Looks like I've missed the part of where is this work available. Is it a way to access it? ./alex -- .w( the_mindstorm )p. --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Johan Compagner wrote: i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does. It breaks the previewability of pages which is one of Wicket's hallmarks. How about something like input type=button value=My Val wicket:attr=value:message:my-key/ or wicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...) -- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: if you do the replacement at parse time. then every html in the markup cache is specified by a locale? (even if there is not locale in the name of the html) Thats already the case. The markup id includes locale style etc. But multiple entries may reference the same markup file. To me it looks like that wicket:message can only be executed at runtime because then the locale is know But it is known at markup load time as well. We even take it into consideration to search for the proper markup file: name_locale_style.html But we could store one for every locale we encouter if that is faster/better somehow johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: We have different options (as explained in my first mail) - do the replacement while loading the markup, prior to xml reading it. The cached version will have the messages replaced - analyze the attributes while reading xml. The cached version will have the messages replaced for the attrbutes. wicket:message will be executed at render time - do the replacement after rendering the page. Some kind of post-processing Not sure yet what the best approach is Juergen On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Hmmmwell, I do think it would provide value to have the attribute way as well. How much slower do you think it is going to make it? Anyone else have any suggestions? --Andrew On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: i can live with: wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard. Because then we have to parse the complete xml and see if in any attribute something starts with message:key even for non wicket tags as above? johan On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in JavaScript would be ok, but I think there definitely needs to be a way to do it in attributes. Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html --Andrew On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work. In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or script alert(wicket:message key='labelKey'/); /script No, that was not the intend and I don't like it either. wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=button value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll realy work, because you kind of have to analyze JS. script alert(message:key='labelKey'/); /script Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list
Re: [Wicket-user] i18n messages in HTML
good idea, except I would like to make a =. wicket:i18n=value=my-key Juergen On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote: i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does. It breaks the previewability of pages which is one of Wicket's hallmarks. How about something like input type=button value=My Val wicket:attr=value:message:my-key/ or wicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...) -- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
ok then pre process and do it at markup loading time. The only problem i see with this then that people will start to complaind that they don't see changes when they alter there messages So suddenly we also have to watch those?? johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: if you do the replacement at parse time.then every html in the markup cache is specified by a locale? (even if there is not locale in the name of the html)Thats already the case. The markup id includes locale style etc. Butmultiple entries may reference the same markup file.To me it looks like that wicket:message can only be executed at runtime because then the locale is knowBut it is known at markup load time as well. We even take it intoconsideration to search for the proper markup file:name_locale_style.html But we could store one for every locale we encouter if that is faster/better somehowjohan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: We have different options (as explained in my first mail) - do the replacement while loading the markup, prior to xml reading it. The cached version will have the messages replaced - analyze the attributes while reading xml. The cached version will have the messages replaced for the attrbutes. wicket:message will be executed at render time - do the replacement after rendering the page. Some kind of post-processing Not sure yet what the best approach is Juergen On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Hmmmwell, I do think it would provide value to have the attribute way as well.How much slower do you think it is going to make it?Anyone else have any suggestions?--Andrew On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote:i can live with: wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard.Because then we have to parse the complete xml and see if in any attribute something starts with message:keyeven for non wicket tags as above? johan On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in _javascript_ would be ok, but I think there definitely needs to be a way to do it in attributes. Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html --Andrew On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote:I like wicket:message key=../ as long as it would work how normal JSPtags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or script alert(wicket:message key='labelKey'/);/script No, that was not the intend and I don't like it either. wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=button value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll realy work, because you kind of have to analyze JS. script alert(message:key='labelKey'/); /script Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here
Re: [Wicket-user] i18n messages in HTML
then call it wicket:message=value=my-key so that wicket:message key=..Default Text/wicket:message and input type=button value=My Val wicket:message=value=my-key/ uses the same kind of notation. Als value=My Val can then be seen as the default value if the value is not found for the given locale? That would be nice i think. johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: good idea, except I would like to make a =. wicket:i18n=value=my-keyJuergenOn 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote: i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val wicket:attr=value:message:my-key/ orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...) -- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: Re: [Wicket-user] My take on Spring integration
It is in wicket-stuff under wicket-contrib-spring. And there in the wicket.contrib.spring.injection package. Christian On Thu, 10 Nov 2005 00:07:44 +0200, Alexandru Popescu [EMAIL PROTECTED] wrote: Looks like I've missed the part of where is this work available. Is it a way to access it? ./alex -- .w( the_mindstorm )p. --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Christian Essl ___ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Thats an RFE already. I'm not yet sure what the best approach is. Just thinking. Juergen On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: ok then pre process and do it at markup loading time. The only problem i see with this then that people will start to complaind that they don't see changes when they alter there messages So suddenly we also have to watch those?? johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: if you do the replacement at parse time. then every html in the markup cache is specified by a locale? (even if there is not locale in the name of the html) Thats already the case. The markup id includes locale style etc. But multiple entries may reference the same markup file. To me it looks like that wicket:message can only be executed at runtime because then the locale is know But it is known at markup load time as well. We even take it into consideration to search for the proper markup file: name_locale_style.html But we could store one for every locale we encouter if that is faster/better somehow johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: We have different options (as explained in my first mail) - do the replacement while loading the markup, prior to xml reading it. The cached version will have the messages replaced - analyze the attributes while reading xml. The cached version will have the messages replaced for the attrbutes. wicket:message will be executed at render time - do the replacement after rendering the page. Some kind of post-processing Not sure yet what the best approach is Juergen On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Hmmmwell, I do think it would provide value to have the attribute way as well. How much slower do you think it is going to make it? Anyone else have any suggestions? --Andrew On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: i can live with: wicket:message key=..Default Text/wicket:message and input type=button value=message:key=my-key/ But i think the second one will be pretty hard. Because then we have to parse the complete xml and see if in any attribute something starts with message:key even for non wicket tags as above? johan On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in JavaScript would be ok, but I think there definitely needs to be a way to do it in attributes. Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html --Andrew On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work. In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or script alert(wicket:message key='labelKey'/); /script No, that was not the intend and I don't like it either. wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=button value=message:key='labelKey'//. The following is a bit tricky and I'm not sure how well it'll realy work, because you kind of have to analyze JS. script alert(message:key='labelKey'/); /script Juergen --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your
Re: [Wicket-user] i18n messages in HTML
yesm true. do you prefer wicket:mesage or wicket:i18n? Juergen On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key so that wicket:message key=..Default Text/wicket:message and input type=button value=My Val wicket:message=value=my-key/ uses the same kind of notation. Als value=My Val can then be seen as the default value if the value is not found for the given locale? That would be nice i think. johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: good idea, except I would like to make a =. wicket:i18n=value=my-key Juergen On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote: i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does. It breaks the previewability of pages which is one of Wicket's hallmarks. How about something like input type=button value=My Val wicket:attr=value:message:my-key/ or wicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...) -- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
One more idea. How about using some reserved word for wicket:id. Like this: span wicket:id=$somereservedword$ value=message:key1 alt=message:key2/ This would create an automatic component (with a behaviour) that scans all attributes and does its magic. This could be easily extended to other scenarios too. /arto
Re: [Wicket-user] i18n messages in HTML
can't say i have a real preference. Somehow wicket:message looks better because i18n looks like capitals But that is just a feeling. And i still don't know if it is i18n or should it be l10n? (localisation) Because you do Localize youre page itself. But the template is maybe i18n On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: yesm true. do you prefer wicket:mesage or wicket:i18n?JuergenOn 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key so thatwicket:message key=..Default Text/wicket:messageand input type=button value=My Val wicket:message=value=my-key/ uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is not found for the given locale?That would be nice i think. johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: good idea, except I would like to make a =. wicket:i18n=value=my-key Juergen On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote:i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages which is one of Wicket's hallmarks. How about something like input type=button value=My Val wicket:attr=value:message:my-key/ or wicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...) -- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Other way of handle tranlations can be take and aproach simiar to Qt ui tollkit i try to explain it a bit whe you localiced and application all string in html are desired to be translate we can parser html files and assign and unique id to each string to be translate provide a singuel file for each locale with string-id=string-translation application can plug a diferent translation file depending of current locale have this make any sense? On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key so that wicket:message key=..Default Text/wicket:message and input type=button value=My Val wicket:message=value=my-key/ uses the same kind of notation. Als value=My Val can then be seen as the default value if the value is not found for the given locale? That would be nice i think. johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: good idea, except I would like to make a =. wicket:i18n=value=my-key Juergen On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote: i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does. It breaks the previewability of pages which is one of Wicket's hallmarks. How about something like input type=button value=My Val wicket:attr=value:message:my-key/ or wicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...) -- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- play tetris http://pepone.on-rez.com/tetris --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] where do I put controller/dispatcher logic?
There sure is a mismatch; component based frameworks emerged because of the mismatch Model 2 frameworks with page parts. Requests in Model 2 frameworks map to page wide actions. The controller/ view handler has to ensure the state of all elements of the page are kept in sync and rendered correctly. That's okay for simple pages, but if you have pages with multiple, independent parts (think e.g. of a pageable list being one of those) you're in a mess and generally have to use hackish solutions like command chaining and 'interception'. With component based frameworks, you should be able to create isolated parts (components) that react on events, keep state and render independently of the other parts of the page, making it easier and more elegant to write applications with, and also make reuse an option (because components are self contained). That's the whole idea of Model 2 vs CBD. Eelco On 11/9/05, Laurent PETIT [EMAIL PROTECTED] wrote: Hello, On 11/7/05, Steven McNeel [EMAIL PROTECTED] wrote: I consider this sort of thing as analogous to MVC Front Controller (aka Dispatcher) logic. I'm basically unclear as to where that logic belongs in a Wicket app. The fact is, while I'm still new in the area of Components based web frameworks, I think there is a mismatch between the Model 2 way of doing things and the Component oriented way ... ? Could you precise your need ? Because you original post was so general I may have missed the point ? thanks, -- laurent --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Using another container?
How can i use tomcat instead of Jetty? (is there a 'tomcat-config.xml' somewhere to configure?)
Re: [Wicket-user] i18n messages in HTML
Problem with that is that input type=button value=wicket:message key='labelKey'// is not valid xml. Eelco On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work. In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or script alert(wicket:message key='labelKey'/); /script --Andrew On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I think wicket:message key=../ would fit well with our other wicket tags, e.g wicket:panel. IMHO such an addition would be very useful. Sven You mean for tag text, correct? span wicket:message= hello.message / What do you think about wicket:message key=../. Than it is clear that the whole label is wicket specific, span wicket:message=key is a bit dangerous because how would we handle span wicket:id=myLabel wicket:message=key? Juergen On 11/9/05, Dorel Vaida [EMAIL PROTECTED] wrote: Juergen Donnerstag wrote: I'm all for making things easier for the user. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span I'm not sure this makes sense. wicket:id is not a text to be displayed anywhere. It is a name which identifies a component. It definitely won't work. Actually, maybe this is not the solution but a way to specify i18n message keys directly in the html through a wicket tag would be VERY handy. Now, in a project I'm working on, for a i18n input form, half of the form elements are i18n labels that I add to the form in java code. Instead of add(new I18nLabel(lbl, hello.mesage)) and span wicket:id=lbl / it would be more handy to have 'something like' span wicket:message= hello.message /span or wicket:message key=hello.message /, w/o poluting java code with i18n keys if it's not necessary (like when you need to compose complex i18n messages which would be done from the code). Just a thought :-) (or maybe I am too intoxicated with Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.) Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message: label.submit / That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and append it to the list of existing ones invoked by MarkupFilter. However you won't be able to handle message: within a tag body; only tag attributes. How does Tapestry do it for body text? An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache. How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it? Lets say your message must contain a reference some other data, e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer to cover everything else. Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only. And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover minor changes in the layout due to labels being of differents length; right-to-left languages etc. Juergen On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote: In my app I never hard-code text so I'm constantly adding Labels to my pages. I was wondering if it would make sense to have a shortcut, similar to how Tapestry does it, for dsplaying localization messages. In Tapestry, you can do this: title=message:page-title, where page-title is the lookup into the property file. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message: label.submit / Thoughts? --Andrew --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
Re: [Wicket-user] i18n messages in HTML
Hello, What about something like that: Use one of the two forms (both could be allowed): wicket:label key=my.msg.keyA text to render/wicket:label or wicket:labelmy.msg.key/wicket:label Of course, this introduces a new element in the wicket namespace ... Or something like that: span wicket:type=message key=my.msg.keyAny text you want/span or span wicket:id=message_or_whatever key=my.msg.keyAny text you want/span and create a hook in wicket (if it does not already exist) for resolution classes to handle tags with wicket:type attributes, or create a hook (if it does not alread exist) for resolution classes to let them a possibility to handle a markup with no corresponding component. Thus creating a resolver which searches for the key attribute ... More open, but may be like opening the pandora box ... ? Or, as you suggested, using hooks for specific markup modifiers before or after the wicket component rendering phase ? On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: I'm all for making things easier for the user. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span I'm not sure this makes sense. wicket:id is not a text to be displayed anywhere. It is a name which identifies a component. It definitely won't work. Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / That I think is possible. Acutally you can do it today already without any changes to the core. You need to develop a IMarkupFilter and append it to the list of existing ones invoked by MarkupFilter. However you won't be able to handle message: within a tag body; only tag attributes. How does Tapestry do it for body text? An other option would be to run a kind of text based (not xml based) pre-processor (like we do merging of inherited markup) prior to adding the markup to the cache. How likely is it that you'll find message: and it is not intended to be a i18n text? How to escape it? Lets say your message must contain a reference some other data, e.g. ...${price} That won't be possible either. Only simple text. As AttributeModifier is already able to handle it, message:.. would be for easy and straight forward replacements only, and AttributeModifer to cover everything else. Ah, and of course you loose preview capabilities, as the designer won't the real message, he'd see message:... only. And it might not the perfekt solution for high-speed up, because of the (little) performance penalties involved. For high-speed up you can still have myPage_en.html; myPage_nl.html etc may which as well cover minor changes in the layout due to labels being of differents length; right-to-left languages etc. Juergen On 11/8/05, Andrew Berman [EMAIL PROTECTED] wrote: In my app I never hard-code text so I'm constantly adding Labels to my pages. I was wondering if it would make sense to have a shortcut, similar to how Tapestry does it, for dsplaying localization messages. In Tapestry, you can do this: title=message:page-title, where page-title is the lookup into the property file. Perhaps Wicket could have something like this: span wicket:id=message:myLabelHere/span Even better would be that it would recognize the message:label anywhere in the HTML. So for example, you could have: input type=submit value=message:label.submit / Thoughts? --Andrew --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
2005/11/9, Andrew Berman [EMAIL PROTECTED]: Oh and the other nice feature would be that if you do it like this: wicket:message key=..My Text/wicket that the My Text would be the default text if the key is not found. How about using the content as the key wicket:messagekeyLabel/wicket:message? And for _javascript_, I think it could be possible to create a component that creates a _javascript_ object for the page resource (selected locale). Like this: PageX_en.properties keylabel1=Hello world! keylabel2=You are using en-locale PageX.html span wicket:id=i18n_component/ ... script function myFunc() { alert(i18n.keylabel1); alert(i18n.keylabel2); } /script generated html: script i18n = { keylabel1='Hello world!', keylabel2='You are using en-locale' }; /script script function myFunc() { alert(i18n.keylabel1); alert(i18n.keylabel2); } /script
Re: [Wicket-user] My take on Spring integration
#: Christian Essl changed the world a bit at a time by saying on 11/10/2005 12:29 AM :# It is in wicket-stuff under wicket-contrib-spring. And there in the wicket.contrib.spring.injection package. Christian Thanks a lot Christian. ./alex -- .w( the_mindstorm )p. On Thu, 10 Nov 2005 00:07:44 +0200, Alexandru Popescu [EMAIL PROTECTED] wrote: Looks like I've missed the part of where is this work available. Is it a way to access it? ./alex -- .w( the_mindstorm )p. --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Using another container?
Sure. You need nothing special for Wicket to work with any servlet container. Just configure as you like/ use plugins from your IDE. Eelco On 11/9/05, Paulo Sérgio Medeiros [EMAIL PROTECTED] wrote: How can i use tomcat instead of Jetty? (is there a 'tomcat-config.xml' somewhere to configure?) --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] replace ognl.
After rechecking the whole thread, I couldn't find out if this change got into the 1.1 release. Can somebdoy put some light onto this? thanks a lot, ./alex -- .w( the_mindstorm )p. #: Johan Compagner changed the world a bit at a time by saying on 10/27/2005 1:41 AM :# Hi I have written a replacement of OGNL when i test it with a very simple test (The FormInput example) then i see quite some improvements in cpu speedups and mem improvements Around 40% speed increase for a submitting the forminput example page 20 times and only 1/5 of the memory garbage is generated (50MB against 10MB) The question is what do you guys use of ognl? Can i completely drop it or must i make it an option so that you can switch in youre application for all using ognl or the homebrew wicket impl. Or make seperate classes (like AbstractPropertyModel) but this is not really doable because then all the sub classes must also be copied...(Like CompoundXX) What i do support now is this: person.name http://person.name (plain properties) person.addresses.0.street (addresses is a list and i take the first element) person.addresses.homeaddress.street (addresses is map and i take the address with the key 'homeaddress' out of it) so maps and list are seen and the next part of the expression is then the key or the index you can also put values in a map or append/set to a list: person.addresses.homeaddress = new Address() person.addresses.10 = new Address() if the list size is smaller then 10 then it will appends null to make it that size. addresses can also be an Array but then it won't be able to grow. Ofcourse the person.address.street will just be null if address is null, no exception will be thrown if you try to set something on a null object a exception is still thrown, Maybe we could make some null handlers for that somehow that are easy useable. So can people live with this? Does anybody uses something different of ognl? johan --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
just realized its not going to work in a hierarchy of components never mind -Igor On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote: oh and btw, rendering the same component more then once on a page will throw HEAD into an infinite loop while it works quiet well in 1.0 and 1.1. Should i write up a bug or is this part of someone's work in progress? -Igor On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote: Hmm isnt all this already possible without having to do anything? public class Message extends WebMarkupContainer { public Message(String id) { super(id); } protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { ValueMap attrs=openTag.getAttributes(); if (attrs.containsKey(wicket:message)) { String message=getLocalizer().getString(attrs.getString(wicket:message), this); replaceComponentTagBody(findMarkupStream(), openTag, message); } else { super.onComponentTagBody(markupStream, openTag); } } } this is the message component that emulates wicket:message key add it to the page and then in your page simply render it multiple times add(new Message(message)); span wicket:id=message wicket:message=res1this is message replaced 1/spanbr/ span wicket:id=message wicket:message=res2this is message replaced 2/spanbr/ something like it can also be used to do that inline attribute replacement. no postprocessing or anything like that needed if we want this to be a builtin feature we can simply add one of these to every page with some name that we reserve. -Igor On 11/9/05, pepone pepone [EMAIL PROTECTED] wrote: Other way of handle tranlations can be take and aproach simiar to Qt ui tollkiti try to explain it a bitwhe you localiced and application all string in html are desired to be translatewe can parser html files and assign and unique id to each string to be translateprovide a singuel file for each locale with string-id=string-translationapplication can plug a diferent translation file depending of current localehave this make any sense? On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key so thatwicket:message key=..Default Text/wicket:message and input type=button value=My Val wicket:message=value=my-key/uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is not found for the given locale?That would be nice i think.johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: good idea, except I would like to make a =. wicket:i18n=value=my-key Juergen On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote:i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val wicket:attr=value:message:my-key/ orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...)-- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --play tetris http://pepone.on-rez.com/tetris--- SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
You cannot really compare wicket to tapestry. Although they are both component oriented frameworks, they have completely different approaches. In wicket the focus is on java code not on the template. Wicket templates are simple and limited (purposefully) where as tapestry allows for a lot more customization from within the template. Wicket's approach makes sure all your logic is kept in code. That is the wicket way. -Igor On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: Well, I guess not being able to do it in _javascript_ would be ok, but I think there definitely needs to be a way to do it in attributes.Here is the link for how Tapestry 4.0 does it: http://jakarta.apache.org/tapestry/UsersGuide/localization.html--AndrewOn 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:On 11/9/05, Andrew Berman [EMAIL PROTECTED] wrote: I like wicket:message key=../ as long as it would work how normal JSP tags currently work.In other words, I would be able to do this: input type=button value=wicket:message key='labelKey'// or scriptalert(wicket:message key='labelKey'/); /scriptNo, that was not the intend and I don't like it either.wicket:message .. would be a normal XML tag. To retrieve a i18n message for a tag attribute I'd go for input type=buttonvalue=message:key='labelKey'//.The following is a bit tricky and I'm not sure how well it'll realywork, because you kind of have to analyze JS. scriptalert(message:key='labelKey'/);/scriptJuergen---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___ Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] validators that depends of multiple inputs
see if this thread helps. http://thread.gmane.org/gmane.comp.java.wicket.user/5512 -Igor On 11/9/05, pepone pepone [EMAIL PROTECTED] wrote: HelloIs posible in wicket make validation that´s depend on multiple imputsthe simple use case is password match re-passwordother can be input a need to be biger/lesser that input b--- SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
oh and btw, rendering the same component more then once on a page will throw HEAD into an infinite loop while it works quiet well in 1.0 and 1.1. Should i write up a bug or is this part of someone's work in progress? -Igor On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote: Hmm isnt all this already possible without having to do anything? public class Message extends WebMarkupContainer { public Message(String id) { super(id); } protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { ValueMap attrs=openTag.getAttributes(); if (attrs.containsKey(wicket:message)) { String message=getLocalizer().getString(attrs.getString(wicket:message), this); replaceComponentTagBody(findMarkupStream(), openTag, message); } else { super.onComponentTagBody(markupStream, openTag); } } } this is the message component that emulates wicket:message key add it to the page and then in your page simply render it multiple times add(new Message(message)); span wicket:id=message wicket:message=res1this is message replaced 1/spanbr/ span wicket:id=message wicket:message=res2this is message replaced 2/spanbr/ something like it can also be used to do that inline attribute replacement. no postprocessing or anything like that needed if we want this to be a builtin feature we can simply add one of these to every page with some name that we reserve. -Igor On 11/9/05, pepone pepone [EMAIL PROTECTED] wrote: Other way of handle tranlations can be take and aproach simiar to Qt ui tollkiti try to explain it a bitwhe you localiced and application all string in html are desired to be translatewe can parser html files and assign and unique id to each string to be translateprovide a singuel file for each locale with string-id=string-translationapplication can plug a diferent translation file depending of current localehave this make any sense? On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-key so thatwicket:message key=..Default Text/wicket:message and input type=button value=My Val wicket:message=value=my-key/uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is not found for the given locale?That would be nice i think.johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: good idea, except I would like to make a =. wicket:i18n=value=my-key Juergen On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote:i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val wicket:attr=value:message:my-key/ orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...)-- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --play tetris http://pepone.on-rez.com/tetris--- SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] replace ognl.
no this is 1.2On 11/10/05, Alexandru Popescu [EMAIL PROTECTED] wrote: After rechecking the whole thread, I couldn't find out if this change got into the 1.1 release. Cansomebdoy put some light onto this?thanks a lot,./alex--.w( the_mindstorm )p.#: Johan Compagner changed the world a bit at a time by saying on10/27/2005 1:41 AM :# Hi I have written a replacement of OGNL when i test it with a very simple test (The FormInput example) then i see quite some improvements in cpu speedups and mem improvements Around 40% speed increase for a submitting the forminput example page 20 times and only 1/5 of the memory garbage is generated (50MB against 10MB) The question is what do you guys use of ognl? Can i completely drop it or must i make it an option so that you can switch in youre application for all using ognl or the homebrew wicket impl. Or make seperate classes (like AbstractPropertyModel) but this is not really doable because then all the sub classes must also be copied...(Like CompoundXX) What i do support now is this: person.name http://person.name (plain properties) person.addresses.0.street (addresses is a list and i take the first element) person.addresses.homeaddress.street (addresses is map and i take the address with the key 'homeaddress' out of it) so maps and list are seen and the next part of the _expression_ is then the key or the index you can also put values in a map or append/set to a list: person.addresses.homeaddress = new Address() person.addresses.10 = new Address() if the list size is smaller then 10 then it will appends null to make it that size. addresses can also be an Array but then it won't be able to grow. Ofcourse the person.address.street will just be null if address is null, no exception will be thrown if you try to set something on a null object a exception is still thrown, Maybe we could make some null handlers for that somehow that are easy useable. So can people live with this? Does anybody uses something different of ognl? johan---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] replace ognl.
#: Johan Compagner changed the world a bit at a time by saying on 11/10/2005 2:05 AM :# no this is 1.2 Thanks Johan. ./alex -- .w( the_mindstorm )p. On 11/10/05, Alexandru Popescu [EMAIL PROTECTED] wrote: After rechecking the whole thread, I couldn't find out if this change got into the 1.1 release. Can somebdoy put some light onto this? thanks a lot, ./alex -- .w( the_mindstorm )p. #: Johan Compagner changed the world a bit at a time by saying on 10/27/2005 1:41 AM :# Hi I have written a replacement of OGNL when i test it with a very simple test (The FormInput example) then i see quite some improvements in cpu speedups and mem improvements Around 40% speed increase for a submitting the forminput example page 20 times and only 1/5 of the memory garbage is generated (50MB against 10MB) The question is what do you guys use of ognl? Can i completely drop it or must i make it an option so that you can switch in youre application for all using ognl or the homebrew wicket impl. Or make seperate classes (like AbstractPropertyModel) but this is not really doable because then all the sub classes must also be copied...(Like CompoundXX) What i do support now is this: person.name http://person.name http://person.name (plain properties) person.addresses.0.street (addresses is a list and i take the first element) person.addresses.homeaddress.street (addresses is map and i take the address with the key 'homeaddress' out of it) so maps and list are seen and the next part of the expression is then the key or the index you can also put values in a map or append/set to a list: person.addresses.homeaddress = new Address() person.addresses.10 = new Address() if the list size is smaller then 10 then it will appends null to make it that size. addresses can also be an Array but then it won't be able to grow. Ofcourse the person.address.street will just be null if address is null, no exception will be thrown if you try to set something on a null object a exception is still thrown, Maybe we could make some null handlers for that somehow that are easy useable. So can people live with this? Does anybody uses something different of ognl? johan --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Hmm isnt all this already possible without having to do anything? public class Message extends WebMarkupContainer { public Message(String id) { super(id); } protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { ValueMap attrs=openTag.getAttributes(); if (attrs.containsKey(wicket:message)) { String message=getLocalizer().getString(attrs.getString(wicket:message), this); replaceComponentTagBody(findMarkupStream(), openTag, message); } else { super.onComponentTagBody(markupStream, openTag); } } } this is the message component that emulates wicket:message key add it to the page and then in your page simply render it multiple times add(new Message(message)); span wicket:id=message wicket:message=res1this is message replaced 1/spanbr/ span wicket:id=message wicket:message=res2this is message replaced 2/spanbr/ something like it can also be used to do that inline attribute replacement. no postprocessing or anything like that needed if we want this to be a builtin feature we can simply add one of these to every page with some name that we reserve. -Igor On 11/9/05, pepone pepone [EMAIL PROTECTED] wrote: Other way of handle tranlations can be take and aproach simiar to Qt ui tollkiti try to explain it a bitwhe you localiced and application all string in html are desired to be translatewe can parser html files and assign and unique id to each string to be translateprovide a singuel file for each locale with string-id=string-translationapplication can plug a diferent translation file depending of current localehave this make any sense? On 11/9/05, Johan Compagner [EMAIL PROTECTED] wrote: then call it wicket:message=value=my-keyso thatwicket:message key=..Default Text/wicket:message and input type=button value=My Val wicket:message=value=my-key/uses the same kind of notation.Als value=My Val can then be seen as the default value if the value is not found for the given locale?That would be nice i think.johan On 11/9/05, Juergen Donnerstag [EMAIL PROTECTED] wrote: good idea, except I would like to make a =. wicket:i18n=value=my-key Juergen On 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote:i can live with: wicket:message key=..Default Text/wicket:message This makes sense. input type=button value=message:key=my-key/ I don't think this one does.It breaks the previewability of pages which is one of Wicket's hallmarks. How about something likeinput type=button value=My Val wicket:attr=value:message:my-key/ orwicket:i18n=value:my-key Wicket could then replace the value attribute entirely, but the preview is still available. This could also contain a comma-separated list of attribute-name/attribute-value-keys if there are multiple attributes to replace (not that I can think of a use-case right now...)-- Scott --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --play tetris http://pepone.on-rez.com/tetris--- SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Multlevel extension does not seem to work
Hi, I am trying to use wicket:extend mechanism to share common functionality between pages and it seem to work only with one level of hierarchy. When I add another level, I get error (pasted below). Am I doing something incorrectly? Here is code to reproduce the behavior: Base.html: html body span wicket:id="baseLabel"base label/span wicket:child/ /body /html Sub.html: html body wicket:extend span wicket:id="subLabel"sub label/span /wicket:extend wicket:child/ /body /html SubSub.html: html body wicket:extend pSub sub/p /wicket:extend /body /html Base.java: package com.aspectivity.wicket.bugs; import wicket.markup.html.WebPage; import wicket.markup.html.basic.Label; public class Base extends WebPage { public Base() { add(new Label("baseLabel", "This is label added by base")); } } Sub.java: package com.aspectivity.wicket.bugs; import wicket.markup.html.basic.Label; public class Sub extends Base { public Sub() { add(new Label("subLabel", "This is label added by sub")); } } SubSub.java: package com.aspectivity.wicket.bugs; public class SubSub extends Sub { } With this code, I get the following exception: wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'com.aspectivity.wicket.bugs.SubSub' not found. Enable debug messages for wicket.util.resource.Resource to get a list of all filenames tried: [Page class = com.aspectivity.wicket.bugs.SubSub, id = 0] at wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:720) at wicket.Page.onRender(Page.java:778) at wicket.Component.render(Component.java:1163) at wicket.Page.doRender(Page.java:251) at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:276) at wicket.RequestCycle.respond(RequestCycle.java:934) at wicket.RequestCycle.request(RequestCycle.java:411) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511) Caused by: wicket.WicketRuntimeException: Expected to find wicket:child/ in base markup at wicket.markup.InheritedMarkupMerger.mergeMarkups(InheritedMarkupMerger.java:209) at wicket.markup.MarkupCache.checkForMarkupInheritance(MarkupCache.java:418) at wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:225) at wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:300) at wicket.markup.MarkupCache.getMarkup(MarkupCache.java:183) at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:100) at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:83) at wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:710) ... 22 more Component Tree Component tree for [Page class = com.aspectivity.wicket.bugs.SubSub, id = 0]: # Path Type Model Object 1 baseLabel wicket.markup.html.basic.Label This is label added by base 2 subLabel wicket.markup.html.basic.Label This is label added by sub -Ramnivas --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] validators that depends of multiple inputs
yes it help a lot is what i looking for thanks Igor and Johan On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote: see if this thread helps. http://thread.gmane.org/gmane.comp.java.wicket.user/5512 -Igor On 11/9/05, pepone pepone [EMAIL PROTECTED] wrote: Hello Is posible in wicket make validation that´s depend on multiple imputs the simple use case is password match re-password other can be input a need to be biger/lesser that input b --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- play tetris http://pepone.on-rez.com/tetris --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Tapestry vs. Wicket (was: [Wicket-user] i18n messages in HTML)
On Wed, 2005-11-09 at 11:47 -0800, Igor Vaynberg wrote: You cannot really compare wicket to tapestry. Although they are both component oriented frameworks, they have completely different approaches. In wicket the focus is on java code not on the template. Wicket templates are simple and limited (purposefully) where as tapestry allows for a lot more customization from within the template. Wicket's approach makes sure all your logic is kept in code. That is the wicket way. -Igor Thanks, Igor. I stole your quote and used it in the wiki page I started: http://www.wicket-wiki.org.uk/wiki/index.php/For_Tapestry_Users I would like to encourage other former Tapestry users to add whatever they like to this page! Cheers, Dave --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] 2 feedbackpanels
Hello i have a page that same times contains tow feedbackpanels i want to filter messages that are displayed on each one depending of the component that reports the error is IFeedbackMessageFilter designed to make this kind of filters? must i override getFeedbackMessageFilter() to suply my own implementation of IFeedbackMessageFilter? -- play tetris http://pepone.on-rez.com/tetris --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Johan Compagner wrote: then call it wicket:message=value=my-key so that wicket:message key=..Default Text/wicket:message and input type=button value=My Val wicket:message=value=my-key/ uses the same kind of notation. I can't decide if I like this idea or not. I like the idea of having as few separate constructs as possible, but I'm not sure I like using the same word for a tag name and an attribute name. And the more I think about it, the less I think there really needs to be a separate tag in the first place. Usually if you have to add a hook for wicket you use an existing tag, or throw a SPAN around your content and add the wicket:id to that. Why not do the same with wicket:message? For example, span wicket:message=my-keyDefault Text/span But still, should this use the same construct for attribute replacement? I'm not certain, especially since there would need to be a slight difference in syntax, that is, span wicket:message=my-key... vs input wicket:message=value=my-key type=.../ The latter syntax, as I mentioned earlier, leads itself pretty easily to internationalizing multiple attributes simultaneously, with a comma-separated list: input wicket:message=value=my-key, class=another-key.../ but there seems no elegant way of combining these with an i18n message for the body replacement. Perhaps that could come first in the list, or we could use a non-text token, as in: p wicket:message=$=greeting, class=greeting-classHello./p But something doesn't smell right to me about this. I think I would prefer instead: p wicket:message=greeting wicket:attr=class=greeting-class... The other thing to keep in mind if this really does make it into development is choosing what happens when there is both a wicket:message and a wicket:id on a single tag -- which comes first? And if the component replaces the tag body does it know anything about the i18n? I'm guessing that these are really questions for the developers' list, but since the issue was raised here, I guess we can keep the discussion here. Does anyone know if most of the core developers keeps up with this list? I know that several do, as I see them post regularly, but I don't know how many active core developers there are. Cheers, -- Scott Sauyet --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
I think this is starting to get all out of hand and when I suggested this whole thing I didn't think it was going to be crazy like this. Perhaps the attribute thing is best left to doing it the normal Wicket way. I think the only thing I really need for i18n in terms of changing attributes is for a button or submit form element and those are easy enough to add in each page. I think we need a simple solution which gets the job done for other cases where, for example, you do: First Name: input type=text/ Last name: etc. Currently, I have to add a label in the page/form for every single label I want for a form field, which honestly is kind of a pain. So, I suggest we add the wicket:message tag which has this: wicket:message key=myKeyDefault Message/wicket:message Nice and simple. I think this will cover most cases where people use i18n and if attribute support is needed people will just have to add it to a component manually in the page code. Thoughts? --AndrewOn 11/9/05, Scott Sauyet [EMAIL PROTECTED] wrote: Johan Compagner wrote: then call it wicket:message=value=my-key so that wicket:message key=..Default Text/wicket:message andinput type=button value=My Val wicket:message=value=my-key/ uses the same kind of notation.I can't decide if I like this idea or not.I like the idea of having asfew separate constructs as possible, but I'm not sure I like using thesame word for a tag name and an attribute name.And the more I think about it, the less I think there really needs to be a separate tag inthe first place.Usually if you have to add a hook for wicket you usean existing tag, or throw a SPAN around your content and add thewicket:id to that.Why not do the same with wicket:message?For example, span wicket:message=my-keyDefault Text/spanBut still, should this use the same construct for attribute replacement?I'm not certain, especially since there would need to be a slight difference in syntax, that is, span wicket:message=my-key... vs input wicket:message=value=my-key type=.../The latter syntax, as I mentioned earlier, leads itself pretty easily to internationalizing multiple attributes simultaneously, with acomma-separated list: input wicket:message=value=my-key, class=another-key.../but there seems no elegant way of combining these with an i18n message for the body replacement.Perhaps that could come first in the list, orwe could use a non-text token, as in: p wicket:message=$=greeting, class=greeting-classHello./p But something doesn't smell right to me about this.I think I wouldprefer instead: p wicket:message=greeting wicket:attr=class=greeting-class...The other thing to keep in mind if this really does make it into development is choosing what happens when there is both a wicket:messageand a wicket:id on a single tag -- which comes first?And if thecomponent replaces the tag body does it know anything about the i18n? I'm guessing that these are really questions for the developers' list,but since the issue was raised here, I guess we can keep the discussionhere.Does anyone know if most of the core developers keeps up with this list?I know that several do, as I see them post regularly, but Idon't know how many active core developers there are.Cheers, -- Scott Sauyet--- SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] i18n messages in HTML
Most of em do, though we all have kind of our different 'expertises'. The currently active developers are yours truly, Juergen, Johan, Igor and Martijn, though Martijn is mainly doing site/ builds/ promotion etc. Gwyn is the man for Wiki. Jonathan is not really active, but does some work in the background now and then; I'm living in Seattle now (at least for the next few months) and he's too, so we meet up now and then and exchange some ideas on Wicket. Ate will hopefully do the portlet part for us, and Chris is bussy raising his little one; haven't heard from him for a while, so I don't know whether he has plans to be active on Wicket. Hope that gives you an idea :) Eelco Does anyone know if most of the core developers keeps up with this list? I know that several do, as I see them post regularly, but I don't know how many active core developers there are. --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Multlevel extension does not seem to work
This is wrong ... wicket:extend span wicket:id=subLabelsub label/span /wicket:extend wicket:child/... must be wicket:extend span wicket:id=subLabelsub label/span wicket:child/ /wicket:extend Juergen On 11/10/05, Ramnivas Laddad [EMAIL PROTECTED] wrote: Hi, I am trying to use wicket:extend mechanism to share common functionality between pages and it seem to work only with one level of hierarchy. When I add another level, I get error (pasted below). Am I doing something incorrectly? Here is code to reproduce the behavior: Base.html: html body span wicket:id=baseLabelbase label/span wicket:child/ /body /html Sub.html: html body wicket:extend span wicket:id=subLabelsub label/span /wicket:extend wicket:child/ /body /html SubSub.html: html body wicket:extend pSub sub/p /wicket:extend /body /html Base.java: package com.aspectivity.wicket.bugs; import wicket.markup.html.WebPage; import wicket.markup.html.basic.Label; public class Base extends WebPage { public Base() { add(new Label(baseLabel, This is label added by base)); } } Sub.java: package com.aspectivity.wicket.bugs; import wicket.markup.html.basic.Label; public class Sub extends Base { public Sub() { add(new Label(subLabel, This is label added by sub)); } } SubSub.java: package com.aspectivity.wicket.bugs; public class SubSub extends Sub { } With this code, I get the following exception: wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'com.aspectivity.wicket.bugs.SubSub' not found. Enable debug messages for wicket.util.resource.Resource to get a list of all filenames tried: [Page class = com.aspectivity.wicket.bugs.SubSub, id = 0]at wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:720)at wicket.Page.onRender(Page.java:778)at wicket.Component.render (Component.java:1163)at wicket.Page.doRender(Page.java:251)at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:276)at wicket.RequestCycle.respond(RequestCycle.java:934)at wicket.RequestCycle.request(RequestCycle.java:411)at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:567)at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)at org.mortbay.http.HttpContext.handle (HttpContext.java:1757)at org.mortbay.http.HttpServer.service(HttpServer.java:879)at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java :961)at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java :300)at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)Caused by: wicket.WicketRuntimeException: Expected to find wicket:child/ in base markupat wicket.markup.InheritedMarkupMerger.mergeMarkups (InheritedMarkupMerger.java:209)at wicket.markup.MarkupCache.checkForMarkupInheritance(MarkupCache.java:418)at wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:225)at wicket.markup.MarkupCache.loadMarkupAndWatchForChanges (MarkupCache.java:300)at wicket.markup.MarkupCache.getMarkup(MarkupCache.java:183)at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:100)at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java :83)at wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:710)... 22 more wicket:extend span wicket:id=subLabelsub label/span /wicket:extend wicket:child/ Component Tree Component tree for [Page class = com.aspectivity.wicket.bugs.SubSub, id = 0]: # Path Type Model Object 1 baseLabel wicket.markup.html.basic.Label This is label added by base 2 subLabel wicket.markup.html.basic.Label This is label added by sub -Ramnivas --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Multlevel extension does not seem to work
Ah... anything outside wicket:extend.../wicket:extend gets ignored. Thanks, Juergen. -Ramnivas Juergen Donnerstag wrote: This is wrong ... wicket:extend span wicket:id="subLabel"sub label/span /wicket:extend wicket:child/ ... must be wicket:extend span wicket:id="subLabel"sub label/span wicket:child/ /wicket:extend Juergen On 11/10/05, Ramnivas Laddad [EMAIL PROTECTED] wrote: Hi, I am trying to use wicket:extend mechanism to share common functionality between pages and it seem to work only with one level of hierarchy. When I add another level, I get error (pasted below). Am I doing something incorrectly? Here is code to reproduce the behavior: Base.html: html body span wicket:id="baseLabel"base label/span wicket:child/ /body /html Sub.html: html body wicket:extend span wicket:id="subLabel"sub label/span /wicket:extend wicket:child/ /body /html SubSub.html: html body wicket:extend pSub sub/p /wicket:extend /body /html Base.java: package com.aspectivity.wicket.bugs; import wicket.markup.html.WebPage; import wicket.markup.html.basic.Label; public class Base extends WebPage { public Base() { add(new Label("baseLabel", "This is label added by base")); } } Sub.java: package com.aspectivity.wicket.bugs; import wicket.markup.html.basic.Label; public class Sub extends Base { public Sub() { add(new Label("subLabel", "This is label added by sub")); } } SubSub.java: package com.aspectivity.wicket.bugs; public class SubSub extends Sub { } With this code, I get the following exception: wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'com.aspectivity.wicket.bugs.SubSub' not found. Enable debug messages for wicket.util.resource.Resource to get a list of all filenames tried: [Page class = com.aspectivity.wicket.bugs.SubSub, id = 0] at wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:720) at wicket.Page.onRender(Page.java:778) at wicket.Component.render (Component.java:1163) at wicket.Page.doRender(Page.java:251) at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:276) at wicket.RequestCycle.respond(RequestCycle.java:934) at wicket.RequestCycle.request(RequestCycle.java:411) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service (HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) at org.mortbay.http.HttpContext.handle (HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java :961) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java :300) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511) Caused by: wicket.WicketRuntimeException: Expected to find wicket:child/ in base markup at wicket.markup.InheritedMarkupMerger.mergeMarkups (InheritedMarkupMerger.java:209) at wicket.markup.MarkupCache.checkForMarkupInheritance(MarkupCache.java:418) at wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:225) at wicket.markup.MarkupCache.loadMarkupAndWatchForChanges (MarkupCache.java:300) at wicket.markup.MarkupCache.getMarkup(MarkupCache.java:183) at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:100) at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java :83) at wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:710) ... 22 more wicket:extend span wicket:id="subLabel"sub label/span /wicket:extend wicket:child/ Component Tree Component tree for [Page class = com.aspectivity.wicket.bugs.SubSub, id = 0]: # Path Type Model Object 1 baseLabel wicket.markup.html.basic.Label This is label added by base 2 subLabel wicket.markup.html.basic.Label This is label added by sub -Ramnivas --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be