Re: Validation messages from properties file not working.
That's perfect. Thanks so much. Brian Mulholland "For every complex problem, there is an answer that is clear, simple and wrong." --H.L. Mencken "Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies." --Groucho Marx On Wed, Aug 23, 2017 at 3:56 PM, Sven Meier [via Apache Wicket] < ml+s1842946n4678590...@n4.nabble.com> wrote: > Hi, > > FormComponent has a special error() method for ValidationErrors. > > You're hitting another method on Component, that just accepts any > serializable: > > ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new > ValidationError().addKey("CaptchaRequired")); > > Try the following instead: > > ((WebMarkupContainer) > form.get("wmcCaptchaError")).error(form.getString("CaptchaRequired")); > > Regards > Sven > > > Am 23.08.2017 um 19:18 schrieb Entropy: > > > Yeah, it's definitely related to the component that the > > ComponentFeedbackPanel relates to. If I use a TextField, it finds the > > message perfectly. I change it to a web markup container or > hiddenfield, > > and it fails to find the message. Same name, same code doing the > validation > > and the adding of the validation key. > > > > I tried a TextField with visibility set to false and that didn't even > show > > the error (which makes sense). > > > > -- > > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Validation-messages-from-properties-file- > not-working-tp4678575p4678588.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=0> > > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=1> > > > > > - > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=2> > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=3> > > > > -- > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/Validation- > messages-from-properties-file-not-working-tp4678575p4678590.html > To unsubscribe from Validation messages from properties file not working., > click > here > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4678575=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc4NTc1fC05NzMyODEwMzU=> > . > NAML > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678596.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validation messages from properties file not working.
Hi, FormComponent has a special error() method for ValidationErrors. You're hitting another method on Component, that just accepts any serializable: ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new ValidationError().addKey("CaptchaRequired")); Try the following instead: ((WebMarkupContainer) form.get("wmcCaptchaError")).error(form.getString("CaptchaRequired")); Regards Sven Am 23.08.2017 um 19:18 schrieb Entropy: Yeah, it's definitely related to the component that the ComponentFeedbackPanel relates to. If I use a TextField, it finds the message perfectly. I change it to a web markup container or hiddenfield, and it fails to find the message. Same name, same code doing the validation and the adding of the validation key. I tried a TextField with visibility set to false and that didn't even show the error (which makes sense). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678588.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validation messages from properties file not working.
Yeah, it's definitely related to the component that the ComponentFeedbackPanel relates to. If I use a TextField, it finds the message perfectly. I change it to a web markup container or hiddenfield, and it fails to find the message. Same name, same code doing the validation and the adding of the validation key. I tried a TextField with visibility set to false and that didn't even show the error (which makes sense). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678588.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validation messages from properties file not working.
The properties file is in the same package as the page, and has the same prefix name, LandingPage_Cp10. Other errors added to TextFields and whatnot from the SAME VALIDATOR are working that use messages from that SAME FILE. I even can add the same message to a regular textfield in that same validator and it works fine. There's definitely something about the fact that it's not a normal textfield that messes it up. Brian Mulholland "For every complex problem, there is an answer that is clear, simple and wrong." --H.L. Mencken "Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies." --Groucho Marx On Wed, Aug 23, 2017 at 2:54 AM, Martin Grigorov-4 [via Apache Wicket] < ml+s1842946n4678577...@n4.nabble.com> wrote: > Hi, > > We need to know the location of the i18n file, the package structure and > the component tree structure to be able to tell why Wicket cannot find it > ... > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Tue, Aug 22, 2017 at 9:33 PM, Entropy <[hidden email] > <http:///user/SendEmail.jtp?type=node=4678577=0>> wrote: > > > We have a javascript widget on our page that doesn't have a wicket form > > component bound to it. We just get the value from the request. We have > a > > ComponentFeedbackPanel (CFP) because that's what we do with all of our > > messages. We fed a WebMarkupContainer (WMC) that is around the CFP in > as > > the Component for the CFP to relate to. We add the validation message > to > > that WMC, and the error DOES show. > > > > However, for some reason it's not finding the validation key from the > > property file. Every other error done the same way DOES, so i have to > > guess > > that it's because we are binding to the WMC that it's not working? > > > > Properties File line: > > CaptchaRequired=The CAPTCHA verification is required. Please complete it > to > > continue. > > > > Where we add the key (in an abstractformvalidator): > > ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new > > ValidationError().addKey("CaptchaRequired")); > > > > Ideas? > > > > > > > > -- > > View this message in context: http://apache-wicket.1842946. > > n4.nabble.com/Validation-messages-from-properties-file- > > not-working-tp4678575.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678577=1> > > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678577=2> > > > > > > > -- > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/Validation- > messages-from-properties-file-not-working-tp4678575p4678577.html > To unsubscribe from Validation messages from properties file not working., > click > here > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4678575=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc4NTc1fC05NzMyODEwMzU=> > . > NAML > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678585.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validation messages from properties file not working.
Hi, We need to know the location of the i18n file, the package structure and the component tree structure to be able to tell why Wicket cannot find it ... Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Aug 22, 2017 at 9:33 PM, Entropy <blmulholl...@gmail.com> wrote: > We have a javascript widget on our page that doesn't have a wicket form > component bound to it. We just get the value from the request. We have a > ComponentFeedbackPanel (CFP) because that's what we do with all of our > messages. We fed a WebMarkupContainer (WMC) that is around the CFP in as > the Component for the CFP to relate to. We add the validation message to > that WMC, and the error DOES show. > > However, for some reason it's not finding the validation key from the > property file. Every other error done the same way DOES, so i have to > guess > that it's because we are binding to the WMC that it's not working? > > Properties File line: > CaptchaRequired=The CAPTCHA verification is required. Please complete it to > continue. > > Where we add the key (in an abstractformvalidator): > ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new > ValidationError().addKey("CaptchaRequired")); > > Ideas? > > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Validation-messages-from-properties-file- > not-working-tp4678575.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Validation messages from properties file not working.
We have a javascript widget on our page that doesn't have a wicket form component bound to it. We just get the value from the request. We have a ComponentFeedbackPanel (CFP) because that's what we do with all of our messages. We fed a WebMarkupContainer (WMC) that is around the CFP in as the Component for the CFP to relate to. We add the validation message to that WMC, and the error DOES show. However, for some reason it's not finding the validation key from the property file. Every other error done the same way DOES, so i have to guess that it's because we are binding to the WMC that it's not working? Properties File line: CaptchaRequired=The CAPTCHA verification is required. Please complete it to continue. Where we add the key (in an abstractformvalidator): ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new ValidationError().addKey("CaptchaRequired")); Ideas? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket properties file load at startup?
I put getString("Required") in the init of the page. Yet on the event it did the same thing for about the same time. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-properties-file-load-at-startup-tp4677396p4677411.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket properties file load at startup?
Use ResourceModel or call #getString("...") in the first page constructor/onInitialize()/onConfigure() Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Mar 22, 2017 at 7:22 PM, Entropy <blmulholl...@gmail.com> wrote: > We have a new wicket app that is waiting until the third page in our app > before it loads a WHOLE LOT of properties stuff. I turned to debug and got > literally thousands of these: > > [3/22/17 13:56:49:282 EDT] 0142 SystemOut O DEBUG > ResourceStreamLocator Attempting to locate resource > 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using > finder'[classpath]' > [3/22/17 13:56:49:283 EDT] 0142 SystemOut O DEBUG > ResourceStreamLocator Attempting to locate resource > 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using > finder'[webapppath: /]' > [3/22/17 13:56:49:290 EDT] 0142 SystemOut O DEBUG > ResourceStreamLocator Attempting to locate resource > 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using > finder'[classpath: META-INF/resources/]' > [3/22/17 13:56:49:291 EDT] 0142 SystemOut O DEBUG > ResourceStreamLocator Attempting to locate resource > 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using > finder'[webapppath: /OnlineClaimsPetitions/]' > > It's taking 3.5-5 seconds once per startup. That doesn't sound bad, but it > happens on an ajax event that ought to be lightweight and kind of creates a > bad user experience for that first person in. I'd like to preload or do > this step on startup if possible. How can I make that happen? > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Wicket-properties-file-load-at-startup-tp4677396.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Wicket properties file load at startup?
We have a new wicket app that is waiting until the third page in our app before it loads a WHOLE LOT of properties stuff. I turned to debug and got literally thousands of these: [3/22/17 13:56:49:282 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[classpath]' [3/22/17 13:56:49:283 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[webapppath: /]' [3/22/17 13:56:49:290 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[classpath: META-INF/resources/]' [3/22/17 13:56:49:291 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[webapppath: /OnlineClaimsPetitions/]' It's taking 3.5-5 seconds once per startup. That doesn't sound bad, but it happens on an ajax event that ought to be lightweight and kind of creates a bad user experience for that first person in. I'd like to preload or do this step on startup if possible. How can I make that happen? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-properties-file-load-at-startup-tp4677396.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Properties file for *.jar full of custom validators
Thank you Tobias - you spotted the right problem and it works now. Problem was, really default behavior in copying resources by maven. After fixing that, everything works now as expected. Thank you guys - Martin, Tobias for your precious time and help! To help others with same problem: There is one cause why my validation messages did not work: *.properties files were missing in final *.jar artifact And there are 2 possible solutions how to fix that: 1. Put *.utf8.properties file for wicket into src/main/resources/yourpackage/YourValidator.utf8.properties 2. or put the same properties file directly near your validator *.java file, but then you need to instruct Maven to copy these resources into final artifact, because by default it skips them. - Put the XML below into your pom.xml. src/main/resources false src/main/java false ** **/*.java src/test/resources false src/test/java false ** **/*.java On Mon, Dec 28, 2015 at 5:40 AM, Tobias Soloschenko < tobiassolosche...@googlemail.com> wrote: > Hi, > > did you put the properties in src/main/java or src/main/resources? > > You have to but it into resources if no additional maven settings are > applied. > > So create a package with the same name in resources and name the > properties file the same as the class > > src/main/java/my/package/MyValidator.java > src/main/resources/my/package/MyValidator.properties > > kind regards > > Tobias > > > Am 27.12.2015 um 21:24 schrieb Štefan Šimík <stefan.si...@gmail.com>: > > > > Thank you for tip Martin ... > > I tried both YourValidator.properties or YourValidator.utf8.propertiesit > > right now, but the feedback message was empty string ("") in both cases. > > > > I found one working solution: > > Call setMessage(...) on validator, which provides validation message, if > no > > key is found in properties files. > > > > But solution with using standard *.properties file would be still nicer > for > > me, if possible. > > > > On Sun, Dec 27, 2015 at 8:25 PM, Martin Grigorov < > martin.grigo...@gmail.com> > > wrote: > > > >> Hi, > >> > >> I don't have my IDE with me now, so I can't verify but > >> YourValidator.properties staying next to YourValidator.class should > work. > >>> On Dec 27, 2015 8:28 PM, "Štefan Šimík" <stefan.si...@gmail.com> > wrote: > >>> > >>> I have separate *.jar containing custom form-component validators. > >>> (in the *.jar file, there are only validators - no other Components, no > >>> WebPage(s), > >>> no WebApplication) > >>> > >>> MY QUESTION: > >>> Which *.properties file should I create for these validators, so the > >>> validator classes > >>> and their default messages can be contained together in one *.jar? > >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Properties file for *.jar full of custom validators
Thank you for tip Martin ... I tried both YourValidator.properties or YourValidator.utf8.propertiesit right now, but the feedback message was empty string ("") in both cases. I found one working solution: Call setMessage(...) on validator, which provides validation message, if no key is found in properties files. But solution with using standard *.properties file would be still nicer for me, if possible. On Sun, Dec 27, 2015 at 8:25 PM, Martin Grigorov <martin.grigo...@gmail.com> wrote: > Hi, > > I don't have my IDE with me now, so I can't verify but > YourValidator.properties staying next to YourValidator.class should work. > On Dec 27, 2015 8:28 PM, "Štefan Šimík" <stefan.si...@gmail.com> wrote: > > > I have separate *.jar containing custom form-component validators. > > (in the *.jar file, there are only validators - no other Components, no > > WebPage(s), > > no WebApplication) > > > > MY QUESTION: > > Which *.properties file should I create for these validators, so the > > validator classes > > and their default messages can be contained together in one *.jar? > > >
Properties file for *.jar full of custom validators
I have separate *.jar containing custom form-component validators. (in the *.jar file, there are only validators - no other Components, no WebPage(s), no WebApplication) MY QUESTION: Which *.properties file should I create for these validators, so the validator classes and their default messages can be contained together in one *.jar?
Re: Properties file for *.jar full of custom validators
Hi, I don't have my IDE with me now, so I can't verify but YourValidator.properties staying next to YourValidator.class should work. On Dec 27, 2015 8:28 PM, "Štefan Šimík" <stefan.si...@gmail.com> wrote: > I have separate *.jar containing custom form-component validators. > (in the *.jar file, there are only validators - no other Components, no > WebPage(s), > no WebApplication) > > MY QUESTION: > Which *.properties file should I create for these validators, so the > validator classes > and their default messages can be contained together in one *.jar? >
Re: Properties file for *.jar full of custom validators
Hi, did you put the properties in src/main/java or src/main/resources? You have to but it into resources if no additional maven settings are applied. So create a package with the same name in resources and name the properties file the same as the class src/main/java/my/package/MyValidator.java src/main/resources/my/package/MyValidator.properties kind regards Tobias > Am 27.12.2015 um 21:24 schrieb Štefan Šimík <stefan.si...@gmail.com>: > > Thank you for tip Martin ... > I tried both YourValidator.properties or YourValidator.utf8.propertiesit > right now, but the feedback message was empty string ("") in both cases. > > I found one working solution: > Call setMessage(...) on validator, which provides validation message, if no > key is found in properties files. > > But solution with using standard *.properties file would be still nicer for > me, if possible. > > On Sun, Dec 27, 2015 at 8:25 PM, Martin Grigorov <martin.grigo...@gmail.com> > wrote: > >> Hi, >> >> I don't have my IDE with me now, so I can't verify but >> YourValidator.properties staying next to YourValidator.class should work. >>> On Dec 27, 2015 8:28 PM, "Štefan Šimík" <stefan.si...@gmail.com> wrote: >>> >>> I have separate *.jar containing custom form-component validators. >>> (in the *.jar file, there are only validators - no other Components, no >>> WebPage(s), >>> no WebApplication) >>> >>> MY QUESTION: >>> Which *.properties file should I create for these validators, so the >>> validator classes >>> and their default messages can be contained together in one *.jar? >> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Accessing a .properties file
Hi, I want to access a properties file using a BufferedInputStream for reading and a FileOutputStream for writing. My problem is that I don’t know what to use as constructor of the BIS/FOS. Currently I’m using just „config.properties“. But the program keeps throwing exceptions at me and it won’t stop. Can I use any variable like $tomcatHome or something like this in the constructor so the file is generated at a consistent location? Thanks for your time and help with this Lukas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Accessing a .properties file
Hi, if you are trying to read/write files in a specific package take a look here: http://stackoverflow.com/questions/5291852/writing-to-file-inside-package-java Andrea. Hi, I want to access a properties file using a BufferedInputStream for reading and a FileOutputStream for writing. My problem is that I don’t know what to use as constructor of the BIS/FOS. Currently I’m using just „config.properties“. But the program keeps throwing exceptions at me and it won’t stop. Can I use any variable like $tomcatHome or something like this in the constructor so the file is generated at a consistent location? Thanks for your time and help with this Lukas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Exception when trying to load resource from a properties file.
Hello, I'm playing around with Wicket and I got a serious problem with .properties files. I got this HomePage.html !DOCTYPE html html head meta charset=UTF-8 titleWelcome Page/title /head body form wicket:id=userForm wicket:message key=name/:nbspinput wicket:id=name type=text/ wicket:message key=surname/:nbspinput wicket:id=surname type=text / /form /body /html and HomePage.propeties ?xml version=1.0 encoding=UTF-8? properties entry key=nameName/entry entry key=surnameSurname/entry /properties These two files are located in the same directory in my project. I get an org.apache.wicket.WicketRuntimeException: Property 'name' not found in property files exception when trying to render HomePage.html. I've checked the .war file in the server's directory and the two files are in the same directory. I've also noticed that a HomePage.properties.xml file is also deployed for some reason.The .war is packaged by Maven, using the pom file from the wicket quickstart archetype. Any ideas? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Exception-when-trying-to-load-resource-from-a-properties-file-tp4664967.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Exception when trying to load resource from a properties file.
Hi, On Fri, Mar 14, 2014 at 1:53 PM, vdaras vda...@gmail.com wrote: Hello, I'm playing around with Wicket and I got a serious problem with .properties files. I got this HomePage.html !DOCTYPE html html head meta charset=UTF-8 titleWelcome Page/title /head body form wicket:id=userForm wicket:message key=name/:nbspinput wicket:id=name type=text/ wicket:message key=surname/:nbspinput wicket:id=surname type=text / /form /body /html and HomePage.propeties You use the XML format but you miss the .xml extension in the file name. Also you miss 'r' in propeRties. ?xml version=1.0 encoding=UTF-8? properties entry key=nameName/entry entry key=surnameSurname/entry /properties These two files are located in the same directory in my project. I get an org.apache.wicket.WicketRuntimeException: Property 'name' not found in property files exception when trying to render HomePage.html. I've checked the .war file in the server's directory and the two files are in the same directory. I've also noticed that a HomePage.properties.xml file is also deployed for some reason.The .war is packaged by Maven, using the It is interesting to find out how HomePage.properties.xml appeared if you didn't added it. pom file from the wicket quickstart archetype. Any ideas? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Exception-when-trying-to-load-resource-from-a-properties-file-tp4664967.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SpringBean and properties file.
I think this is a problem in spring and wicket working together. This is in 1.4.7. In spring: bean id=portalResources class=gov.usdoj.afms.afmsportal.application.AFMSPortalResources init-method=init scope=singleton property name=portalService ref=portalService/ property name=env value=${environment} / property name=version value=${version} / property name=localDev value=${localdev} / property name=production value=${production} / property name=localDevUserName value=${localdev_username} / /bean This bean is injected into a wicket page with @SpringBean. Using breakpoints I can see spring insantiating this bean, and setting the properties. The values are there. This happens on application startup. But when I got to get the injected bean, the constructor fires again, but the init method and the setting or properties are NOT called, and despite the scope=singleton, a second completley different instance is being instantiated and injected. And it's empty, which is no good. Any ideas on this? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SpringBean-and-properties-file-tp4664377.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SpringBean and properties file.
Hi, Wicket uses CGLib proxies, to proxy beans which are not referenced by their interface. This leads to the constructor being fired once for each injection. If you don't want this, declare the type of the @SpringBean member as an interface. Sven On 02/11/2014 08:46 PM, Entropy wrote: I think this is a problem in spring and wicket working together. This is in 1.4.7. In spring: bean id=portalResources class=gov.usdoj.afms.afmsportal.application.AFMSPortalResources init-method=init scope=singleton property name=portalService ref=portalService/ property name=env value=${environment} / property name=version value=${version} / property name=localDev value=${localdev} / property name=production value=${production} / property name=localDevUserName value=${localdev_username} / /bean This bean is injected into a wicket page with @SpringBean. Using breakpoints I can see spring insantiating this bean, and setting the properties. The values are there. This happens on application startup. But when I got to get the injected bean, the constructor fires again, but the init method and the setting or properties are NOT called, and despite the scope=singleton, a second completley different instance is being instantiated and injected. And it's empty, which is no good. Any ideas on this? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SpringBean-and-properties-file-tp4664377.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to add line breaks in the summary text of Wizard properties file
In Wicket 5 it was as easy as using br tags inside summary String. In Wicket 6 this simple way does not work anymore. Why? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4664234.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
See https://issues.apache.org/jira/browse/WICKET-4219 Sven On 02/06/2014 12:51 PM, dpmihai wrote: In Wicket 5 it was as easy as using br tags inside summary String. In Wicket 6 this simple way does not work anymore. Why? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4664234.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
Thanks. I did the following: @Override public Component getHeader(final String id, final Component parent, final IWizard wizard) { Component c = super.getHeader(id, parent, wizard); c.get(summary).setEscapeModelStrings(false); return c; } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4664241.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
That was it! How did I not think of this? :-) Thanks Sven! The only issue, as I found out quickly, is that I have to introduce the MultiLineHeader inner class in many of my classes that extend WizardStep. And since wicket id does not support different namespaces, I will have to use different wicket ids for the MultiLineLabels for each class. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4660625.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to add line breaks in the summary text of Wizard properties file
Thanks Paul! For now, creating a MultiLineHeader class to replace Header class, as Sven suggested, did the trick. But I will keep your point in mind for any future customization of the default Wizard. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4660626.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to add line breaks in the summary text of Wizard properties file
Hi, I am using wicket Wizard extension to create a create metaprofile wizard. I am having trouble incorporating line breaks in the summary text of the properties file. As you can see below, the summary text for the steps are long, and I intended to break into several lines, but br/ does not seem to work: NewMetaProfileWizard.properties: otstep2.summary=Based on the OT node you selected ('$\{otNodeName\}'), you must further define the following properties that are available on the node: br/ (1) a free directory number range, br/ (2) a site linking the OT node to an OXE node, br/ (3) an OT user template br/ For (1)-(6), you will be prompted with a list of options available for that property. The options for (1)-(3) are also configurable on the node, please consult the user guide to configure those options on the OT node and perform a sync operation for the node before proceeding with the metaprofile creation. otstep3.title=Define OT Properties (Step 3) otstep3.summary=Last step in creating an OT metaprofile: please define the following properties: br/ (1) an OXE user profile available on the OXE node linked via site, br/ and optionally, (2) a SIP domain name, br/ (3) a voice mail server br/ (4) a voice mail profile name br/ For (1), if you want an OXE user profile that is not in the list, you can configure a user profile on the OXE node linked by the site. A sync operation for the node should be performed before proceeding with the metaprofile creation. Any ideas or suggestions would be appreciated!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to add line breaks in the summary text of Wizard properties file
You can have HTML in your language pack and then call Componenet.setEscapeModelString(false) to have it rendered. http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/Compone nt.html#setEscapeModelStrings(boolean) You can also add an attribute modifier to your panel to wrap it at a given size or you could extending that panel and replacing the label with your own implementation if you want to further customize it. Anyhow, you can download the Wicket Free Guide book from: http://wicket.apache.org/learn/books/freeguide.html Read over chapter 12 Internationalization with Wicket to get up to speed with the basic features. ~ Thank you, Paul Bors -Original Message- From: shimin_q [mailto:smq...@hotmail.com] Sent: Wednesday, July 31, 2013 3:20 PM To: users@wicket.apache.org Subject: How to add line breaks in the summary text of Wizard properties file Hi, I am using wicket Wizard extension to create a create metaprofile wizard. I am having trouble incorporating line breaks in the summary text of the properties file. As you can see below, the summary text for the steps are long, and I intended to break into several lines, but br/ does not seem to work: NewMetaProfileWizard.properties: otstep2.summary=Based on the OT node you selected ('$\{otNodeName\}'), you must further define the following properties that are available on the node: br/ (1) a free directory number range, br/ (2) a site linking the OT node to an OXE node, br/ (3) an OT user template br/ For (1)-(6), you will be prompted with a list of options available for that property. The options for (1)-(3) are also configurable on the node, please consult the user guide to configure those options on the OT node and perform a sync operation for the node before proceeding with the metaprofile creation. otstep3.title=Define OT Properties (Step 3) otstep3.summary=Last step in creating an OT metaprofile: please define the following properties: br/ (1) an OXE user profile available on the OXE node linked via site, br/ and optionally, (2) a SIP domain name, br/ (3) a voice mail server br/ (4) a voice mail profile name br/ For (1), if you want an OXE user profile that is not in the list, you can configure a user profile on the OXE node linked by the site. A sync operation for the node should be performed before proceeding with the metaprofile creation. Any ideas or suggestions would be appreciated!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-sum mary-text-of-Wizard-properties-file-tp4660589.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
Hi, you're probably extending WizardStep? Override #getHeader() returning a custom header similar to WizardStep$Header but using a MultiLineLabel for the summary. Then you can use new lines in your properties. Sven On 07/31/2013 09:20 PM, shimin_q wrote: Hi, I am using wicket Wizard extension to create a create metaprofile wizard. I am having trouble incorporating line breaks in the summary text of the properties file. As you can see below, the summary text for the steps are long, and I intended to break into several lines, but br/ does not seem to work: NewMetaProfileWizard.properties: otstep2.summary=Based on the OT node you selected ('$\{otNodeName\}'), you must further define the following properties that are available on the node: br/ (1) a free directory number range, br/ (2) a site linking the OT node to an OXE node, br/ (3) an OT user template br/ For (1)-(6), you will be prompted with a list of options available for that property. The options for (1)-(3) are also configurable on the node, please consult the user guide to configure those options on the OT node and perform a sync operation for the node before proceeding with the metaprofile creation. otstep3.title=Define OT Properties (Step 3) otstep3.summary=Last step in creating an OT metaprofile: please define the following properties: br/ (1) an OXE user profile available on the OXE node linked via site, br/ and optionally, (2) a SIP domain name, br/ (3) a voice mail server br/ (4) a voice mail profile name br/ For (1), if you want an OXE user profile that is not in the list, you can configure a user profile on the OXE node linked by the site. A sync operation for the node should be performed before proceeding with the metaprofile creation. Any ideas or suggestions would be appreciated!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
Thanks for the suggestion! Yes, I am extending WizardStep. Here is what I did to my code following your suggestion (the Header class is a final class, so I had to create a new MultiLineHeader class extends Panel directly to add new MultiLineLabel instead of the default new Label line in Header class. But I am getting error: 2013-07-31 16:35:45,813 [5245418@qtp-15847288-0] ERROR org.apache.wicket.DefaultExceptionMapper - Unexpected error occurred org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup file associated. MultiLineHeader: [MultiLineHeader [Component id = header]] at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMarkup(AssociatedMarkupSourcingStrategy.java:97) at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:447) Here is the code I put in: private final class OXEDetailsStep extends WizardStep implements ICondition { private static final long serialVersionUID = 1L; /** * Construct. */ public OXEDetailsStep() { ... } public Component getHeader(final String id, final Component parent, final IWizard wizard) { return new MultiLineHeader(id, wizard); } private final class MultiLineHeader extends Panel { private static final long serialVersionUID = 1L; /** * Construct. * * @param id *The component id * @param wizard *The containing wizard */ public MultiLineHeader(final String id, final IWizard wizard) { super(id); setDefaultModel(new CompoundPropertyModelIWizard(wizard)); add(new MultiLineLabel(title, new AbstractReadOnlyModelString() { private static final long serialVersionUID = 1L; @Override public String getObject() { return getTitle(); } })); add(new MultiLineLabel(summary, new AbstractReadOnlyModelString() { private static final long serialVersionUID = 1L; @Override public String getObject() { return getSummary(); } })); } } } Any ideas about the error? Thanks so much for your help! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4660595.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add line breaks in the summary text of Wizard properties file
MultiLineHeader is a panel, so it needs its own markup file. Did you create MultiLineHeader.html? Sven On 07/31/2013 10:43 PM, shimin_q wrote: Thanks for the suggestion! Yes, I am extending WizardStep. Here is what I did to my code following your suggestion (the Header class is a final class, so I had to create a new MultiLineHeader class extends Panel directly to add new MultiLineLabel instead of the default new Label line in Header class. But I am getting error: 2013-07-31 16:35:45,813 [5245418@qtp-15847288-0] ERROR org.apache.wicket.DefaultExceptionMapper - Unexpected error occurred org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup file associated. MultiLineHeader: [MultiLineHeader [Component id = header]] at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMarkup(AssociatedMarkupSourcingStrategy.java:97) at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:447) Here is the code I put in: private final class OXEDetailsStep extends WizardStep implements ICondition { private static final long serialVersionUID = 1L; /** * Construct. */ public OXEDetailsStep() { ... } public Component getHeader(final String id, final Component parent, final IWizard wizard) { return new MultiLineHeader(id, wizard); } private final class MultiLineHeader extends Panel { private static final long serialVersionUID = 1L; /** * Construct. * * @param id *The component id * @param wizard *The containing wizard */ public MultiLineHeader(final String id, final IWizard wizard) { super(id); setDefaultModel(new CompoundPropertyModelIWizard(wizard)); add(new MultiLineLabel(title, new AbstractReadOnlyModelString() { private static final long serialVersionUID = 1L; @Override public String getObject() { return getTitle(); } })); add(new MultiLineLabel(summary, new AbstractReadOnlyModelString() { private static final long serialVersionUID = 1L; @Override public String getObject() { return getSummary(); } })); } } } Any ideas about the error? Thanks so much for your help! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-summary-text-of-Wizard-properties-file-tp4660589p4660595.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to add line breaks in the summary text of Wizard properties file
) { for(Permission permission : editGroup.getPermissions()) { permission.setSelected(Boolean.TRUE); } this.backPage = backPage; this.userGroupModel = new CompoundPropertyModelUserGroup(editGroup); ResourceModel pageTitleModel = new ResourceModel( (editGroup.getId() == null) ? new.group : getPageClass().getName() + ResourceKeyHelper.PAGETITLE ); add(new Label(pageTitle, pageTitleModel)); add(new EditUserGroupWizard(wizard, wizardStartStep)); } ... private class SetUsersStep extends WizardStep { private static final long serialVersionUID = 1L; public SetUsersStep() { Form? form = findParent(Form.class); add(new EditGroupMembersPanel(editGroupMembers, form)); } } ... } EditUserGroupPage.html html xmlns:wicket=http://wicket.apache.org; wicket:extend table width=100% cellpadding=0 cellspacing=0 border=0 tr td class=dashboardTitlespan wicket:id=pageTitle[Edit Group]/span/td /tr trtd class=table-divider/td/tr tr td span wicket:id=wizard[[Wizard will be placed here]]/span /td /tr /table /wicket:extend /html EditUserGroupPage#SetUsersStep.html html xmlns:wicket=http://wicket.apache.org; wicket:panel span wicket:id=editGroupMembers[Users Palette]/span /wicket:panel /html ~ Thank you, Paul Bors -Original Message- From: shimin_q [mailto:smq...@hotmail.com] Sent: Wednesday, July 31, 2013 4:43 PM To: users@wicket.apache.org Subject: Re: How to add line breaks in the summary text of Wizard properties file Thanks for the suggestion! Yes, I am extending WizardStep. Here is what I did to my code following your suggestion (the Header class is a final class, so I had to create a new MultiLineHeader class extends Panel directly to add new MultiLineLabel instead of the default new Label line in Header class. But I am getting error: 2013-07-31 16:35:45,813 [5245418@qtp-15847288-0] ERROR org.apache.wicket.DefaultExceptionMapper - Unexpected error occurred org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup file associated. MultiLineHeader: [MultiLineHeader [Component id = header]] at org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMark up(AssociatedMarkupSourcingStrategy.java:97) at org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:447) Here is the code I put in: private final class OXEDetailsStep extends WizardStep implements ICondition { private static final long serialVersionUID = 1L; /** * Construct. */ public OXEDetailsStep() { ... } public Component getHeader(final String id, final Component parent, final IWizard wizard) { return new MultiLineHeader(id, wizard); } private final class MultiLineHeader extends Panel { private static final long serialVersionUID = 1L; /** * Construct. * * @param id *The component id * @param wizard *The containing wizard */ public MultiLineHeader(final String id, final IWizard wizard) { super(id); setDefaultModel(new CompoundPropertyModelIWizard(wizard)); add(new MultiLineLabel(title, new AbstractReadOnlyModelString() { private static final long serialVersionUID = 1L; @Override public String getObject() { return getTitle(); } })); add(new MultiLineLabel(summary, new AbstractReadOnlyModelString() { private static final long serialVersionUID = 1L; @Override public String getObject() { return getSummary(); } })); } } } Any ideas about the error? Thanks so much for your help! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-line-breaks-in-the-sum mary-text-of-Wizard-properties-file-tp4660589p4660595.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail
RE: How to add line breaks in the summary text of Wizard properties file
So in your case I would just change my CSS and add a wicketExtensionsWizardHeader with the width you want :) ~ Thank you, Paul Bors -Original Message- From: Paul Bors [mailto:p...@bors.ws] Sent: Wednesday, July 31, 2013 6:34 PM To: users@wicket.apache.org Subject: RE: How to add line breaks in the summary text of Wizard properties file The way I styled the wizard to fit my look-n-feel is by extending Wizard and creating MyOwnWizard and then overriding whatever I wanted to change in the Java code (such as the type of form to create) and also in the HTML. You can do this with any Component but keep in mind the more you customize them the more work you'd have to do once you update your dependencies. public class MyWizard extends Wizard { private static final long serialVersionUID = 1L; public MyWizard(String id) { super(id, false); } public MyWizard(String id, IWizardModel wizardModel) { super(id, wizardModel, false); } @Override public MyForm? getForm() { return (MyForm?)super.getForm(); } @Override protected E MyFormE newForm(final String id) { MyFormE form = new MyFormE(id, true); form.setAuditUserInputOnFormSubmit(false); return form; } @Override protected FeedbackPanel newFeedbackPanel(String id) { FeedbackPanel feedbackPanel = new FeedbackPanel(id, new ContainerFeedbackMessageFilter(this)); feedbackPanel.setVisible(false); return feedbackPanel; } @Override protected Component newButtonBar(String id) { return new MyWizardButtonBar(id, this, finishOnAnyStep()); } /** * On each step activation through the wizard, collect the user input and the original default * values on the next step. * * @see {@link Wizard#onActiveStepChanged(IWizardStep)} */ @Override public void onActiveStepChanged(final IWizardStep newStep) { getForm().collectAfterFormInputComponents(); super.onActiveStepChanged(newStep); } /** * Collect from components input for audit of changes since the form submit is not always fired for * the Finish button. This happens when you directly edit a step and the finish is enabled on every step. */ @Override public void onFinish() { if(finishOnAnyStep()) { getForm().collectAfterFormInputComponents(); } } /** * Override if you'd like the Finish button to be enabled on any step of the wizard. * @return codefalse/code by default representing that the Finish is only enabled at the last step.br * codetrue/code otherwise and the Finish button will always be enabled. */ protected boolean finishOnAnyStep() { return false; } } And in the HTML: html xmlns:wicket=http://wicket.apache.org; wicket:panel form wicket:id=form table class=wicketExtensionsWizardOuterTable tr td valign=top span wicket:id=overview[[Overview]]/span /td td valign=top table class=wicketExtensionsWizardInnerTable tr class=wicketExtensionsWizardHeaderRow td valign=top class=wicketExtensionsWizardHeaderspan wicket:id=header[[Header]]/span/td /tr tr class=wicketExtensionsWizardViewRow td valign=top class=wicketExtensionsWizardViewdiv wicket:id=view class=wicketExtensionsWizardViewInner[[View]]/div/td /tr tr class=wicketExtensionsWizardFeedbackRow td valign=top class=wicketExtensionsWizardFeedbackspan wicket:id=feedback[[Feeback]]/span/td /tr tr class=wicketExtensionsWizardButtonBarRow td valign=top class=wicketExtensionsWizardButtonBarspan wicket:id=buttons[[Buttons]]/span/td /tr /table /td /tr /table /form /wicket:panel /html This is a simple example of how I use a wizard step to add a panel: public class EditUserGroupPage extends Page { private static final long serialVersionUID = 1L; @SpringBean private UserGroupServiceuserGroupService; @SpringBean private UserService userService; public static enum WizStep { /** Step 1 of 4 */ GROUP_DETAILS(1), /** Step 2 of 4 */ SET_PERMISSIONS(2), /** Step 3 of 4 */ SET_USERS(3), /** Step 4 of 4 */ VIEW_GROUP(4); private int stepNum; WizStep(int stepNum) { this.stepNum = stepNum; } public int getNum
.properties File for Custom Dropdown Message Not Found
Where do I put the .properties file with my custom message that overrides Please Choose One for a dropdown? I have a panel which uses this dropdown, and I created a .properties file with the same name as the panel, in the same package. But it's not getting activated. (isNullValid is TRUE for this dropdown, but the null option comes up blank (), rather than with my title. We have some code which may already be overriding it with a blank, but I can't find it now.) Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/properties-File-for-Custom-Dropdown-Message-Not-Found-tp4657377.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: .properties File for Custom Dropdown Message Not Found
So I'll try to clarify: 1) isNullValid = TRUE on this dropdown 2) I created a .properties file in the same location as the Page. Referenced the component's full hierarchy and set .null form.panel.mydropdown.null=TEST 3) This isn't working. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/properties-File-for-Custom-Dropdown-Message-Not-Found-tp4657377p4657383.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: .properties File for Custom Dropdown Message Not Found
Problem solved. It had to be .nullValid (I was using .null). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/properties-File-for-Custom-Dropdown-Message-Not-Found-tp4657377p4657387.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to get correct path of component for put it in properties file
Hi all, I have problems to find the correct path of my component to place it in the properties file. In particular validation retrieves the name of the component through the properties file to display it in the browser if validation fails. I did component.getPath() and component.getRelativePath() in the code and put the result of both in properties file like: myPopupForm.myAttr=test1 templateContent.myPopupForm.myAttr=test2 But this didnt work. Is there a way how to find out the string which is the key for an entry in the properties file? Regards, yka -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-correct-path-of-component-for-put-it-in-properties-file-tp4657273.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get correct path of component for put it in properties file
Hi, The key in properties file should look like: myForm.myField.SomeValidator=Error message I.e. it starts with the relative path and ends with the class name of the used validator. On Fri, Mar 15, 2013 at 2:47 PM, yka i...@jcoder.de wrote: Hi all, I have problems to find the correct path of my component to place it in the properties file. In particular validation retrieves the name of the component through the properties file to display it in the browser if validation fails. I did component.getPath() and component.getRelativePath() in the code and put the result of both in properties file like: myPopupForm.myAttr=test1 templateContent.myPopupForm.myAttr=test2 But this didnt work. Is there a way how to find out the string which is the key for an entry in the properties file? Regards, yka -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-correct-path-of-component-for-put-it-in-properties-file-tp4657273.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: How to add the key in properties file for DateTimeField component
Hi, I think adding hours.DateTimeField$HoursValidator=Some nice error message in MyApplication.properties should be OK. On Tue, Jan 22, 2013 at 8:33 PM, wicket_new_user murthy.m...@gmail.comwrote: Hi, i'm getting the below error when adding the hours greater than 12 for DateTimeField Component. ◦Could not locate error message for component: TextField@report:wicket:dateField:dateValue:hours and error: [ValidationError message=[null], keys=[DateTimeField$HoursValidator], variables=[[minimum=1],[maximum=12]]]. Tried keys: hours.DateTimeField$HoursValidator, DateTimeField$HoursValidator. i've tried the various keys in my properties file, but none of them worked Thanks in advance WNU -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-the-key-in-properties-file-for-DateTimeField-component-tp4655654.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
RE: merge all properties file into one file
You can always identify the specific component given the dotted path notation but it would make it harder to maintain your code as refactoring and moving things on your page will also require refactoring your keys in your properties file. You can also simply override the resourceKey() method for your own validator and return the key string you want to use. ~ Thank you, Paul Bors -Original Message- From: oliver.stef [mailto:ova...@gmail.com] Sent: Sunday, October 28, 2012 10:30 AM To: users@wicket.apache.org Subject: Re: merge all properties file into one file Thanks for the answer! It succeeded! I have one last thing - on my application, i used the 'setRequired' and 'RequiredTextField' method, and now, when i merge all my properties file into one file - how can I config that Wicket will know which stringId to take for the validator? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/merge-all-properties-file-into-on e-file-tp4653304p4653417.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: merge all properties file into one file
Is there any way that i can merge all my properties file into one big properties file ? If you application class is MyApplication then you can put everything into MyApplication.properties if you want. Carl-Eric - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: load properties file from extrnal path
Thanks Martin and Sandor!! That was really helping!!! I did it both - changed the Init() and added an external folder. WORKS GREAT!! Thanks again. Oliver. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-properties-file-from-extrnal-path-tp4650944p4651007.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: load properties file from extrnal path
Hi, You need a custom implementation of org.apache.wicket.resource.loader.IStringResourceLoader. Check the default provided implementations for inspiration. You can register it with: MyApp#init(): getResourceSettings().getStringResourceLoaders().add(0, new MyImpl()) On Thu, Aug 2, 2012 at 9:13 AM, oliver.stef ova...@gmail.com wrote: Hi, How can I load external properties file? (i mean that I don't want to load a file that is in the regular wicket hierarchy where i have HelloWorld.java, HelloWorld.html, HelloWorld.properties), what i want is to load file from- C:\project\HelloWorld.properties. i tried to do this but wicket won't load the file. any tips? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-properties-file-from-extrnal-path-tp4650944.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
load properties file from extrnal path
Hi, How can I load external properties file? (i mean that I don't want to load a file that is in the regular wicket hierarchy where i have HelloWorld.java, HelloWorld.html, HelloWorld.properties), what i want is to load file from- C:\project\HelloWorld.properties. i tried to do this but wicket won't load the file. any tips? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-properties-file-from-extrnal-path-tp4650944.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: load properties file from extrnal path
Hi Oliver, In your Application init add IResourceSettings resourceSettings = getResourceSettings(); resourceSettings.addResourceFolder(c:\project); //this path should be changed Regards., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-properties-file-from-extrnal-path-tp4650944p4650955.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to change the properties file location in Wicket
Hi Tom, my usecase is: I wan't wicket to search for the key=value in particular order, i.e: let's say i have those propertis files: 1. ...\java\com\mycompany*\external\*WicketApplication_en.properties 2. ...\java\com\mycompany\WicketApplication_en.properties 3. ...\java\com\mycompany*\external\*WicketApplication.properties 4. ...\java\com\mycompany\WicketApplication.properties so i want Wicket to load the wicket:messag in the following order: wicket:message key=eee / --should be load from ...\java\com\mycompany\WicketApplication_en.properties wicket:message key=ccc / --should be load from ...\java\com\mycompany*\external\*WicketApplication_en.properties wicket:message key=jjj / --should be load from ...\java\com\mycompany\WicketApplication.properties wicket:message key=kkk / --should be load from ...\java\com\mycompany\WicketApplication_en.properties any idea? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4649606.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to change the properties file location in Wicket
Please change the sentence so i want Wicket to load the wicket:messag in the following order: to so i want Wicket to load the wicket:messag from the following files: Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4649607.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to change the properties file location in Wicket
See org.apache.wicket.resource.loader.BundleStringResourceLoader Or create your own impl of org.apache.wicket.resource.loader.IStringResourceLoader and register it with : app.getStringResourceLoaders().add(yours) On Sun, May 20, 2012 at 6:47 PM, oliver.stef ova...@gmail.com wrote: Hi Martin, Thank you for your help, but my problem is that i need to put my properties file in folder that is not next to the HTML and Java files. i need to change the look-up algorithm of wicket. Any body know how to do it? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to change the properties file location in Wicket
Hi Martin, Thank you for your help, but my problem is that i need to put my properties file in folder that is not next to the HTML and Java files. i need to change the look-up algorithm of wicket. Any body know how to do it? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to change the properties file location in Wicket
Why do you need to change that? What is your usecase? -Tom On 20.05.2012 at 18:47 oliver.stef wrote: Hi Martin, Thank you for your help, but my problem is that i need to put my properties file in folder that is not next to the HTML and Java files. i need to change the look-up algorithm of wicket. Any body know how to do it? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to change the properties file location in Wicket
Hi all, I just start using Wicket and I have a big problem! I have a few sources files (Page (folder) with the files: Page1.html, Page1.java, Page1.properties, Page2(another folder) with the files: Page2.html, Page2.java, Page2.properties). now, my problem is that i want to merge all the *.properties file into one file (one *.properties file) that will be located in the src folder, or under the root folder. I don't know how to do it. i tried to read about IResourceStream but still, i didn't understand nothing... :( can someone help me with it? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to change the properties file location in Wicket
Hi, Create MyApplication.properties and put it next to MyApplication.java. On Thu, May 17, 2012 at 2:27 PM, oliver.stef ova...@gmail.com wrote: Hi all, I just start using Wicket and I have a big problem! I have a few sources files (Page (folder) with the files: Page1.html, Page1.java, Page1.properties, Page2(another folder) with the files: Page2.html, Page2.java, Page2.properties). now, my problem is that i want to merge all the *.properties file into one file (one *.properties file) that will be located in the src folder, or under the root folder. I don't know how to do it. i tried to read about IResourceStream but still, i didn't understand nothing... :( can someone help me with it? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Accessing .properties file
I am using netbeans for maven project(with added wicket framework) and i want to access something.properties from a java class. Tried to modify pom.xml but not worked. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Accessing-properties-file-tp4518748p4518748.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Accessing .properties file
I am using netbeans for maven project(with added wicket framework) and i want to access something.properties from a java class. Are the properties files not being put into the output jar/war files? Remember that Maven by default sets up a structure where *.java goes into src/main/java and everything else goes into src/main/resources. So the latter should have the something.properties file. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Accessing .properties file
Yes i had put it in the required folder but i think i didn't write the right code in pom.xml. Coiuld u please give me a sample of the code for the pom.xml for accessing .properties file Thanks for reply. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Accessing-properties-file-tp4518748p4518770.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Accessing .properties file
Coiuld u please give me a sample of the code for the pom.xml for accessing .properties file Not sure what you mean, you don't usually put code in pom.xml. Look into configuring the resource elements to include the correct file types and folders. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Accessing .properties file
I mean that if sample.properties is the required file, then how to define in the pom.xml The sample.properties file is in the folder src/java. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Accessing-properties-file-tp4518748p4518872.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Accessing .properties file
This is really a Maven question, not Wicket. You'll probably get better answers from a Maven forum. From: SudeepShakya shakyasud...@live.com To: users@wicket.apache.org Date: 03/30/2012 07:15 AM Subject:RE: Accessing .properties file I mean that if sample.properties is the required file, then how to define in the pom.xml The sample.properties file is in the folder src/java. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Accessing-properties-file-tp4518748p4518872.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
PropertyModel with x.y as property name (from a properties file)
Hello I have a form with new CompoundPropertyModelValueMap(properties) as model where properties are loaded from a properties file (legacy). My problem is that in properties file I have keys like x.y and I cannot use form.add(new TextFieldString(body.background-color)); How do I solve this problem? Thanks, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PropertyModel-with-x-y-as-property-name-from-a-properties-file-tp4282146p4282146.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: PropertyModel with x.y as property name (from a properties file)
Write you own model: public class PropertiesModel extends AbstractReadOnlyModelString { private Properties properties; private String key; // constructor ... public String getObject() { return properties.get(key); } } You can implement IComponentInheritedModel if you want to have the same magic supported by CompoundPropertyModel, e.g.: Form form = new Form(form, new MyPropertiesModel(properties)); form.add(new TextFieldString(body.background-color)); Hope this helps Sven Am 10.01.2012 15:44, schrieb Decebal Suiu: Hello I have a form with new CompoundPropertyModelValueMap(properties) as model where properties are loaded from a properties file (legacy). My problem is that in properties file I have keys like x.y and I cannot use form.add(new TextFieldString(body.background-color)); How do I solve this problem? Thanks, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PropertyModel-with-x-y-as-property-name-from-a-properties-file-tp4282146p4282146.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: PropertyModel with x.y as property name (from a properties file)
or don't use cpm On Jan 10, 2012 11:10 AM, Sven Meier s...@meiers.net wrote: Write you own model: public class PropertiesModel extends AbstractReadOnlyModelString { private Properties properties; private String key; // constructor ... public String getObject() { return properties.get(key); } } You can implement IComponentInheritedModel if you want to have the same magic supported by CompoundPropertyModel, e.g.: Form form = new Form(form, new MyPropertiesModel(properties))**; form.add(new TextFieldString(body.**background-color)); Hope this helps Sven Am 10.01.2012 15:44, schrieb Decebal Suiu: Hello I have a form with new CompoundPropertyModel**ValueMap(properties) as model where properties are loaded from a properties file (legacy). My problem is that in properties file I have keys like x.y and I cannot use form.add(new TextFieldString(body.** background-color)); How do I solve this problem? Thanks, Decebal -- View this message in context: http://apache-wicket.1842946.** n4.nabble.com/PropertyModel-**with-x-y-as-property-name-** from-a-properties-file-**tp4282146p4282146.htmlhttp://apache-wicket.1842946.n4.nabble.com/PropertyModel-with-x-y-as-property-name-from-a-properties-file-tp4282146p4282146.html Sent from the Users forum mailing list archive at Nabble.com. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
Hi, try starting your web server with these parameters: -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : Ùجب ادخا٠اس٠اÙدخÙÙ *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
...or try these instructions http://davidbits.blogspot.com/2010/12/how-to-change-tomcat-default-character.html Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : Ùجب ادخا٠اس٠اÙدخÙÙ *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
I am not using tomcat , I am using jetty . I guess the problem is in properties files encoding. On 20 September 2011 13:05, Andrea Del Bene-2 [via Apache Wicket] ml-node+s1842946n3826434...@n4.nabble.com wrote: ...or try these instructions http://davidbits.blogspot.com/2010/12/how-to-change-tomcat-default-character.html Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826434i=0 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826434i=1 - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826434i=2 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826434i=3 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826434.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. -- Ahmed Abdelfattah -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826441.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
This also only works on Java 6 and newer (UTF-8 support for properties files is a java 6 feature). Martijn On Tue, Sep 20, 2011 at 12:53 PM, aabfattah ahmed.abdelfattah.elshem...@gmail.com wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
I am using jdk1.6.0_23 On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] ml-node+s1842946n3826458...@n4.nabble.com wrote: This also only works on Java 6 and newer (UTF-8 support for properties files is a java 6 feature). Martijn On Tue, Sep 20, 2011 at 12:53 PM, aabfattah [hidden email] http://user/SendEmail.jtp?type=nodenode=3826458i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=2 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=4 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826458.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. -- Ahmed Abdelfattah -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826464.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
I get this info always in console : INFO - PropertiesFactory - Loading properties files from file:/D:/Ahmed_sandbox/Projects/EclipseProj/call-to-fix-17-9-5PM/call-to-fix/target/classes/com/orange/cairolab/sdp/calltofix/web/customer/AddNewCustomerPage.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace INFO - PropertiesFactory - Loading properties files from jar:file:/C:/Users/Master/.m2/repository/org/apache/wicket/wicket-core/1.5-RC5.1/wicket-core-1.5-RC5.1.jar!/org/apache/wicket/Application.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace On 20 September 2011 13:21, Ahmed Abdelfattah ahmed.abdelfattah.elshem...@gmail.com wrote: I am using jdk1.6.0_23 On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] ml-node+s1842946n3826458...@n4.nabble.com wrote: This also only works on Java 6 and newer (UTF-8 support for properties files is a java 6 feature). Martijn On Tue, Sep 20, 2011 at 12:53 PM, aabfattah [hidden email] http://user/SendEmail.jtp?type=nodenode=3826458i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=2 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=4 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826458.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. -- Ahmed Abdelfattah -- Ahmed Abdelfattah -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826469.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
The problem maybe in *IsoPropertiesFilePropertiesLoader* *In the API it says *Load properties from properties file. The encoding of the file must be ISO 8859-1. * * On 20 September 2011 13:22, Ahmed Abdelfattah ahmed.abdelfattah.elshem...@gmail.com wrote: I get this info always in console : INFO - PropertiesFactory - Loading properties files from file:/D:/Ahmed_sandbox/Projects/EclipseProj/call-to-fix-17-9-5PM/call-to-fix/target/classes/com/orange/cairolab/sdp/calltofix/web/customer/AddNewCustomerPage.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace INFO - PropertiesFactory - Loading properties files from jar:file:/C:/Users/Master/.m2/repository/org/apache/wicket/wicket-core/1.5-RC5.1/wicket-core-1.5-RC5.1.jar!/org/apache/wicket/Application.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace On 20 September 2011 13:21, Ahmed Abdelfattah ahmed.abdelfattah.elshem...@gmail.com wrote: I am using jdk1.6.0_23 On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] ml-node+s1842946n3826458...@n4.nabble.com wrote: This also only works on Java 6 and newer (UTF-8 support for properties files is a java 6 feature). Martijn On Tue, Sep 20, 2011 at 12:53 PM, aabfattah [hidden email] http://user/SendEmail.jtp?type=nodenode=3826458i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=2 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=4 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826458.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. -- Ahmed Abdelfattah -- Ahmed Abdelfattah -- Ahmed Abdelfattah -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826476.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
Better use .properties.xml format. The XML properties files are much more safe than plain .properties. See http://java.sun.com/dtd/properties.dtd and java.util.Properties.loadFromXML(InputStream) On Tue, Sep 20, 2011 at 2:24 PM, aabfattah ahmed.abdelfattah.elshem...@gmail.com wrote: The problem maybe in *IsoPropertiesFilePropertiesLoader* *In the API it says *Load properties from properties file. The encoding of the file must be ISO 8859-1. * * On 20 September 2011 13:22, Ahmed Abdelfattah ahmed.abdelfattah.elshem...@gmail.com wrote: I get this info always in console : INFO - PropertiesFactory - Loading properties files from file:/D:/Ahmed_sandbox/Projects/EclipseProj/call-to-fix-17-9-5PM/call-to-fix/target/classes/com/orange/cairolab/sdp/calltofix/web/customer/AddNewCustomerPage.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace INFO - PropertiesFactory - Loading properties files from jar:file:/C:/Users/Master/.m2/repository/org/apache/wicket/wicket-core/1.5-RC5.1/wicket-core-1.5-RC5.1.jar!/org/apache/wicket/Application.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@15f1ace On 20 September 2011 13:21, Ahmed Abdelfattah ahmed.abdelfattah.elshem...@gmail.com wrote: I am using jdk1.6.0_23 On 20 September 2011 13:19, Martijn Dashorst [via Apache Wicket] ml-node+s1842946n3826458...@n4.nabble.com wrote: This also only works on Java 6 and newer (UTF-8 support for properties files is a java 6 feature). Martijn On Tue, Sep 20, 2011 at 12:53 PM, aabfattah [hidden email] http://user/SendEmail.jtp?type=nodenode=3826458i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=2 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826458i=4 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826458.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. -- Ahmed Abdelfattah -- Ahmed Abdelfattah -- Ahmed Abdelfattah -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826476.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. You have two options here: 1. Unicode escape your arabic characters, using converters, like this one here http://www.rishida.net/tools/conversion/ (what works for you appears under JavaScript escapes) or 2. Use an xml file for language properties. Regards, Martin On Tue, Sep 20, 2011 at 1:53 PM, aabfattah ahmed.abdelfattah.elshem...@gmail.com wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
Well , the xml file didn't load and it loaded the default .properties files from wicket But the first trick worked :) On 20 September 2011 13:41, Martin A [via Apache Wicket] ml-node+s1842946n3826499...@n4.nabble.com wrote: Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. You have two options here: 1. Unicode escape your arabic characters, using converters, like this one here http://www.rishida.net/tools/conversion/ (what works for you appears under JavaScript escapes) or 2. Use an xml file for language properties. Regards, Martin On Tue, Sep 20, 2011 at 1:53 PM, aabfattah [hidden email] http://user/SendEmail.jtp?type=nodenode=3826499i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=2 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826499.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. -- Ahmed Abdelfattah -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826514.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
On Tue, Sep 20, 2011 at 1:41 PM, Martin A wml...@gmail.com wrote: Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. Wrong: with Java 6 you can load properties files written in UTF-8 (or any encoding for that matter): http://stackoverflow.com/questions/863838/problem-with-java-properties-utf8-encoding-in-eclipse/3040771#3040771 Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
On Tue, Sep 20, 2011 at 3:18 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: On Tue, Sep 20, 2011 at 1:41 PM, Martin A wml...@gmail.com wrote: Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. Wrong: with Java 6 you can load properties files written in UTF-8 (or any encoding for that matter): http://stackoverflow.com/questions/863838/problem-with-java-properties-utf8-encoding-in-eclipse/3040771#3040771 This is what our org.apache.wicket.resource.UtfPropertiesFilePropertiesLoader does actually. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
Just a short addition, the resource bundle editor plugin for eclipse is great for handling .properties files with UTF-8 characters. The files are stored with ISO encoding and UTF-8 characters are escaped correctly while you can use the unescaped in the editor. The Sanity Resort http://sanityresort.blogspot.com/ Am 20.09.2011 13:50, schrieb aabfattah: Well , the xml file didn't load and it loaded the default .properties files from wicket But the first trick worked :) On 20 September 2011 13:41, Martin A [via Apache Wicket] ml-node+s1842946n3826499...@n4.nabble.com wrote: Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. You have two options here: 1. Unicode escape your arabic characters, using converters, like this one here http://www.rishida.net/tools/conversion/ (what works for you appears under JavaScript escapes) or 2. Use an xml file for language properties. Regards, Martin On Tue, Sep 20, 2011 at 1:53 PM, aabfattah [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=2 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826499.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==.
Re: Arabic characters not appearing correctly from .properties file
On Tue, Sep 20, 2011 at 3:26 PM, Christian Huber hub...@butterbrot.org wrote: Just a short addition, the resource bundle editor plugin for eclipse is great for handling .properties files with UTF-8 characters. The files are stored with ISO encoding and UTF-8 characters are escaped correctly while you can use the unescaped in the editor. This is an option but not a good one. In my experience the developers support only the English version of the bundle and the people who translate to the other languages are not Eclipse (or any other IDE) users. The XML is the most convenient, I think. The Sanity Resort http://sanityresort.blogspot.com/ Am 20.09.2011 13:50, schrieb aabfattah: Well , the xml file didn't load and it loaded the default .properties files from wicket But the first trick worked :) On 20 September 2011 13:41, Martin A [via Apache Wicket] ml-node+s1842946n3826499...@n4.nabble.com wrote: Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. You have two options here: 1. Unicode escape your arabic characters, using converters, like this one here http://www.rishida.net/tools/conversion/ (what works for you appears under JavaScript escapes) or 2. Use an xml file for language properties. Regards, Martin On Tue, Sep 20, 2011 at 1:53 PM, aabfattah [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=2 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826499.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
Am 20.09.2011 14:31, schrieb Martin Grigorov: On Tue, Sep 20, 2011 at 3:26 PM, Christian Huberhub...@butterbrot.org wrote: Just a short addition, the resource bundle editor plugin for eclipse is great for handling .properties files with UTF-8 characters. The files are stored with ISO encoding and UTF-8 characters are escaped correctly while you can use the unescaped in the editor. This is an option but not a good one. In my experience the developers support only the English version of the bundle and the people who translate to the other languages are not Eclipse (or any other IDE) users. The XML is the most convenient, I think. In such situations you are right, an eclipse plugin is not suitable if resources should be created by non-developers. But in my experience that means such resources are created by members of the business departement and most xml files that we receive from those have issues like binary garbage in prolog (apart from BOM) or invalid use of xml entities etc. In such a scenario I would recommend the use a proper CMS if possible. But I guess that is another topic ;-) The Sanity Resorthttp://sanityresort.blogspot.com/ Am 20.09.2011 13:50, schrieb aabfattah: Well , the xml file didn't load and it loaded the default .properties files from wicket But the first trick worked :) On 20 September 2011 13:41, Martin A [via Apache Wicket] ml-node+s1842946n3826499...@n4.nabble.comwrote: Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. You have two options here: 1. Unicode escape your arabic characters, using converters, like this one herehttp://www.rishida.net/tools/conversion/ (what works for you appears under JavaScript escapes) or 2. Use an xml file for language properties. Regards, Martin On Tue, Sep 20, 2011 at 1:53 PM, aabfattah [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=0 wrote: Hello , I have written many .properties pages to show error messages in Arabic and saved them in UTF-8 format and they display like that : يجب ادخال اسم الدخول *Although I wrote all HTML in Arabic and it displays correctly * I am using Eclipse Helios and I set workspace encoding to UTF-8 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826406.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3826499i=2 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Arabic-characters-not-appearing-correctly-from-properties-file-tp3826406p3826499.html To unsubscribe from Arabic characters not appearing correctly from .properties file, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3826406code=YWhtZWQuYWJkZWxmYXR0YWguZWxzaGVtaXN5QGdtYWlsLmNvbXwzODI2NDA2fDI4MjAxMzAzNQ==. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Arabic characters not appearing correctly from .properties file
I had experience with a site which should have been used by both Chinese and English users. IMHO in this scenario the best solution is to have the entire stack setted to utf-8, which includes properties file (not XML), web server and database (extra ISO chars can be written to db). If you know a better approach or pattern please let me know. On Tue, Sep 20, 2011 at 1:41 PM, Martin Awml...@gmail.com wrote: Hi, Ahmed, As the Java specification defines, the .properties file contains only characters in ISO-8859-1, also known as Latin-1. Therefore you cannot enter arabic characters in a properties file. Wrong: with Java 6 you can load properties files written in UTF-8 (or any encoding for that matter): http://stackoverflow.com/questions/863838/problem-with-java-properties-utf8-encoding-in-eclipse/3040771#3040771 Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: quartz job bean access to properties file
Where exactly in this code you need access to .properties ? Here is a way with normal j.u.c Executor: java.util.concurrent.ThreadPoolExecutor.beforeExecute(Thread t, Runnable r) { if (r instanceof MyRunnable) { MyRunnable mr = (MyRunnable) r; mr.setApplication(Application.get()); } } abstract class MyRunnable implements Runnable { private Application app; public void setApplication(Application a) {app = a;} public abstract void onRun(); public void run() { try { Application.set(app); onRun(); } finally { Application.unset(); } } } And don't forget to shutdown the executor on Application#onDestroy() On Tue, Aug 10, 2010 at 9:52 PM, rmattler robertmatt...@gmail.com wrote: I'm struggling with how to get access to the properties file from a quartz job bean. I'm creating a pdf report that will then be emailed. I want to get access to the properties file to tell me where to write the file along with other information. Here is my quartz job code. Thanks in advance. package com.paybridgeusa.jobs; public class SendEmail extends QuartzJobBean { public void executeInternal(JobExecutionContext context) throws JobExecutionException { try { // get all tpas TPAUsersDAO usersDAO = (TPAUsersDAO) getApplicationContext(context).getBean(TPAUsersDAO); ListTpausers users = usersDAO.getAll(); for (Tpausers user : users) { String emailAddressTo = user.getEmail(); } } catch (Exception e) { System.out.println(e.getLocalizedMessage()); } } private static final String APPLICATION_CONTEXT_KEY = applicationContext; public ApplicationContext getApplicationContext(JobExecutionContext context) throws Exception { ApplicationContext applicationContext = null; applicationContext = (ApplicationContext) context.getScheduler().getContext().get(APPLICATION_CONTEXT_KEY); if (applicationContext == null) { throw new JobExecutionException(No application context available in scheduler context for key \ + APPLICATION_CONTEXT_KEY + \); } return applicationContext; } } application context xml !-- QUARTZ BEANS -- !-- SEND TERMINATION EMAILS JOB -- bean name=sendTermsEmail class=org.springframework.scheduling.quartz.JobDetailBean property name=jobClass value=com.paybridgeusa.jobs.SendTermsEmail/ property name=name value=sendTermsEmail/ /bean bean id=cronTriggerSendTermsEmail class=org.springframework.scheduling.quartz.CronTriggerBean property name=jobDetail ref=sendTermsEmail/ !-- run every 1 minutes -- property name=cronExpression value=0 0/1 * * * ?/ /bean !-- END SEND TERMINATION EMAILS JOB -- bean class=org.springframework.scheduling.quartz.SchedulerFactoryBean property name=triggers list ref bean=cronTriggerSendTermsEmail / /list /property property name=applicationContextSchedulerContextKey valueapplicationContext/value /property /bean !-- END QUARTZ BEANS -- -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/quartz-job-bean-access-to-properties-file-tp2320367p2320367.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
quartz job bean access to properties file
I'm struggling with how to get access to the properties file from a quartz job bean. I'm creating a pdf report that will then be emailed. I want to get access to the properties file to tell me where to write the file along with other information. Here is my quartz job code. Thanks in advance. package com.paybridgeusa.jobs; public class SendEmail extends QuartzJobBean { public void executeInternal(JobExecutionContext context) throws JobExecutionException { try { // get all tpas TPAUsersDAO usersDAO = (TPAUsersDAO) getApplicationContext(context).getBean(TPAUsersDAO); ListTpausers users = usersDAO.getAll(); for (Tpausers user : users) { String emailAddressTo = user.getEmail(); } } catch (Exception e) { System.out.println(e.getLocalizedMessage()); } } private static final String APPLICATION_CONTEXT_KEY = applicationContext; public ApplicationContext getApplicationContext(JobExecutionContext context) throws Exception { ApplicationContext applicationContext = null; applicationContext = (ApplicationContext) context.getScheduler().getContext().get(APPLICATION_CONTEXT_KEY); if (applicationContext == null) { throw new JobExecutionException(No application context available in scheduler context for key \ + APPLICATION_CONTEXT_KEY + \); } return applicationContext; } } application context xml !-- QUARTZ BEANS -- !-- SEND TERMINATION EMAILS JOB -- bean name=sendTermsEmail class=org.springframework.scheduling.quartz.JobDetailBean property name=jobClass value=com.paybridgeusa.jobs.SendTermsEmail/ property name=name value=sendTermsEmail/ /bean bean id=cronTriggerSendTermsEmail class=org.springframework.scheduling.quartz.CronTriggerBean property name=jobDetail ref=sendTermsEmail/ !-- run every 1 minutes -- property name=cronExpression value=0 0/1 * * * ?/ /bean !-- END SEND TERMINATION EMAILS JOB -- bean class=org.springframework.scheduling.quartz.SchedulerFactoryBean property name=triggers list ref bean=cronTriggerSendTermsEmail / /list /property property name=applicationContextSchedulerContextKey valueapplicationContext/value /property /bean !-- END QUARTZ BEANS -- -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/quartz-job-bean-access-to-properties-file-tp2320367p2320367.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
how to dinamically add a wicket property to the key in the properties file
Hi, I want to use key from properties file with wicket page property added in this value. I tried this way, but it doesn't work. String js=alert('+getString(alertmessage)+');; target.appendJavascript(js); alertmessage=Learning goal ${pagetitle} updated successfully. As result I got an alert with message: Learning goal ${pagetitle} updated successfully. What is wrong with this code? Zoran -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-dinamically-add-a-wicket-property-to-the-key-in-the-properties-file-tp2317893p2317893.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to dinamically add a wicket property to the key in the properties file
Try getString(alertmessage, Model.ofMap(Collections.singletonMap(pagetitle, My page title))); ** Martin 2010/8/8 zoran jeremy...@gmail.com: Hi, I want to use key from properties file with wicket page property added in this value. I tried this way, but it doesn't work. String js=alert('+getString(alertmessage)+');; target.appendJavascript(js); alertmessage=Learning goal ${pagetitle} updated successfully. As result I got an alert with message: Learning goal ${pagetitle} updated successfully. What is wrong with this code? Zoran -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-dinamically-add-a-wicket-property-to-the-key-in-the-properties-file-tp2317893p2317893.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to dinamically add a wicket property to the key in the properties file
Martin, I've tried this, but it doesn't work. Any other idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-dinamically-add-a-wicket-property-to-the-key-in-the-properties-file-tp2317893p2317912.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to dinamically add a wicket property to the key in the properties file
Please use debugger and find out why it does not work. Should work. ** Martin 2010/8/8 zoran jeremy...@gmail.com: Martin, I've tried this, but it doesn't work. Any other idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-dinamically-add-a-wicket-property-to-the-key-in-the-properties-file-tp2317893p2317912.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to dinamically add a wicket property to the key in the properties file
Sorry, I don't know why it didn't work before, but it works now. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-dinamically-add-a-wicket-property-to-the-key-in-the-properties-file-tp2317893p2317938.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataView sort .properties file
Hello all, i'm using DataView to display html table with sorting feature. Thanks to wicket example, Sorting DataView Example - builds on previous to demonstrate sorting http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.SortingPage The problem is: one of fields' type is integer 1, 2, 3, 4 ..., which represents Very High, High, Normal, Low... I use .properties file to display meaningful values to table cells. i can't sort the field properly, because it's always sorting by field's real value (1, 2, 3), not displaying value. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataView-sort-properties-file-tp2294973p2294973.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Easy fast question, properties ´file for validation....
I do not know wghy is not rendering my property field, I was doing a king prove of concept, and I ahve this 2 files: ( I do not have border and nothing, can you see a anything¿? **Home.java*** */ public class HomePage extends WebPage { private static final long serialVersionUID = 1L; */ public HomePage(final PageParameters parameters) { // Add the simplest type of label add(new Label(message, If you see this message wicket is properly configured and running)); FeedbackPanel fbp=new FeedbackPanel(fbp); Model campoModel=new Model(); TextField campo =new TextField(campo, campoModel); campo.setRequired(true); Form formulario=new Form(formulario); formulario.add(campo); add(formulario); add(fbp); // TODO Add your page's components here } } ***Home.properties*** at the same level as the other one Required=my custom messages ${label} formulario.campo.Required=my custome message for my form!!! thank you very much guy -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256542.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Easy fast question, properties ´file for valida tion....
On Tue, Jun 15, 2010 at 4:03 PM, Victor_Trapiello vic...@trapiello.netwrote: I do not know wghy is not rendering my property field, I was doing a king prove of concept, and I ahve this 2 files: ( I do not have border and nothing, can you see a anything¿? **Home.java*** */ public class HomePage extends WebPage { private static final long serialVersionUID = 1L; */ public HomePage(final PageParameters parameters) { // Add the simplest type of label add(new Label(message, If you see this message wicket is properly configured and running)); FeedbackPanel fbp=new FeedbackPanel(fbp); Model campoModel=new Model(); TextField campo =new TextField(campo, campoModel); campo.setRequired(true); Form formulario=new Form(formulario); formulario.add(campo); add(formulario); add(fbp); // TODO Add your page's components here } } ***Home.properties*** at the same level as the other one Required=my custom messages ${label} formulario.campo.Required=my custome message for my form!!! thank you very much guy -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256542.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Are you asking why your Required strings are not being rendered? If so, please check that your properties file has the same name as your java file. There are some inconsistencies in your email - not sure if this is just a typo in the email or what -- Jeremy Thomerson http://www.wickettraining.com
Re: Easy fast question, properties ´file for valida tion....
On Tue, Jun 15, 2010 at 4:25 PM, Victor_Trapiello vic...@trapiello.netwrote: Hello mate, thank you very much for your fast reply I´m asking why my messages (the ones that I put in my property file are not appearing), as you can see I have put the same name in both files, Home.java and Home.properties I´m doing somethiong wrong... I know but.. what¿? cheersss -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256573.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org What I'm saying is that somewhere you have an error in naming - either in your code, or in the email. You say that your file is named Home.java, but the code is for the HomePage class. This would create a compile error. So, it seems possible that your file is actually HomePage.java, in which case your properties file should be HomePage.properties. -- Jeremy Thomerson http://www.wickettraining.com
How to keep language .properties file in a separate folder from the html pages
I would like to keep my .html files in a seperate folder from the language files and I was wondering how to do this? I keep my html files in html/main/*.html and my language .properties files in language/(languageName)/*.properties. I tried adding the following to my MyWebApp. When I try and run my app there is a location error about not being able to find my .properties file. I was wondering if anyone knew how to fix/resolve this or if it would be better just to keep the .properites file in the same directory as the html file. @Override protected void init() { super.init(); IResourceSettings resourceSettings = getResourceSettings(); resourceSettings.addResourceFolder(html/main); resourceSettings.addResourceFolder(language/en-us); resourceSettings.addResourceFolder(language/esp); . resourceSettings.setResourceStreamLocator(new PathStripperLocator()); } -- Eric Reagan
Re: How to keep language .properties file in a separate folder from the html pages
when such an error happens, as part of it there is a message that tells you to enable a resource logger to see all paths tried. what does that output? -igor On Fri, Feb 26, 2010 at 10:33 AM, Eric Reagan reaga...@gmail.com wrote: I would like to keep my .html files in a seperate folder from the language files and I was wondering how to do this? I keep my html files in html/main/*.html and my language .properties files in language/(languageName)/*.properties. I tried adding the following to my MyWebApp. When I try and run my app there is a location error about not being able to find my .properties file. I was wondering if anyone knew how to fix/resolve this or if it would be better just to keep the .properites file in the same directory as the html file. �...@override protected void init() { super.init(); IResourceSettings resourceSettings = getResourceSettings(); resourceSettings.addResourceFolder(html/main); resourceSettings.addResourceFolder(language/en-us); resourceSettings.addResourceFolder(language/esp); . resourceSettings.setResourceStreamLocator(new PathStripperLocator()); } -- Eric Reagan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
I'm using both and they work fine. On Mon, Feb 8, 2010 at 11:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
Igor, how do you inject the configuration bean in the Wicket application? Do you use http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks, Alec On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
the annotation-based approach is the most often used on that page. On Feb 8, 2010, at 5:28 PM, Alec Swan wrote: Igor, how do you inject the configuration bean in the Wicket application? Do you use http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks, Alec On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
Re: Loading properties file while using Spring @L
personally, i use salve (salve.googlecode.com) so i can inject into any object... -igor On Mon, Feb 8, 2010 at 5:28 PM, Alec Swan alecs...@gmail.com wrote: Igor, how do you inject the configuration bean in the Wicket application? Do you use http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks, Alec On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
Andrew, I use @SpringBean annotations in Wicket components. How do you use annotation-based approach to inject dependencies in the Wicket application object? On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi and...@mysticcoders.com wrote: the annotation-based approach is the most often used on that page. On Feb 8, 2010, at 5:28 PM, Alec Swan wrote: Igor, how do you inject the configuration bean in the Wicket application? Do you use http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks, Alec On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
You can inject anything you like that's annotated with the @SpringBean annotations: InjectorHolder.getInjector().inject(someNonComponentObject); On Mon, Feb 8, 2010 at 8:46 PM, Alec Swan alecs...@gmail.com wrote: Andrew, I use @SpringBean annotations in Wicket components. How do you use annotation-based approach to inject dependencies in the Wicket application object? On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi and...@mysticcoders.com wrote: the annotation-based approach is the most often used on that page. On Feb 8, 2010, at 5:28 PM, Alec Swan wrote: Igor, how do you inject the configuration bean in the Wicket application? Do you use http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks, Alec On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
Thanks James, this is awesome! This is what I ended up doing in my Wicket WebApplication object: @SpringBean(name = myConfiguration) private MyConfiguration myConfiguration; protected void init() { super.init(); // integrate with Spring addComponentInstantiationListener(new SpringComponentInjector(this)); InjectorHolder.getInjector().inject(this); // injects @SpringBean dependencies of this object } On Mon, Feb 8, 2010 at 6:52 PM, James Carman jcar...@carmanconsulting.com wrote: You can inject anything you like that's annotated with the @SpringBean annotations: InjectorHolder.getInjector().inject(someNonComponentObject); On Mon, Feb 8, 2010 at 8:46 PM, Alec Swan alecs...@gmail.com wrote: Andrew, I use @SpringBean annotations in Wicket components. How do you use annotation-based approach to inject dependencies in the Wicket application object? On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi and...@mysticcoders.com wrote: the annotation-based approach is the most often used on that page. On Feb 8, 2010, at 5:28 PM, Alec Swan wrote: Igor, how do you inject the configuration bean in the Wicket application? Do you use http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks, Alec On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loading properties file while using Spring @L
Igor, I looked at Salve even though James suggestion will work for my small project. If I understood correctly Salve is an IoC container which can serialize objects with complex dependencies. I think this can be very useful when serializing Wicket components that depend on DAO or other types of services. Thanks! Alec On Mon, Feb 8, 2010 at 7:08 PM, Alec Swan alecs...@gmail.com wrote: Thanks James, this is awesome! This is what I ended up doing in my Wicket WebApplication object: @SpringBean(name = myConfiguration) private MyConfiguration myConfiguration; protected void init() { super.init(); // integrate with Spring addComponentInstantiationListener(new SpringComponentInjector(this)); InjectorHolder.getInjector().inject(this); // injects @SpringBean dependencies of this object } On Mon, Feb 8, 2010 at 6:52 PM, James Carman jcar...@carmanconsulting.com wrote: You can inject anything you like that's annotated with the @SpringBean annotations: InjectorHolder.getInjector().inject(someNonComponentObject); On Mon, Feb 8, 2010 at 8:46 PM, Alec Swan alecs...@gmail.com wrote: Andrew, I use @SpringBean annotations in Wicket components. How do you use annotation-based approach to inject dependencies in the Wicket application object? On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi and...@mysticcoders.com wrote: the annotation-based approach is the most often used on that page. On Feb 8, 2010, at 5:28 PM, Alec Swan wrote: Igor, how do you inject the configuration bean in the Wicket application? Do you use http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks, Alec On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i usually create a seperate bean that represents the properties and let spring fill those in via the property configurer. then inject the bean and you are done. -igor On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan alecs...@gmail.com wrote: Igor, were you suggesting the same approach as James did? If so, I am already using @SpringBean annotations and I am wondering if they will continue to work with the http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach approach? Thanks. On Mon, Feb 8, 2010 at 4:41 AM, James Carman jcar...@carmanconsulting.com wrote: You can use the Spring integration to actually create your application object for you: http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Then, you can wire in anything into it that you want, just like any other Spring bean (because it *is* just another Spring bean) On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan alecs...@gmail.com wrote: I use Wicket, Spring and wicket-spring extensions. Spring configuration loads properties from config/env.properties file using PropertyPlaceholderConfigurer. I would like to add more properties to this file and read them from my Wicket application class. I tried to inject a Spring Resource using @SpringBean annotation, but it doesn't work in the my Wicket application class. I am looking for recommendations on how to read properties files from wicket application class. Ideally I would like to use a single properties file read by Wicket and Spring. Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 714-816-4488 fax: 714-782-6024 cell: 714-697-8046 linked-in: http://www.linkedin.com/in/andrewlombardi twitter: http://www.twitter.com/kinabalu Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient