Re: What is the way to test a behavior?
Thanks, works like expected. You right. If i throw another exception (ex. IAE) the assertion on rendered page is working. So checking the last response status seems to be natural. Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxCallListener precondition with user input
Hi, Please create a quickstart and attach it to Jira. On Fri, Nov 2, 2012 at 2:26 PM, Thomas Heigl tho...@umschalt.com wrote: Hey all, I'm currently in the progress of migrating a largish Wicket 1.5 app to Wicket 6.2. The only major problem I could not resolve so far are precondition scripts with user input. My old code looked like this: @Override public CharSequence postDecorateScript(Component component, CharSequence script) { return jConfirm(function(r) { if (r) { + script + }});; } The whole script was decorated and the callback only executed if the user pressed OK in a custom confirmation dialog. In Wicket 6, there are no more script decorators, just listeners that provide hooks into the ajax lifecycle, so I changed my code to this: @Override public CharSequence getPrecondition(final Component component) { return jConfirm(function(r) { if (r) { return true; } }); return false;; } The problem is, that the callback function I'm passing to jConfirm is evaluated only when the user makes a selection, but the precondition has to return an output immediately. It would work if we used browser-level confirmation dialogs, but we use a custom jquery dialog for better user experience. Is there any way to emulate the pre-Wicket 6 behavior using listeners? Kind regards, Thomas -- 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
Link url in ListView on ajaxed panel not resolving properly
Hi, I'm using wicket 1.5.7 I've got a page that has a filter widget in it and a summary list of results that correspond to the filter criteria. When the page initially renders the widget and the default results show. When the filter is changed and an apply filter button is clicked, the results update. The results are displayed through a ListView, one of the components added to each ListItem is a link. This link resolves fine for the default results but when the filter widget is changed and the results updated, the link does not resolve. The link is created as follows: When the page is first rendered the link mentioned above can be clicked and resolves fine to the ManageRealtyAdvert page. The links in the default results look like the following: http://localhost:8080/wicket/page?23-1.ILinkListener-summaryResults-summaries-0-accountRealtyAdvertDisplay However when the results are updated through AJAX the links in the new summary panel do not resolve properly and I get an exception: java.lang.ClassNotFoundException: page and the links look like: http://localhost:8080/wicket/bookmarkable/page?25-1.ILinkListener-summaryResults-summaries-0-accountRealtyAdvertDisplay the only difference between the good urls and the bad urls is the bookmarkable/ in the middle of the bad urls, in fact if I manually remove the bookmarkable/ string the link resolves fine. An extended stack trace is as follows Can anyone suggest what I'm doing wrong. Cheers Simon B -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Link-url-in-ListView-on-ajaxed-panel-not-resolving-properly-tp4653596.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: Link url in ListView on ajaxed panel not resolving properly
Have you tried with 1.5.8 ? Sven On 11/03/2012 10:22 PM, Simon B wrote: Hi, I'm using wicket 1.5.7 I've got a page that has a filter widget in it and a summary list of results that correspond to the filter criteria. When the page initially renders the widget and the default results show. When the filter is changed and an apply filter button is clicked, the results update. The results are displayed through a ListView, one of the components added to each ListItem is a link. This link resolves fine for the default results but when the filter widget is changed and the results updated, the link does not resolve. The link is created as follows: When the page is first rendered the link mentioned above can be clicked and resolves fine to the ManageRealtyAdvert page. The links in the default results look like the following: http://localhost:8080/wicket/page?23-1.ILinkListener-summaryResults-summaries-0-accountRealtyAdvertDisplay However when the results are updated through AJAX the links in the new summary panel do not resolve properly and I get an exception: java.lang.ClassNotFoundException: page and the links look like: http://localhost:8080/wicket/bookmarkable/page?25-1.ILinkListener-summaryResults-summaries-0-accountRealtyAdvertDisplay the only difference between the good urls and the bad urls is the bookmarkable/ in the middle of the bad urls, in fact if I manually remove the bookmarkable/ string the link resolves fine. An extended stack trace is as follows Can anyone suggest what I'm doing wrong. Cheers Simon B -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Link-url-in-ListView-on-ajaxed-panel-not-resolving-properly-tp4653596.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: Custom CSS for Feedback message is broken in 1.5
Hi, You can use set of div class and set css on div class easily. Thanks! - JBoss Developers || JBPM Workflow -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Custom-CSS-for-Feedback-message-is-broken-in-1-5-tp4653166p4653593.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
format value missing in ConversionException thrown by wicket-datetime's DateConverter
Hi, I just thought how neat it'd be, if the ConversionException created and thrown by DateConverter.convertToObject() would contain the format used for the parse attempt.. A call on .setFormat(format) on the created ConversionException would do the job, and one could present a more specific error message than (in my case) 'start' is not a valid Date. How's that?
Handle feedback-Messages with a custom validation framework
Hi all, I am using my own validation, but the view of the form (e.g. if a component is invalid) should be highlighted or customized within wicket... So e.g. I have my Wicket Form /form wicket:id=inputForm p label for=RecipientRecipient/label input wicket:id=Recipient id=Recipient type=text size=40/ /p p label for=DetailsDetails/label input wicket:id=Details id=Details type=text size=40/ /p /form/ Then I have my Form.java: Here I set the values of my Java Object Invoice and use *onValidateModelObjects* to override the wicket validation and use my own validation... This method just calls a simple own created ValidatorObject that takes care of the validation... / public InvoiceForm() { ... FormInvoice form = new Form(inputForm, formModel) { /* * Validation takes place here */ @Override public void onValidateModelObjects() { ValidationProcess vp = new ValidationProcess(); vp.validate(Rules.js, r); msg = ; if (vp.getConstraintViolations().size() 0) { for (String s : vp.getConstraintViolations()) { msg = msg + s; } } else { msg = no errors.; } } }; //adding Textfields to the Form etc... ... }/ What I need: Above you can see that my errorMessages will be saved into the msg String! Now what I want is Wicket to take this String and apply it to the Wicket FeedBackMessage System or however... *1. I need to get the component that will be rendered at the moment... 2. I have to set the error Message of this component to my component... how can I do that?* I guess I need to override some methods, but I dont know which ones and where... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Handle-feedback-Messages-with-a-custom-validation-framework-tp4653599.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