Re: How AjaxFallbackLink work?
Well... Probably I guesses what I should do.. 1. Set a new Model object for component directly, which I would refresh by Ajax request. 2. Add these component(s) to Target for re-render them. Is it right ? But I still don't find out how to get referense for my Image component from another Panel.. PS: Sorry for my bad English. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-AjaxFallbackLink-work-tp4171539p4171596.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
How AjaxFallbackLink work?
Could anybody explain me what wicket's AjaxFallbackLink actually doing? I learn wicket since last week and this is my first wicket project. I've create application for image gallery. On the first panel I would place an fullsize image and on the next panel I wanna put a scrollable thumbnail panel. So, I need to send Ajax request through the separate panels.. My thumbnail panel works pretty nice themself. Now I going to add Ajax functionality to display fullsize image by clicking any thumbnail and I was stuck. Actually I don't understand what AjaxFallbackLink doing, which data it should be transfer to RequestTarget??. IModel? Pojo? What exactly? Please help me! My next code don't return me anything errors but simultaneously didn't doing what I want. My appologize if similar question already was sounds here but I can't find.. // ThumbnailPanel constructor public ThumbnailPanel(String id) { super(id); // invoke service method to get image filenames, checking file formats, etc.. SetString imageFiles = getResourceFileNames(/resources); // invoke service method to create ready-to-display thumbnail list ListWebResource thumbnailList = getThumbnailsList(imageFiles); // add a repeater with clickable thumbnails ListView listview = new ListView(listview, thumbnailList) { protected void populateItem(ListItem item) { Link link = new AjaxFallbackLink(link, item.getModel()) { public void onClick(AjaxRequestTarget target) { if (target != null) { Object model = getModelObject(); // --???-- // What i should to do here ?? // --???-- // here getImageDisplayComponent() is a getter method for local fild with ImagePanel reference // Image.class is a child of ImagePanel target.addChildren(getImageDisplayComponent(), Image.class); // } }; }; link.add(new Image(thumbnailitem, item.getModel())); item.add(link); } }; // WebMarkupContainer thumbnailDiv = new WebMarkupContainer(thumbnailpanel); thumbnailDiv.add(new SimpleAttributeModifier(style, width: + getThumbnailPanelWidth().toString() + px; )); add(thumbnailDiv.add(listview)); } // ImagePanel constructor public ImagePanel(String id) { super(id); Image image = new Image(image); image.setOutputMarkupId(true); add(image); } // page constructor public HomePage() { ImagePanel imagePanel = new ImagePanel(imagepanel); ThumbnailPanel thumbnailPanel = new ThumbnailPanel(thumbnailtoolpanel); thumbnailPanel.setImageDisplayComponent(imagePanel); add(imagePanel); ThumbnailBorder border = new ThumbnailBorder(thumbnailwidget); border.setRenderBodyOnly(true); border.getBodyContainer().add(new NavButtonPanelLeft(navpanelleft)); border.getBodyContainer().add(thumbnailPanel); border.getBodyContainer().add(new NavButtonPanelRight(navpanelright)); add(border); } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-AjaxFallbackLink-work-tp4171539p4171539.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
Page Map versions and Ajax Requests
I have a page containing a number of AjaxLinks that when clicked fetch data and update some panels. When a user leaves one of these pages and returns via the back button the state of the page isn't always how they left it. However, this behavior happens only when the page is returned to the second time. Using the the request logger I've been able to partially explain this with the page IDs: 1. First visit to page X has a page ID of 3 2. AjaxLink requests for this page also have a page ID of 3. 3. User leaves page then returns to page X via the back button; this request also has ID of 3 4. User clicks AjaxLinks again, but here a new X page is created with an ID of 5 5. User leaves page and again returns with the back button. Here the page state is as they left it in #2, and the URL confirms the page ID of 3 I understand using the back button will always take the user to ID 3 since it is present in the URL. My workaround so far is to add the Page component to the target of my AjaxLink onClick()s. This increments the page ID whenever an AjaxLink is clicked and is reflected in the URL, so the back button always returns to the last state. So I have two questions - Why is a new page X created in step 4 above, and why does adding the Page component to the ajax request target make a new page map entry? Thanks, Mark
FileUpload vs. CryptoURL in Wicket 1.5
Hello, i'm, experiencing a problem with FileUpload within a ModalWindow when enabling the CryptoURLMapper in my application as being done in Wicket 1.5 via the following: setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this)); Is there any possibility to take out the fileupload URL from encryption? Or how does it work? The error I receive within the WICKET AJAX DEBUG-console just says: *NFO: *Invoking pre-call handler(s)... *ERROR: * Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element *INFO: *Invoking post-call handler(s)... *INFO: *Invoking failure handler(s)... Thanks for help!
Re: FileUpload vs. CryptoURL in Wicket 1.5
You can extend CryptoMapper and prevent encryption/decryption of any URL. Check your logs. Maybe there is more information about the problem. On Thu, Dec 8, 2011 at 10:21 AM, Daniel Weidele daniel.weid...@googlemail.com wrote: Hello, i'm, experiencing a problem with FileUpload within a ModalWindow when enabling the CryptoURLMapper in my application as being done in Wicket 1.5 via the following: setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this)); Is there any possibility to take out the fileupload URL from encryption? Or how does it work? The error I receive within the WICKET AJAX DEBUG-console just says: *NFO: *Invoking pre-call handler(s)... *ERROR: * Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element *INFO: *Invoking post-call handler(s)... *INFO: *Invoking failure handler(s)... Thanks for help! -- 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
Re: Back button not work in Wicket 1.5.3 when component structure is not changed
modelChanged()? Sent from tablet device. Please excuse typos and brevity. On Dec 8, 2011 12:58 AM, Dan Retzlaff dretzl...@gmail.com wrote: Hi, Robin. I am not a core developer, but I believe this is as designed. If you want the page version to be incremented, you can call Page#dirty() in your onClick(). Otherwise the page version only advances when the component hierarchy changes or when a component's model changes. On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine ro...@pmease.com wrote: Hi All, In Wicket 1.5.3, I create a very simple page containing a label and a link, when the link is clicked, it increases a counter, and change model value of the label. Thus the counter on the page will increase each time the link is clicked. For instance, the initial value displayed is 0, and after three clicks, the page displays value 3. However, the url remains unchanged while clicking the link, and hitting a back button at this time will display the page before displaying value 0, instead of displaying value 2. Is this a designed behavior or a bug? The page java code and its template is like below: TestPage.java: public class MyPage extends WebPage { private int count; protected void onInitialize() { super.onInitialize(); add(new LinkVoid(link) { public void onClick() { count++; } }); add(new Label(label, new AbstractReadOnlyModelString() { public String getObject() { return String.valueOf(count); } })); } } TestPage.html: a wicket:id=linklink/a span wicket:id=labellabel/span Thanks for your help. Robin
Re: Back button not work in Wicket 1.5.3 when component structure is not changed
Actually the important method is modelChanging(). It calls #dirty() for you. In the code below there is no change in the state managed by Wicket (a change in a model with setDefaultModel[Object]()) and that's the reason the request doesn't trigger new page version. On Thu, Dec 8, 2011 at 12:27 PM, James Carman jcar...@carmanconsulting.com wrote: modelChanged()? Sent from tablet device. Please excuse typos and brevity. On Dec 8, 2011 12:58 AM, Dan Retzlaff dretzl...@gmail.com wrote: Hi, Robin. I am not a core developer, but I believe this is as designed. If you want the page version to be incremented, you can call Page#dirty() in your onClick(). Otherwise the page version only advances when the component hierarchy changes or when a component's model changes. On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine ro...@pmease.com wrote: Hi All, In Wicket 1.5.3, I create a very simple page containing a label and a link, when the link is clicked, it increases a counter, and change model value of the label. Thus the counter on the page will increase each time the link is clicked. For instance, the initial value displayed is 0, and after three clicks, the page displays value 3. However, the url remains unchanged while clicking the link, and hitting a back button at this time will display the page before displaying value 0, instead of displaying value 2. Is this a designed behavior or a bug? The page java code and its template is like below: TestPage.java: public class MyPage extends WebPage { private int count; protected void onInitialize() { super.onInitialize(); add(new LinkVoid(link) { public void onClick() { count++; } }); add(new Label(label, new AbstractReadOnlyModelString() { public String getObject() { return String.valueOf(count); } })); } } TestPage.html: a wicket:id=linklink/a span wicket:id=labellabel/span Thanks for your help. Robin -- 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
Re: Download file from ModalWindow problem
Hello again. Here's some more information about my problem: in the ModalWindow's SubmitButton's onSubmit() I call at the end: ModalWindow.closeCurrent(target); download.initiate(target); The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow. Or do I have to add it to the button on my page that opens the ModalWindow? Thanks in advance. 2011/12/7 heapifyman heapify...@gmail.com Hello all, I have a problem with a file download from a ModalWindow. The ModalWindow contains a form in which the user can specify some parameters. When clicking submit I generate a PDF based on the chosen parameters and offer it for download. The ModalWindow is closed then. I followed the approach described here https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html and it actually works quite nice. My problem is that after the file is downloaded and the ModalWindow is closed all my Ajax stuff on the page from which the ModalWindow was opened are not working anymore. Only when I reload the page, the Ajax stuff is working again. I would appreciate any hints as to what I might be doing wrong. Or maybe someone has another code example of how to download a file from a ModalWindow? Thanks in advance.
Re: Download file from ModalWindow problem
Have you tried to put modal itself inside of another form, too? Am 08.12.2011 um 13:29 schrieb heapifyman heapify...@gmail.com: Hello again. Here's some more information about my problem: in the ModalWindow's SubmitButton's onSubmit() I call at the end: ModalWindow.closeCurrent(target); download.initiate(target); The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow. Or do I have to add it to the button on my page that opens the ModalWindow? Thanks in advance. 2011/12/7 heapifyman heapify...@gmail.com Hello all, I have a problem with a file download from a ModalWindow. The ModalWindow contains a form in which the user can specify some parameters. When clicking submit I generate a PDF based on the chosen parameters and offer it for download. The ModalWindow is closed then. I followed the approach described here https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html and it actually works quite nice. My problem is that after the file is downloaded and the ModalWindow is closed all my Ajax stuff on the page from which the ModalWindow was opened are not working anymore. Only when I reload the page, the Ajax stuff is working again. I would appreciate any hints as to what I might be doing wrong. Or maybe someone has another code example of how to download a file from a ModalWindow? Thanks in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Download file from ModalWindow problem
I believe it already is. My markup looks like this: form wicket:id=form fieldset button wicket:id=downloadButtonspan wicket:id=downloadButtonLabel/span/button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/div /wicket:container div wicket:id=downloadDialog/div wicket:panel 2011/12/8 Daniel Weidele daniel.weid...@uni-konstanz.de Have you tried to put modal itself inside of another form, too? Am 08.12.2011 um 13:29 schrieb heapifyman heapify...@gmail.com: Hello again. Here's some more information about my problem: in the ModalWindow's SubmitButton's onSubmit() I call at the end: ModalWindow.closeCurrent(target); download.initiate(target); The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow. Or do I have to add it to the button on my page that opens the ModalWindow? Thanks in advance. 2011/12/7 heapifyman heapify...@gmail.com Hello all, I have a problem with a file download from a ModalWindow. The ModalWindow contains a form in which the user can specify some parameters. When clicking submit I generate a PDF based on the chosen parameters and offer it for download. The ModalWindow is closed then. I followed the approach described here https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland it actually works quite nice. My problem is that after the file is downloaded and the ModalWindow is closed all my Ajax stuff on the page from which the ModalWindow was opened are not working anymore. Only when I reload the page, the Ajax stuff is working again. I would appreciate any hints as to what I might be doing wrong. Or maybe someone has another code example of how to download a file from a ModalWindow? Thanks in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Download file from ModalWindow problem
No, it's doesn't look nested, yet. You may nest forms in Wicket, where the modal windows markup is in between. This worked for me when I experienced a similar problem. Von meinem iPad gesendet Am 08.12.2011 um 14:12 schrieb heapifyman heapify...@gmail.com: I believe it already is. My markup looks like this: form wicket:id=form fieldset button wicket:id=downloadButtonspan wicket:id=downloadButtonLabel/span/button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/div /wicket:container div wicket:id=downloadDialog/div wicket:panel 2011/12/8 Daniel Weidele daniel.weid...@uni-konstanz.de Have you tried to put modal itself inside of another form, too? Am 08.12.2011 um 13:29 schrieb heapifyman heapify...@gmail.com: Hello again. Here's some more information about my problem: in the ModalWindow's SubmitButton's onSubmit() I call at the end: ModalWindow.closeCurrent(target); download.initiate(target); The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow. Or do I have to add it to the button on my page that opens the ModalWindow? Thanks in advance. 2011/12/7 heapifyman heapify...@gmail.com Hello all, I have a problem with a file download from a ModalWindow. The ModalWindow contains a form in which the user can specify some parameters. When clicking submit I generate a PDF based on the chosen parameters and offer it for download. The ModalWindow is closed then. I followed the approach described here https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland it actually works quite nice. My problem is that after the file is downloaded and the ModalWindow is closed all my Ajax stuff on the page from which the ModalWindow was opened are not working anymore. Only when I reload the page, the Ajax stuff is working again. I would appreciate any hints as to what I might be doing wrong. Or maybe someone has another code example of how to download a file from a ModalWindow? Thanks in advance. - 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: Download file from ModalWindow problem
You mean putting an additional form around the modal window like below? form wicket:id=form fieldset button wicket:id=downloadButtonspan wicket:id=downloadButtonLabel/span/button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/div /wicket:container form wicket:id=formAroundModalWindow div wicket:id=downloadDialog/div /form wicket:panel 2011/12/8 Daniel Weidele daniel.weid...@uni-konstanz.de No, it's doesn't look nested, yet. You may nest forms in Wicket, where the modal windows markup is in between. This worked for me when I experienced a similar problem. Von meinem iPad gesendet Am 08.12.2011 um 14:12 schrieb heapifyman heapify...@gmail.com: I believe it already is. My markup looks like this: form wicket:id=form fieldset button wicket:id=downloadButtonspan wicket:id=downloadButtonLabel/span/button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/div /wicket:container div wicket:id=downloadDialog/div wicket:panel 2011/12/8 Daniel Weidele daniel.weid...@uni-konstanz.de Have you tried to put modal itself inside of another form, too? Am 08.12.2011 um 13:29 schrieb heapifyman heapify...@gmail.com: Hello again. Here's some more information about my problem: in the ModalWindow's SubmitButton's onSubmit() I call at the end: ModalWindow.closeCurrent(target); download.initiate(target); The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow. Or do I have to add it to the button on my page that opens the ModalWindow? Thanks in advance. 2011/12/7 heapifyman heapify...@gmail.com Hello all, I have a problem with a file download from a ModalWindow. The ModalWindow contains a form in which the user can specify some parameters. When clicking submit I generate a PDF based on the chosen parameters and offer it for download. The ModalWindow is closed then. I followed the approach described here https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland it actually works quite nice. My problem is that after the file is downloaded and the ModalWindow is closed all my Ajax stuff on the page from which the ModalWindow was opened are not working anymore. Only when I reload the page, the Ajax stuff is working again. I would appreciate any hints as to what I might be doing wrong. Or maybe someone has another code example of how to download a file from a ModalWindow? Thanks in advance. - 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: Updating model object on AjaxFallbackDefaultDataTable page change
Hello Mark, did you manage to solve this? I'm facing the same problem and tried to implement my own navigation links (as AjaxSubmitLink) as Igor suggested. But still my checkgroup state is not preserved when changing the table pages. If you had some code example that would be a huge help. Thanks, Philip 2010/11/10 Matt Schmidt mschmid...@gmail.com Are you suggesting to override AjaxPagingNavigator.newPagingNavigationIncrementLink() and AjaxPagingNavigator.newPagingNavigationLink() and implement our own navigation links similar to AjaxPagingNavigationIncrementLink and AjaxPagingNavigationLink that do the same thing except extends SubmitLink rather than Link? Am I making that harder than it needs to be? It may help a lot if you have a code sample for something like this. On Tue, Nov 9, 2010 at 4:04 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see my last suggestion and replace navigator's links with submitlinks -igor On Tue, Nov 9, 2010 at 1:02 PM, Matt Schmidt mschmid...@gmail.com wrote: Yes that works for the first page - only on that page are the javascript behaviors rendered. Basically, we are looking for a way to NOT do an ajax request every time we check a box - The model object of the check group should be updated when we a) click the submit button or b) change the page of the datatable. What are we missing here? On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check. also you can use CheckBox with the ajax behavior instead of CheckGroup/Check or replace links used by navigator with submit links, there are factory methods on the navigator. -igor On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt mschmid...@gmail.com wrote: I have a CheckGroup that contains an AjaxFallbackDefaultDataTable that has a column containing a Check. As long as I click my submit button while on the first page of the DataTable, the model object of the CheckGroup is updated as expected with the items I had checked. However, if I check some checkboxes and then go to page 2 of the DataTable, the CheckGroup's model object is not updated and I lose everything I checked on page 1. The DataTable class has an onPageChanged() event, but it appears that it is called after the page is actually changed. My other thought was to add an AjaxFormComponentUpdatingBehavior to the Check, but Check is not a FormComponent. Any thoughts? Thanks, Matt - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to redirect to a non- Wicket page in Wicket 1.5?
Just want to double check it. Before 1.5, we use getRequestCycle().setRequestTarget(new RedirectRequestTarge(URL)); With 1.5, is this the right way? getRequestCycle().replaceAllRequestHandlers (new RedirectRequestHandler (URL)); -Fang
Re: How to redirect to a non- Wicket page in Wicket 1.5?
On Thu, Dec 8, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: Just want to double check it. Before 1.5, we use getRequestCycle().setRequestTarget(new RedirectRequestTarge(URL)); With 1.5, is this the right way? getRequestCycle().replaceAllRequestHandlers (new RedirectRequestHandler (URL)); The replacement is .scheduleRequestHandlerAfterCurrent() (I don't have running IDE in front of me, maybe the name is not exact) -Fang -- 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
JavaScript based Model
Hi, I was wondering... How could one go about making a custom form component who's model depends on the result of a JavaScript method? Any ideas? Cheers Anthony
RE: How to redirect to a non- Wicket page in Wicket 1.5?
Thanks Martin! Do you know when replaceAllRequestHandlers should be used? -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 08, 2011 12:33 PM To: users@wicket.apache.org Subject: Re: How to redirect to a non- Wicket page in Wicket 1.5? On Thu, Dec 8, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: Just want to double check it. Before 1.5, we use getRequestCycle().setRequestTarget(new RedirectRequestTarge(URL)); With 1.5, is this the right way? getRequestCycle().replaceAllRequestHandlers (new RedirectRequestHandler (URL)); The replacement is .scheduleRequestHandlerAfterCurrent() (I don't have running IDE in front of me, maybe the name is not exact) -Fang -- 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
Re: How to redirect to a non- Wicket page in Wicket 1.5?
See the javadoc of org.apache.wicket.request.RequestHandlerStack.replaceAll(IRequestHandler). On Thu, Dec 8, 2011 at 9:43 PM, Fang Lin fang...@u.washington.edu wrote: Thanks Martin! Do you know when replaceAllRequestHandlers should be used? -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 08, 2011 12:33 PM To: users@wicket.apache.org Subject: Re: How to redirect to a non- Wicket page in Wicket 1.5? On Thu, Dec 8, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: Just want to double check it. Before 1.5, we use getRequestCycle().setRequestTarget(new RedirectRequestTarge(URL)); With 1.5, is this the right way? getRequestCycle().replaceAllRequestHandlers (new RedirectRequestHandler (URL)); The replacement is .scheduleRequestHandlerAfterCurrent() (I don't have running IDE in front of me, maybe the name is not exact) -Fang -- 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 -- 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
RE: How to redirect to a non- Wicket page in Wicket 1.5?
Thanks a lot, Martin! -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 08, 2011 1:07 PM To: users@wicket.apache.org Subject: Re: How to redirect to a non- Wicket page in Wicket 1.5? See the javadoc of org.apache.wicket.request.RequestHandlerStack.replaceAll(IRequestHandler). On Thu, Dec 8, 2011 at 9:43 PM, Fang Lin fang...@u.washington.edu wrote: Thanks Martin! Do you know when replaceAllRequestHandlers should be used? -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 08, 2011 12:33 PM To: users@wicket.apache.org Subject: Re: How to redirect to a non- Wicket page in Wicket 1.5? On Thu, Dec 8, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: Just want to double check it. Before 1.5, we use getRequestCycle().setRequestTarget(new RedirectRequestTarge(URL)); With 1.5, is this the right way? getRequestCycle().replaceAllRequestHandlers (new RedirectRequestHandler (URL)); The replacement is .scheduleRequestHandlerAfterCurrent() (I don't have running IDE in front of me, maybe the name is not exact) -Fang -- 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 -- 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
Re: JavaScript based Model
Use a HiddenField and save the result of that function in the hidden's field's value ?! On Thu, Dec 8, 2011 at 9:34 PM, Anthony Webster awebster.mail...@gmail.com wrote: Hi, I was wondering... How could one go about making a custom form component who's model depends on the result of a JavaScript method? Any ideas? Cheers Anthony -- 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
Grid Layout Question
I have a grid layout where I have the need to ask for the content at a particular grid location. For example, I have a 2x2 grid, give me the component that I should render in slot 2,1. I was wondering if any of the base repeaters that wicket (or wicket-extensions) would provide this kind of capability. The repeaters like DataTable, GridView, etc., look like they only support data providers that return an iterator where I would need one that says give me the component that I need to render at row A, column B and so on as the Grid is rendered. Is there such a component in Wicket or can it be accomplished using the data provider interfaces? Thanks, J.D.
Re: Nested Forms and Multipart Fileupload Issue
Was this issue resolved? I am running on the same codebase and have the same issue. jcorbin wrote This issue seems to pop up in our environment from time to time and trying to figure out how to fix it once and for all. We have a page with a form that pops up modal window with a form specified as well. When we try to submit, we get the following exception: java.lang.IllegalStateException: ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where it cannot. at org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113) at org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83) at org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500) at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135) at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177) ... Setting Form.setMultipart(true) on either form has no affect. We are running Wicket Version 1.4.7. Is there a fix for this issue? Is this JIRA Issue related??? https://issues.apache.org/jira/browse/WICKET-2749 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p4174557.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: Download file from ModalWindow problem
I did and I still don't seem to get it. I think I followed all the recommendations in javadoc: - put div wicket:id=downloadDialog/div in html file before the ajax button that opens the window - added another form around the div wicket:id=downloadDialog/div - changed sequence in ModalWindow's form's submit to download.initiate(target); ModalWindow.closeCurrent(target); Still, after the window is closed and the download finished I cannot use any of the ajax links on my page until I reloaded the whole page. I don't understand what I might be doing wrong here. Am 08.12.2011 um 21:34 schrieb Martin Grigorov: See ModalWindow's javadoc. It explains about the need of a form On Thu, Dec 8, 2011 at 8:24 PM, heapifyman heapify...@gmail.com wrote: You mean putting an additional form around the modal window like below? form wicket:id=form fieldset button wicket:id=downloadButtonspan wicket:id=downloadButtonLabel/span/button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/div /wicket:container form wicket:id=formAroundModalWindow div wicket:id=downloadDialog/div /form wicket:panel 2011/12/8 Daniel Weidele daniel.weid...@uni-konstanz.de No, it's doesn't look nested, yet. You may nest forms in Wicket, where the modal windows markup is in between. This worked for me when I experienced a similar problem. Von meinem iPad gesendet Am 08.12.2011 um 14:12 schrieb heapifyman heapify...@gmail.com: I believe it already is. My markup looks like this: form wicket:id=form fieldset button wicket:id=downloadButtonspan wicket:id=downloadButtonLabel/span/button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/div /wicket:container div wicket:id=downloadDialog/div wicket:panel 2011/12/8 Daniel Weidele daniel.weid...@uni-konstanz.de Have you tried to put modal itself inside of another form, too? Am 08.12.2011 um 13:29 schrieb heapifyman heapify...@gmail.com: Hello again. Here's some more information about my problem: in the ModalWindow's SubmitButton's onSubmit() I call at the end: ModalWindow.closeCurrent(target); download.initiate(target); The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow. Or do I have to add it to the button on my page that opens the ModalWindow? Thanks in advance. 2011/12/7 heapifyman heapify...@gmail.com Hello all, I have a problem with a file download from a ModalWindow. The ModalWindow contains a form in which the user can specify some parameters. When clicking submit I generate a PDF based on the chosen parameters and offer it for download. The ModalWindow is closed then. I followed the approach described here https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland it actually works quite nice. My problem is that after the file is downloaded and the ModalWindow is closed all my Ajax stuff on the page from which the ModalWindow was opened are not working anymore. Only when I reload the page, the Ajax stuff is working again. I would appreciate any hints as to what I might be doing wrong. Or maybe someone has another code example of how to download a file from a ModalWindow? Thanks in advance. - 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 -- 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 PGP.sig Description: Signierter Teil der Nachricht
Quickstart application doesn't show up with 1.5.3
No luck with 1.5-SNAPSHOT, either, but 1.4.9. works fine. This is the error I'm getting: http://localhost:8080/myproject, with 1.5.3 the basic Wicket it works! page shows up when hitting http://localhost:8080. This doesn't happen with 1.4.9. HTTP ERROR 404 Problem accessing /myproject. Reason: Not Found Powered by Jetty:// I have tried various combinations of mvn versions (2.2.1 vs. 3.0.3) and OSes (Linux 2.6, MacOS Snow Leopard). Please help, Gabor - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Back button not work in Wicket 1.5.3 when component structure is not changed
I will use modelChanged() as you suggested. Thanks for the community, my question always get answered very quickly, :D In case you are interested, here is another wicket powered product: QuickBuild, a continuous integration and release management server. Initially I chose Tapestry for the UI layer. Starting from QuickBuild 2.0, I switched to Wicket since it is very easy to contribute web UI via plugins due to the fact that Wicket page can be dynamically composed. Regards Robin From: Martin Grigorov mgrigo...@apache.org To: users@wicket.apache.org Sent: Thursday, December 8, 2011 7:31 PM Subject: Re: Back button not work in Wicket 1.5.3 when component structure is not changed Actually the important method is modelChanging(). It calls #dirty() for you. In the code below there is no change in the state managed by Wicket (a change in a model with setDefaultModel[Object]()) and that's the reason the request doesn't trigger new page version. On Thu, Dec 8, 2011 at 12:27 PM, James Carman jcar...@carmanconsulting.com wrote: modelChanged()? Sent from tablet device. Please excuse typos and brevity. On Dec 8, 2011 12:58 AM, Dan Retzlaff dretzl...@gmail.com wrote: Hi, Robin. I am not a core developer, but I believe this is as designed. If you want the page version to be incremented, you can call Page#dirty() in your onClick(). Otherwise the page version only advances when the component hierarchy changes or when a component's model changes. On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine ro...@pmease.com wrote: Hi All, In Wicket 1.5.3, I create a very simple page containing a label and a link, when the link is clicked, it increases a counter, and change model value of the label. Thus the counter on the page will increase each time the link is clicked. For instance, the initial value displayed is 0, and after three clicks, the page displays value 3. However, the url remains unchanged while clicking the link, and hitting a back button at this time will display the page before displaying value 0, instead of displaying value 2. Is this a designed behavior or a bug? The page java code and its template is like below: TestPage.java: public class MyPage extends WebPage { private int count; protected void onInitialize() { super.onInitialize(); add(new LinkVoid(link) { public void onClick() { count++; } }); add(new Label(label, new AbstractReadOnlyModelString() { public String getObject() { return String.valueOf(count); } })); } } TestPage.html: a wicket:id=linklink/a span wicket:id=labellabel/span Thanks for your help. Robin -- 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
Any info on wasp-swarm?
Hi, I'm trying to solve an authorization problem in wicket 1.5 -- I do not want users to have access to certain pages based on the roles that they have. I think wasp-swarm may be what I need, but is it being maintained anymore? I can't find anything current on the web since the 1.4.1 announcement. The link on the wiki leads nowhere as well: https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/wicket-security-parent (linked from) https://cwiki.apache.org/WICKET/wasp-swarm-security.html So I guess my question is three part -- is wasp-swarm what I'm looking for? Is it usable for wicket 1.5 or only wicket 1.4? And where the heck did it go? ;) Thanks, -Dan
RE: ConcurrentModificationException
Finally got this fixed. 1. Make one CustomExceptionListener handles all the Exceptions. In IRequestHandler onException(RequestCycle cycle, Exception e), As the parameter Exception is not the original exception in the WebPage. After getting the initial cause Throwable from the Exception, the error handler works. 2. Changed replaceAllRequestHandlers to scheduleRequestHandlerAfterCurrent when redirecting to the non-Wicket page. Thank you both Dan and Martin! -Fang -Original Message- From: Dan Retzlaff [mailto:dretzl...@gmail.com] Sent: Wednesday, December 07, 2011 10:08 PM To: users@wicket.apache.org Subject: Re: ConcurrentModificationException That looks like something to do with your custom session business, so I don't think I can help you. By the way, I think a more direct and common idiom for redirect handlers is: return new RenderPageRequestHandler(new PageProvider(TargetPage.class)); On Wed, Dec 7, 2011 at 9:59 PM, Fang Lin fang...@u.washington.edu wrote: Hi Dan, I removed the error handling logic from the WebPage and have the CustomExceptionListener handles all the Exceptions. @Override public IRequestHandler onException(RequestCycle cycle, Exception e) { logErr (cycle, e); if (e instanceof InvalidSession) { return new SessionErrHandler(); } if (e instanceof GetFailedException) { return new DbErrHandler(); } if (e instanceof ParameterException) { return new ParamErrHandler(); } if (e instanceof DisallowedUwnetidException) { return new AccessErrHandler(); } if (e instanceof SslException) { return new SslErrHandler(); } return new RuntimeErrHandler(); } Each of these handlers redirect to a static error page. Now I get this error: Can't instantiate page using constructor 'public myuw.page.Main(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument 'f=[d], tab=[1]'. Might be it doesn't exist, may be it is not visible (public). at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:196) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:97) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47) at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:107) at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264) at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:100) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:173) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:97) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47) at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:107) at
Re: Download file from ModalWindow problem
Can you please create a quick-start application that we can test? Ernesto On Fri, Dec 9, 2011 at 1:38 AM, heapifyman heapify...@gmail.com wrote: I did and I still don't seem to get it. I think I followed all the recommendations in javadoc: - put div wicket:id=downloadDialog/**div in html file before the ajax button that opens the window - added another form around the div wicket:id=downloadDialog/**div - changed sequence in ModalWindow's form's submit to download.initiate(target); ModalWindow.closeCurrent(**target); Still, after the window is closed and the download finished I cannot use any of the ajax links on my page until I reloaded the whole page. I don't understand what I might be doing wrong here. Am 08.12.2011 um 21:34 schrieb Martin Grigorov: See ModalWindow's javadoc. It explains about the need of a form On Thu, Dec 8, 2011 at 8:24 PM, heapifyman heapify...@gmail.com wrote: You mean putting an additional form around the modal window like below? form wicket:id=form fieldset button wicket:id=downloadButton**span wicket:id=**downloadButtonLabel/span/**button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/**div /wicket:container form wicket:id=**formAroundModalWindow div wicket:id=downloadDialog/**div /form wicket:panel 2011/12/8 Daniel Weidele daniel.weidele@uni-konstanz.**dedaniel.weid...@uni-konstanz.de No, it's doesn't look nested, yet. You may nest forms in Wicket, where the modal windows markup is in between. This worked for me when I experienced a similar problem. Von meinem iPad gesendet Am 08.12.2011 um 14:12 schrieb heapifyman heapify...@gmail.com: I believe it already is. My markup looks like this: form wicket:id=form fieldset button wicket:id=downloadButton**span wicket:id=**downloadButtonLabel/span/**button ... more buttons here ... /fieldset div wicket:id=dataPanel/div /form where dataPanel is: wicket:panel wicket:container wicket:id=checkGroup div wicket:id=dataContainer/**div /wicket:container div wicket:id=downloadDialog/**div wicket:panel 2011/12/8 Daniel Weidele daniel.weidele@uni-konstanz.**dedaniel.weid...@uni-konstanz.de Have you tried to put modal itself inside of another form, too? Am 08.12.2011 um 13:29 schrieb heapifyman heapify...@gmail.com: Hello again. Here's some more information about my problem: in the ModalWindow's SubmitButton's onSubmit() I call at the end: ModalWindow.closeCurrent(**target); download.initiate(target); The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow. Or do I have to add it to the button on my page that opens the ModalWindow? Thanks in advance. 2011/12/7 heapifyman heapify...@gmail.com Hello all, I have a problem with a file download from a ModalWindow. The ModalWindow contains a form in which the user can specify some parameters. When clicking submit I generate a PDF based on the chosen parameters and offer it for download. The ModalWindow is closed then. I followed the approach described here https://cwiki.apache.org/**WICKET/ajax-update-and-file-** download-in-one-blow.htmlandhttps://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland it actually works quite nice. My problem is that after the file is downloaded and the ModalWindow is closed all my Ajax stuff on the page from which the ModalWindow was opened are not working anymore. Only when I reload the page, the Ajax stuff is working again. I would appreciate any hints as to what I might be doing wrong. Or maybe someone has another code example of how to download a file from a ModalWindow? Thanks in advance. --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Any info on wasp-swarm?
Hi, Dan. Can you clarify the requirements of your application? If users' access are not based on their roles, then what are they based on? On Thu, Dec 8, 2011 at 8:46 PM, Dan Alvizu dalv...@pingidentity.com wrote: Hi, I'm trying to solve an authorization problem in wicket 1.5 -- I do not want users to have access to certain pages based on the roles that they have. I think wasp-swarm may be what I need, but is it being maintained anymore? I can't find anything current on the web since the 1.4.1 announcement. The link on the wiki leads nowhere as well: https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/wicket-security-parent (linked from) https://cwiki.apache.org/WICKET/wasp-swarm-security.html So I guess my question is three part -- is wasp-swarm what I'm looking for? Is it usable for wicket 1.5 or only wicket 1.4? And where the heck did it go? ;) Thanks, -Dan
Re: Any info on wasp-swarm?
On Fri, Dec 9, 2011 at 5:46 AM, Dan Alvizu dalv...@pingidentity.com wrote: Hi, I'm trying to solve an authorization problem in wicket 1.5 -- I do not want users to have access to certain pages based on the roles that they have. I think wasp-swarm may be what I need, but is it being maintained anymore? I can't find anything current on the web since the 1.4.1 announcement. The link on the wiki leads nowhere as well: https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/wicket-security-parent https://github.com/wicketstuff/core/tree/core-1.5.x/jdk-1.5-parent/wicket-security-parent You ask for 1.5.x branch ... Master branch now is against Wicket trunk (i.e. 6.0) (linked from) https://cwiki.apache.org/WICKET/wasp-swarm-security.html So I guess my question is three part -- is wasp-swarm what I'm looking for? Is it usable for wicket 1.5 or only wicket 1.4? And where the heck did it go? ;) Thanks, -Dan -- 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