Re: CheckGroup and AjaxPagination
I added a ajax event handler to the checks in my pageable list view like this add(new AjaxEventBehavior("onclick") { @Override protected void onEvent(AjaxRequestTarget target) { List list = (List) checkGroup.getModelObject(); Object o = item.getModelObject(); if(list.contains(o)) list.remove(o); else list.add(o); //database commit } }); Additionally I overwrote updateModel() of the check group @Override public void updateModel() { // do nothing on purpose. } Works fine for me. But it would be helpful if there was a official solution to achieve the same behavior. -Conny vermas wrote: > > Hi, > > I'm trying to implement checkgroup with pagination and the I need to > know when the user clicks on the submit button as what checkboxes he > selected on various pages. > But it doesn't remember it. Only the current page. > Does anybody has faced this problem and the solution for this. > > Thanks > Shalini > > -- View this message in context: http://old.nabble.com/CheckGroup-and-AjaxPagination-tp27426507p27695188.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: Unexpected RuntimeException: RestartResponseException in onBeforeRender of cached page
I created a quickstart project to reproduce the error. Curiously, the problem does not show up in the automated test case. It does show up however if you run jetty and then click "TabbedPanels"-->"intercept"-->"Tabbed Panel". The difference between the test case and the browser variant seems to be that in the former the AbortException is ultimately (after being rethrown nested in a WicketRuntimeException) caught in the WebRequestCycle.step() method (where a while-loop looks for the cause until it finds the AbortException). In the latter variant the AbortException is caught (also after being rethrown nested in a WicketRuntimeException) in the WebRequestCycle.redirectTo() method where the test of instanceof AbortException fails because the outer exception is a WicketRuntimeException. http://www.nabble.com/file/p21850546/onbeforerender.zip onbeforerender.zip -- View this message in context: http://www.nabble.com/Unexpected-RuntimeException%3A-RestartResponseException-in-onBeforeRender-of-cached-page-tp21683689p21850546.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: Unexpected RuntimeException: RestartResponseException in onBeforeRender of cached page
Yes, I found this issue https://issues.apache.org/jira/browse/WICKET-1478. I'm using wicket 1.3.5 which is supposed to solve it. However, my issue remains. Michael Sparer wrote: > > which version are you using? for me it sounds like this problem, see the > (solved) jira issue: https://issues.apache.org/jira/browse/WICKET-1478 > > but I'm sure you don't mean that behaviour as you certainly searched the > list and the jira before posting, am I right? ;-) > > regards > Michael > > > ckuehne wrote: >> >> I have the following use case: >> >> I go from Page A to Page B passing an instance of A as return page to B. >> In B I click a link which brings me back to the (cached(?)) instance of >> A. In the onBeforeRender-method of a child component of A I want to >> redirect if some condition is >> >> protected void onBeforeRender() { >> if(condition){ >> throw new >> RestartResponseException(RedirectPage.class); >> } >> super.onBeforeRender(); >> } >> >> This fails with the following: >> >> WicketMessage: Error attaching this container for rendering: >> [MarkupContainer [Component id = tabs]] >> >> Root cause: >> >> org.apache.wicket.RestartResponseException >> >> Complete stack: >> >> org.apache.wicket.WicketRuntimeException: Error attaching this container >> for rendering: [MarkupContainer [Component id = tabs]] >> at >> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1601) >> at org.apache.wicket.Component.onBeforeRender(Component.java:3682) >> at >> org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:205) >> at >> org.apache.wicket.Component.internalBeforeRender(Component.java:1002 >> >> I use wicket 1.3.5 >> >> >> >> > > -- View this message in context: http://www.nabble.com/Unexpected-RuntimeException%3A-RestartResponseException-in-onBeforeRender-of-cached-page-tp21683689p21690259.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: Unexpected RuntimeException: RestartResponseException in onBeforeRender of cached page
Pills wrote: > > iirc, onBeforeRender must always call super.onBeforeRender. > > so put super.onBeforeRender on the first line. > > Thanks for the quick reply. Unfortunately the super.onBeforeRender call does not solve the issue. -- View this message in context: http://www.nabble.com/Unexpected-RuntimeException%3A-RestartResponseException-in-onBeforeRender-of-cached-page-tp21683689p21685209.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
Unexpected RuntimeException: RestartResponseException in onBeforeRender of cached page
I have the following use case: I go from Page A to Page B passing an instance of A as return page to B. In B I click a link which brings me back to the (cached(?)) instance of A. In the onBeforeRender-method of a child component of A I want to redirect if some condition is protected void onBeforeRender() { if(condition){ throw new RestartResponseException(RedirectPage.class); } super.onBeforeRender(); } This fails with the following: WicketMessage: Error attaching this container for rendering: [MarkupContainer [Component id = tabs]] Root cause: org.apache.wicket.RestartResponseException Complete stack: org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [MarkupContainer [Component id = tabs]] at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1601) at org.apache.wicket.Component.onBeforeRender(Component.java:3682) at org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:205) at org.apache.wicket.Component.internalBeforeRender(Component.java:1002 I use wicket 1.3.5 -- View this message in context: http://www.nabble.com/Unexpected-RuntimeException%3A-RestartResponseException-in-onBeforeRender-of-cached-page-tp21683689p21683689.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
Bookmarkable Page with AjaxTabbedPanel
My problem is as follows: I have a bookmarkable page with an AjaxTabbedPanel as a component. If one of the page parameters contains a forward slash "/" I get a weird behavior. Firefox generates the following URL a) ...¶m=value1/?wicket:interface%3D:73:lemmasTabpanel:panel:workstepsTabpanel:tabs-container:tabs:2:link::IBehaviorListener:0:&random=0.5887701752511617 while it should be: b) ...¶m=value1/2 and naturally I get an exception when the page parses its parameters. Safari produces b) which is fine. The problem occurs only for page parameters that contain forward slashes. Everything else that I tested worked fine. The problem seems related to this http://www.nabble.com/GMAP2-with-Wicket-AjaxTabbedPanel-to20124469.html Any ideas? -- View this message in context: http://www.nabble.com/Bookmarkable-Page-with-AjaxTabbedPanel-tp21629936p21629936.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
Tree component looses page
I'm doing drag and drop operations with an implementation of org.apache.wicket.markup.html.tree.BaseTree. For the drop event I call ... dropNode.add(dragNode); tree.repaint(target); ... However I get an IllegalStateException when processing the ajax request (in detach(RequestCycle)) because somehow the component for the dropNode - as supplied by baseTreeImpl.newNodeComponent() - looses its page. I am not sure when this happens exactly. After the calls as described above the page is still not null. I guess the problem is related to https://issues.apache.org/jira/browse/WICKET-1366 Help appreciated. Conny -- View this message in context: http://www.nabble.com/Tree-component-looses-page-tp19048069p19048069.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax Detach Question
> But the model is only loaded if you render the component that uses the > model. Well, or if you use it for something else. In my case the model backs up a list of items. The list has a PagingNavigator whose isVisible() returns its result conditional on the number of pages (zero=invisible). The problem is that the isVisible() method gets called on every (ajax)request regardless of whether its component is added to the RequestTarget or not. Matej Knopp-2 wrote: > > But the model is only loaded if you render the component that uses the > model. Detaching it on ajax request makes no difference as long as you > don't rerender the component during an ajax request. > > -Matej > > On Jan 19, 2008 9:51 PM, ckuehne <[EMAIL PROTECTED]> wrote: >> >> I don't want it to be cached across ALL requests. If the site is reloaded >> I >> want >> the model detached and reloaded as well. But not so between ajax request >> that only >> include some components of the site. >> >> >> Matej Knopp-2 wrote: >> > >> > Detaching the model doesn't mean it is reloaded. The data is loaded >> > when needed, if you want it to be cached across request you need to >> > implement your own model. >> > >> > -Matej >> > >> > On Jan 19, 2008 6:28 PM, ckuehne <[EMAIL PROTECTED]> wrote: >> >> >> >> Just out of curiosity: I noticed that when I add a component to an >> >> AjaxRequestTarget a detach of the component's parent page >> >> (component.getPage()) is triggered. Is there a way around this >> behavior? >> >> I have a listview on that page with a LoadableDetachableModel and I'd >> >> rather >> >> like that to be reloaded only >> >> when absolutely necessary. >> >> >> >> Thank's in advance. >> >> >> >> Conny >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/Ajax-Detach-Question-tp14968096p14968096.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > >> > -- >> > Resizable and reorderable grid components. >> > http://www.inmethod.com >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Ajax-Detach-Question-tp14968096p14975015.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > Resizable and reorderable grid components. > http://www.inmethod.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Ajax-Detach-Question-tp14968096p15333876.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Autocomplete Ajax AddReplace IE Issue
If I put the autocomplete field on a panel that is added and replaced dynamically via ajax it does not work in Internet Explorer (tested with ver. 7) anymore. In Firefox everything is alright. In IE also if the ac-field is visible when the page is loaded. But when I add it later on dynamically via ajax (fragment.this.replaceWith(ac-panel)) the IE onchange event of the ac-field cannot be found by IE javascript. -- View this message in context: http://www.nabble.com/Autocomplete-Ajax-AddReplace-IE-Issue-tp15026219p15026219.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax Detach Question
Right, I mixed things up a little. Thanks for the fast reply. Conny Matej Knopp-2 wrote: > > But the model is only loaded if you render the component that uses the > model. Detaching it on ajax request makes no difference as long as you > don't rerender the component during an ajax request. > > -Matej > > On Jan 19, 2008 9:51 PM, ckuehne <[EMAIL PROTECTED]> wrote: >> >> I don't want it to be cached across ALL requests. If the site is reloaded >> I >> want >> the model detached and reloaded as well. But not so between ajax request >> that only >> include some components of the site. >> >> >> Matej Knopp-2 wrote: >> > >> > Detaching the model doesn't mean it is reloaded. The data is loaded >> > when needed, if you want it to be cached across request you need to >> > implement your own model. >> > >> > -Matej >> > >> > On Jan 19, 2008 6:28 PM, ckuehne <[EMAIL PROTECTED]> wrote: >> >> >> >> Just out of curiosity: I noticed that when I add a component to an >> >> AjaxRequestTarget a detach of the component's parent page >> >> (component.getPage()) is triggered. Is there a way around this >> behavior? >> >> I have a listview on that page with a LoadableDetachableModel and I'd >> >> rather >> >> like that to be reloaded only >> >> when absolutely necessary. >> >> >> >> Thank's in advance. >> >> >> >> Conny >> >> -- >> >> View this message in context: >> >> http://www.nabble.com/Ajax-Detach-Question-tp14968096p14968096.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > >> > -- >> > Resizable and reorderable grid components. >> > http://www.inmethod.com >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Ajax-Detach-Question-tp14968096p14975015.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > Resizable and reorderable grid components. > http://www.inmethod.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Ajax-Detach-Question-tp14968096p14977172.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax Detach Question
I don't want it to be cached across ALL requests. If the site is reloaded I want the model detached and reloaded as well. But not so between ajax request that only include some components of the site. Matej Knopp-2 wrote: > > Detaching the model doesn't mean it is reloaded. The data is loaded > when needed, if you want it to be cached across request you need to > implement your own model. > > -Matej > > On Jan 19, 2008 6:28 PM, ckuehne <[EMAIL PROTECTED]> wrote: >> >> Just out of curiosity: I noticed that when I add a component to an >> AjaxRequestTarget a detach of the component's parent page >> (component.getPage()) is triggered. Is there a way around this behavior? >> I have a listview on that page with a LoadableDetachableModel and I'd >> rather >> like that to be reloaded only >> when absolutely necessary. >> >> Thank's in advance. >> >> Conny >> -- >> View this message in context: >> http://www.nabble.com/Ajax-Detach-Question-tp14968096p14968096.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > Resizable and reorderable grid components. > http://www.inmethod.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Ajax-Detach-Question-tp14968096p14975015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ajax Detach Question
Just out of curiosity: I noticed that when I add a component to an AjaxRequestTarget a detach of the component's parent page (component.getPage()) is triggered. Is there a way around this behavior? I have a listview on that page with a LoadableDetachableModel and I'd rather like that to be reloaded only when absolutely necessary. Thank's in advance. Conny -- View this message in context: http://www.nabble.com/Ajax-Detach-Question-tp14968096p14968096.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Autocomplete setResponsePage in ajax request
I call setRespongePage() in the ajax onchange handler of the autocomplete field. The behavior seems buggy in the case when the user did not select a choice but submitted the input of the field with ENTER. If there are no choices for the entered text then everything works fine. But if there are avalaible choices the forwarding to the response page does not work. Instead it seems to me that there is some "left over" javascript being executed on the client side after the resonse. And then, instead of forwarding to the response page, the current page is reloaded. At least that's how I interpret it. Help appreciated, Conny -- View this message in context: http://www.nabble.com/Autocomplete-setResponsePage-in-ajax-request-tp14916401p14916401.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup of type 'html' for component not found
Thanks, that was very helpful. Conny Eelco Hillenius wrote: > > On Jan 14, 2008 3:49 PM, ckuehne <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I don't quite know what to do with the following debug message. The >> AddPanel.html is definetely where >> it should be (wicket bench finds it as well). I am also curious where the >> $3 >> comes from? > > That means Wicket tries (but is not able) to load markup of an > anonymous class of AddPanel (the third one you defined in that class > to be exact). If you look at the classes in your class path, you'll > see the same. > > Eelco > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Markup-of-type-%27html%27-for-component-not-found-tp14820455p14834102.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Markup of type 'html' for component not found
Hi, I don't quite know what to do with the following debug message. The AddPanel.html is definetely where it should be (wicket bench finds it as well). I am also curious where the $3 comes from? The problem did not occur in 1.3 RC2. But then again I made some changes after updating to 1.3 final and only tested afterwards. Any ideas? WicketMessage: Markup of type 'html' for component 'AddPanel$3' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried: Root cause: org.apache.wicket.markup.MarkupNotFoundException: Markup not found. Component class: AddPanel$3 Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:342) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:603) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112) at org.apache.wicket.Component.renderComponent(Component.java:2429) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2266) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1407) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1344) at org.apache.wicket.Component.renderComponent(Component.java:2429) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2266) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1407) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:631) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:112) at org.apache.wicket.Component.renderComponent(Component.java:2429) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354) at org.apache.wicket.Component.render(Component.java:2266) ... -- View this message in context: http://www.nabble.com/Markup-of-type-%27html%27-for-component-not-found-tp14820455p14820455.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Autocomplete Textfield gets submitted twice on mouse click
Just in case anybody is interested: the problem was, that clicking with the mouse fired the onchange event of the auto complete field. The javascript responsible for handling the autocomplete fired it again after finishing it's work. Since I am using a hidden field to store and communicate the id's of the autocomplete selections the workaround was straightforward: I hooked the onchange event to the hidden field and made the autocomplete javascript fire an onchange on the hidden field. ckuehne wrote: > > In the use case from the ajax autocomplete example the field gets > submitted twice when the selection > is made with the mouse (the onchange event handler gets called twice). Is > there a quick way to fix this? > > Conny > -- View this message in context: http://www.nabble.com/Autocomplete-Textfield-gets-submitted-twice-on-mouse-click-tp14777002p14792287.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Autocomplete Textfield gets submitted twice on mouse click
In the use case from the ajax autocomplete example the field gets submitted when the selection is made with the mouse. Is there a quick way to fix this? Conny -- View this message in context: http://www.nabble.com/Autocomplete-Textfield-gets-submitted-twice-on-mouse-click-tp14777002p14777002.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ajax AutoCompleteTextField with hidden id-field
Hi, I'd like my AutoCompleteTextField to behave as follows - I want the names of my list items displayed (item.name) - when I select one I want the item.name displayed in the AC-TextField So far, so good. But ... - internally I want the item.id put into the request in order to select the object corresponding to the item that was selected. I came up with a solution like this http://www.nabble.com/AutoCompleteTextfield---how-to-populate-two-input-fields-tf4592192.html The problem is, that I don't want the user to see the internal item.id. At the moment I am thinking of changing the js to put the item.id into a hidden form field whose value I could take from the request. But I find this solution a little inelegant. Any ideas? Thanks, Conny -- View this message in context: http://www.nabble.com/Ajax-AutoCompleteTextField-with-hidden-id-field-tf4883557.html#a13976698 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]