Re: WicketTester, FormTester, and AjaxSubmitLink
* James McLaughlin: Hi, Hacking away at some tests, I figured the proper way to test an AjaxSubmitLink would have been as follows: Panel p = tester.startPanel(EventPanel.class); FormTester ft = tester.newFormTester(p.getId() + :eventForm); ft.setValue(messageField, ALARM_MESSAGE); tester.clickLink(p.getId() + :eventFormSubmitLink, true); However, the values set in the FormTester don't get submitted for some reason. It works if I change it to: Panel p = tester.startPanel(EventPanel.class); tester.setParameterForNextRequest(p.getId() + :eventForm:messageField, ALARM_MESSAGE); tester.clickLink(p.getId() + :eventFormSubmitLink, true); which while 1 line briefer, didn't seem intuitive (to me at least). Is it possible to make it work like the former, or is it better left as it is? Is it WICKET-932? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Experiences with ReloadingWicketFilter
* Peter Thomas: Just curious to know if others have problems with the ReloadingWicketFilter when you make minor changes to a page with markup inheritance, you may want to look at the issue history. FYI the problem described in the JIRA issue is not related to markup inheritance. The exception is thrown because the class TestPage is loaded from two different classloaders, thus TestPage(classloader1) != TestPage(classloader2). -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Experiences with ReloadingWicketFilter
* Peter Thomas: Soto confirmmy understanding,when usingthe ReloadingWicketFilter, when you make a change to a Page you have to re-trace navigation to a point prior to where the Page is loaded. Is that correct? You have to make sure you're not using an instance of a page loaded in a previous classloader, ie make sure not to keep an instance of a page across reloads. I'm justhoping that something canbe done (or un-done) to improve the developer experience when using ReloadingWicketFilter. To be honest ReloadingWicketFilter is a hack to work around how the JVM loads classes, and it is bootstrapped during the Wicket application initialization. If ReloadingWicketFilter is causing more problems than it is meant to solve, we might simply want to remove it from Wicket, especially if it proves to be unreliable in complex setups. Unless you're willing to turn your hope into contribution? Have you seen my suggestion to clear your session cookie before reloading the page BTW? All this is very complicated I realize, but there's not much we can do to simplify reloading. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketTester, testing Form and SubmitLink
* wicket user: I've raised the issue, https://issues.apache.org/jira/browse/WICKET-932 Thanks! Jean, please excuse my ignorance but when you request a quickstart project do you mean you want the whole quickstart project with the problem illustrated zipped into my file. Anything that helps us to go straight to the problem can be helpful. This can be: * A Java project with pom.xml, jetty launcher and relevant sources. This is probably not really the best thing to do for the problem at hand * Unit tests, this is especially useful if the problem is about WicketTester itself It is preferrable to submit the unit tests as a patch to the existing Wicket test classes, but if you file whole classes, that will do it as well. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding Modification file Watcher
* Edi: I have one server path folder. It contains .xls files. I want to check what are the current updated xls file. and insert that xls file name into db. for eg. i have a folder FOLDER1, It contains sales.xls, report.xls. If I change and save this file. Our program(file watcher) have to know immediately and insert that file and updated time. Is it possible in wicket? I saw wicket api, wicket.util.watch.ModificationWatcher, Is it useful to me? Yes it can be used for this, I used it in ReloadingClassLoader, and Wicket uses it internally for markup files. You could also use FAM in Commons JCI I believe. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-dojo questions and answers
* Kirk Israel: Q. a. Why isn't this stuff documented in more depth? b. And why don't people answer every stupid little question I have. A. a. Wicketstuff-Dojo is still a fairly young project with people who are currently more into coding it for more functionality than documenting. You're certainly welcome to contribute. b. These volunteers aren't interested in doing your work for you! And they're busy. And your questions are sometimes dumb. Hi Kirk, Your questions and answers about the Java components are valuable, feel free to improve the Wiki documentation for WicketStuff Dojo: http://wicketstuff.org/confluence/display/STUFFWIKI/WicketStuff+Dojo Why didn't we reply earlier to your message: because August is holidays for most of WicketStuff Dojo developers. And there is another reason: Vincent Demay who is the most active developer has not yet subscribed to the Apache mailing-list. So bear with us, and keep up with your feedback, it's appreciated. Note that like all other OSS (Open Source Software) developers, we have very limited time to work on those projects. Our main job is *not* about polishing WicketStuff Dojo, nor even working with Wicket most of the time. Cheers, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketTester, testing Form and SubmitLink
* wicket user: I'm trying to test a form submission with SubmitLink, test code below: tester.setParameterForNextRequest(numberChangeForm:numberToChangeTo, numberToChangeTo); reset(smsServiceMock); smsServiceMock.sendActivationSms(isA(Subscriber.class)); replay(smsServiceMock); // submit the form //tester.clickLink(numberChangeForm:numberChangeSubmitLink); tester.submitForm(numberChangeForm); snip/ - trying to call the link directly but I just get the below exception which I'm not really surpised about java.lang.IllegalArgumentException: The component class doesn't seem to implement any of the known *Listener interfaces: class com.yeigo.view.wicket.register.RegistrationCheckPage$2 This is a bug in WicketTester (BaseWicketTester actually). Like Igor suggests, please create a JIRA issue at https://issues.apache.org/jira/browse/WICKET If you could provide a quickstart project, that would be great too. Thanks, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get HTML source code from a wicket page
* oliver.henlich: Hi Jean-Baptiste, just wondering if you got a chance to look at this? Hi Oliver, I have identified the bug thanks to your stacktrace, and it would be great if you could file an issue on JIRA. Something like: ExceptionErrorPage only works with WebResponse Thanks in advance, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Palette and FormTester
* mperham: It's hackish but this modified selectMultiple works for me: public void selectMultiple(String formComponentId, int[] indexes) { checkClosed(); // This is a hack to get Palette selection working with FormTester. // Note we can't reference the palette class directly since FormTester // is in wicket and Palette is in wicket-extensions so we need to do // some acrobatics to deal with this. Component c = (Component) workingForm.get(formComponentId); if (!(c instanceof FormComponent)) { // Palette is not a FormComponent FormComponent recorder = (FormComponent) workingForm.get(formComponentId + :recorder); String recorderValue = recorder.getValue(); IChoiceRenderer renderer = (IChoiceRenderer)callGetter(c, getChoiceRenderer); Collection choices = (Collection)callGetter(c, getChoices); List choiceList = new ArrayList(choices); for (int i = 0; i indexes.length; i++) { int j = indexes[i]; Object value = choiceList.get(j); String val = renderer.getIdValue(value, j); recorderValue += val; if (i + 1 indexes.length) { recorderValue += ,; } } setFormComponentValue(recorder, recorderValue); return; } FormComponent fc = (FormComponent) c; ChoiceSelector choiceSelector = choiceSelectorFactory.createForMultiple(fc); for (int i = 0; i indexes.length; i++) { choiceSelector.doSelect(indexes[i]); } } private Object callGetter(Object self, String method) { try { Method m = self.getClass().getMethod(method, null); return m.invoke(self, null); } catch (Exception e) { throw new RuntimeException(e); } } Dear Mike, If FormTester is missing a feature to work with the Palette, why not submitting a patch in JIRA? Thanks in advance, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DownloadLink hanging
* Igor Vaynberg: yep, DownloadLinks will block because requests to the same page are serialized. Igor, that's a good point. Thomas, did you try to follow the approach shown in the static pages examples? See http://wicketstuff.org/wicket13/staticpages/ -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: creating RSS feeds with Wicket
* Ryan Sonnek: http://www.jroller.com/wireframe/entry/wicket_and_rss_feeds Just wanted to post an announcement that there's a new wicket stuff project (wicketstuff-rome) to allow for creation of RSS (or Atom) feeds from within Wicket. I've been using it for the past several weeks and it's allowed me to integrate RSS feeds into my Wicket app *very* quickly. This new project is a definite step up from the existing wicket wiki article for Rss pages, but I'm not sure what to do about that info. Please let me know if anyone has suggestions or issues with the project. Now that it's on wicketstuff, feel free to tweak or add features! Actually to make it really reusable I would have put protected abstract SyndFeed getFeed(); in FeedOutputComponent. So that we can have the feed output in a component of a page instead of a full page. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: creating RSS feeds with Wicket
* Ryan Sonnek: I'm not familiar with IResourceStream and using a WebPage approach has allowed for me to have great control over several aspects including: * url mount points * url parameter strategies * possibly configuring the response Expires/Cache headers? Do you have any examples of how this would work as a resource stream? Igor will hate me, but here it is: http://wicketstuff.org/wicket13/staticpages/ -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]