getInitParameter returns null
Hello *, I'm having troubles with WebApplication.getInitParameter() method. In the init() method of MyApp I call getInitParameter(myPar); It returns null. in web.xml I have filter filter-namewicket.MyApp/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter- class init-param param-nameapplicationClassName/param-name param-valueexample.MyApp/param-value /init-param init-param param-namemyPar/param-name param-valuemyValue/param-value /init-param [...] Why getInitParameter returns null instead of myValue? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getInitParameter returns null
i can't reproduce ,which wicket version and servlet container are you on? On Sat, Oct 13, 2012 at 12:41 PM, Lucio Crusca lu...@sulweb.org wrote: Hello *, I'm having troubles with WebApplication.getInitParameter() method. In the init() method of MyApp I call getInitParameter(myPar); It returns null. in web.xml I have filter filter-namewicket.MyApp/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter- class init-param param-nameapplicationClassName/param-name param-valueexample.MyApp/param-value /init-param init-param param-namemyPar/param-name param-valuemyValue/param-value /init-param [...] Why getInitParameter returns null instead of myValue? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getInitParameter returns null
In data sabato 13 ottobre 2012 11:53:54, vineet semwal ha scritto: i can't reproduce ,which wicket version and servlet container are you on? Wicket version 6.0 and not sure about the servlet container, because what's failing is the automatic tests Netbeans runs before running the app. My unit test creates the application instance, the instance calls init(), init() calls getInitParameter and then it throws an exception after the received null. No worries about the exception, it's correct it is being thrown on nulls, but that's making my unit test fail. I don't know what servlet container Netbeans uses when it runs tests. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getInitParameter returns null
In data sabato 13 ottobre 2012 12:37:33, Lucio Crusca ha scritto: I don't know what servlet container Netbeans uses when it runs tests. Btw, mvn test from command line fails also in the same way. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getInitParameter returns null
this is not the problem in normal run but in testing.. wickettester itself doesn't use any servelt container, you don't have to yourself call init() on your own,use new wickettester(new myap()) wickettester will do all the setup and call init() too. you can later retrieve by tester.getApplication().getInitParameter(myPar) ,basically application.getInitParameter(parameter)== application.getfilerconfig().getInitParameter(parameter) afaik this is how it would have worked ,however it won't i just checked the wickettester's source the reason is tester doesn't provide anyway of adding init parameters to mock filterconfig which means mock filterconfig should also add methods for that or wickettester should provide constructor through which you can pass your custom fileterconfig. i think others will tell if a jira ticket for this should be created or if i have overlooked something ;) On Sat, Oct 13, 2012 at 4:07 PM, Lucio Crusca lu...@sulweb.org wrote: In data sabato 13 ottobre 2012 11:53:54, vineet semwal ha scritto: i can't reproduce ,which wicket version and servlet container are you on? Wicket version 6.0 and not sure about the servlet container, because what's failing is the automatic tests Netbeans runs before running the app. My unit test creates the application instance, the instance calls init(), init() calls getInitParameter and then it throws an exception after the received null. No worries about the exception, it's correct it is being thrown on nulls, but that's making my unit test fail. I don't know what servlet container Netbeans uses when it runs tests. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: button submit
Oh the solution is validation. ONLY when you have a validated form (all inputs are inserted) then the submit button will be called. You can add a feedback panel, which will help you: in JAVA: form.add(new FeedbackPanel(feedback)); in HTML: form ... ... /form -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/button-submit-tp4650594p4652941.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
CompoundPropertyModel not working... Warning message
Tried so much... still not working.. I get the following warning message: /WARNING: A ResourceReference wont be created for a resource with key [scope: template.BasePage; name: wicket-logo.png; locale: null; style: null; variation: null] because it cannot be located./ Here is the Java File: And the HTML file: What am I missing? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-not-working-Warning-message-tp4652942.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: CompoundPropertyModel not working... Warning message
Hi! It's not clear what you mean by not working but I'll assume you expect your Invoice object to be populated when the submit button is clicked. It won't work with your code because you have disabled default form processing with your submit button. You actually don't even need a Wicket component for the submit button. Just include an input type=submit inside your form markup. To handle the submit, you can override Form#onSubmit(). The warning message is not related to your form model issues. Maybe you're referring to wicket-logo.png with a PackageResourceReference but it's not actually alongside BasePage? Hope that helps, Dan On Sun, Oct 14, 2012 at 12:12 AM, delta458 delta...@hotmail.com wrote: Tried so much... still not working.. I get the following warning message: /WARNING: A ResourceReference wont be created for a resource with key [scope: template.BasePage; name: wicket-logo.png; locale: null; style: null; variation: null] because it cannot be located./ Here is the Java File: And the HTML file: What am I missing? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-not-working-Warning-message-tp4652942.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: CompoundPropertyModel not working... Warning message
I disabled default form processing because I need to, for my project. I will use another validation framework for validating. Also when it is enabled, my object was not populated... I will try again though... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-not-working-Warning-message-tp4652942p4652944.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: CompoundPropertyModel not working... Warning message
If you don't add any of the standard validators, doesn't that accomplish your goal? I think you still want form processing which includes population of model objects from the raw submitted strings. If you're using another post-submit validation framework, you probably want to override Form#onValidateModelObjects() which is for that purpose. On Sun, Oct 14, 2012 at 1:19 AM, delta458 delta...@hotmail.com wrote: I disabled default form processing because I need to, for my project. I will use another validation framework for validating. Also when it is enabled, my object was not populated... I will try again though... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-not-working-Warning-message-tp4652942p4652944.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: CompoundPropertyModel not working... Warning message
Ah great. It works now. I enabled the validation and somehow it works now... I tested it x times before with no results.. well thanks.. :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CompoundPropertyModel-not-working-Warning-message-tp4652942p4652946.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