Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-26 Thread durairaj t
Hi Martin, event.getPayload() giving AjaxRequestTarget not the GridValueChangeEvent. If I change the "IEventSink" as *FieldSearchTextField.this *in send(--,--,--) it gives GridValueChangeEvent, but it is not working in WindowClosedCallback(). FieldSearchTextField is a customized text component

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-25 Thread Martin Grigorov
Hi, You need: Page openerPage = getPageReference().getPage(); openerPage.send(openerPage, Broadcast.BREADTH, new GridValueChangeEvent(target, selectedRow)); Then any component inside 'openerPage' will receive this event and can read and store the selected row from it. Martin Grigorov Wicket Tra

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-25 Thread durairaj t
Please refer the below formatted code snippet. I'm setting selectedRow value in page creator and expecting the same in window close call back (Line number 24), I tried with the Inter component communication examples as you suggested. But I don't know how to update the selectedRow in line #24 with

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-22 Thread Martin Grigorov
Please use some pastebin service. It is hard to read and follow this code. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Apr 22, 2016 at 10:43 PM, durairaj t wrote: > Thank you Martin. I tried with examples but those are not working in my > case. I don't

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-22 Thread durairaj t
Thank you Martin. I tried with examples but those are not working in my case. I don't know how to call the onEvent in line number 19 in the below code snippet. Please share me if you have any examples. 1. public class FieldSearchTextField extends MaskedTextField{ 2. ResultRow selectedRow; 3. /*

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-16 Thread Martin Grigorov
Hi, The problem is the same. In your first question you were asking for MyPanel.this, now you ask for TextField.this. If you cannot use Panel backed ModalWindow then use pageRef.getPage().send(pageRef.getPage(), Broadcast.BREADTH, new MyModalClosedEvent()) and listen for this event in all compone

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-15 Thread durairaj t
"openerPage.getPageReference()" is working with the pages, not in the customized wicket component classes (like TextField and Panels..etc). do we have any other way to get the modified objects from the customized component classes? for example; -- public class FieldSearchTextField

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-12 Thread Martin Grigorov
Hi, If you use ModalWindow based on a Page then you have to keep a reference to that page by using openerPage.getPageReference(). Later when you need to update the opener page you have to use "pageRef.getPage()". You can see https://github.com/apache/wicket/blob/686058119dd795b3de7f2016e3e64fb8f02

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-11 Thread Francois Meillet
Hi, In order to help you, you should show us the code you use for the MyTextFieldPanel class and the modal window content (The PageCreator or the component you use). Even better, try to do a quickstart. https://wicket.apache.org/start/quickstart.html François Le 11 avr. 2016 à 22:47,

Re: Panel.this always giving previous version of the object but not the modified one.

2016-04-11 Thread durairaj t
Class name replaced with the correct name in the code snippet; . public class *MyTextFieldPanel *extends Panel modalShuttleWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { target.add(*MyTextFieldPanel.this*); onWindowClo

Panel.this always giving previous version of the object but not the modified one.

2016-04-11 Thread durairaj t
Hi, I'm using "*new* ModalWindow.WindowClosedCallback(){}" to update the modified value in a text field box by invoking the * target.add(* *MyTextFieldPanel.this**)*, but it is always giving the old values. I'm seeing only old values in *MyTextFieldPanel.this. * Code snippet for a clear pict