Re: How To Download Excel File?
Check out my responses in this discussion... http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--td15459841.html#a21462901 I had some trouble getting generated files to download right at first. They either caused Wicket to become non-responsive or I couldn't provide a file name or MIME type. The solution I eventually came up with works very well. -Brandon wadi wrote: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi -- View this message in context: http://www.nabble.com/How-To-Download-Excel-File--tp22806518p22808994.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: Page Maps and Expirations
Thanks again. I am still interested in page stores though. I'm not saying they are related to the expiration issue but I am curious how do they manage themselves. I haven't been able to find much info online. Does each one just store a potentially unlimited number of pages or is there some resource management going on? Matej Knopp-2 wrote: Hi, wicket holds the last accessed page in pagemap and certain number of previous pages in DiskPageStore (serialized on disk). The last accessed page should never be evicted from pagemap and even if it was, it would still be stored on disk. -Matej On Fri, Jan 23, 2009 at 12:19 AM, UPBrandon bcr...@up.com wrote: Thanks Matej and Igor. We are using sticky sessions (I can even see the JSESSIONID in requests) and since a session sticks to a certain server/instance, there shouldn't be any need for replicating sessions among instances. There are dozens and dozens of web apps here and losing sessions hasn't been an issue. Would it make any difference if I said that sometime a user may get a page expired error only 30 seconds after the last page request? But this is a problem that only happens occasionally and supposedly under high load. Either way, I would still be interested in knowing more about how Wicket's session store works. - Under what circumstances are pages evicted from a page map? - Is there a limit on how many pages can be stored in a single page map? - Are there any global (per Wicket instance, not per map or session) limits on how many pages are held onto? - Under what circumstances are page maps destroyed? Only when a window or tab is closed? - Does Wicket ever destroy a session or does it let the container manage all that? I guess what all of those questions really get is this - is there ever a point where Wicket starts running out of space and has to clean house? If so, what is the process that it goes through? -Brandon igor.vaynberg wrote: yep. it looks like the servlet container is losing the session. do you have sticky sessions? if not then you need to have http session replication happening. -igor On Thu, Jan 22, 2009 at 1:11 PM, Matej Knopp matej.kn...@gmail.com wrote: Well, as far as I can tell, there is nothing special going on in Wicket that might cause session expiration. Last visited page is basically a normal session property. To me this seems more likely to be servlet container / load balancer issue. -Matej On Thu, Jan 22, 2009 at 9:21 PM, UPBrandon bcr...@up.com wrote: The project I work on uses Wicket 1.3.4 and we are using the default session store (SecondLevelCacheSessionStore.) The app is clustered and runs on WebLogic 8 through Apache. I'm not entirely sure how those two are setup but I don't believe there is any resource sharing between instances in a cluster. Instead, when a session is started, a WebLogic instance is chosen and all future requests in that session are sent to that one instance. Using that setup, there shouldn't be any issues with a user's request going to a machine that doesn't have their page map. The problem is happening during normal forward use. The example that I was given was a user taking a few minutes to fill out some information and by the time they submit the form, their session appears to have timed out and they get a page expired error. I hope that helps to clarify things a bit. Matej Knopp-2 wrote: couple of questions: -what wicket version are you using? -are you using httpsessionstore or secondlevelcachesessionstore (default)? -what application server/container are you using? -are you running the application in clustered environment? if yes, what kind of load balancing do you have? -do the expirations happen during normal operation or only when using back button (or using application in multiple tabs) -Matej On Thu, Jan 22, 2009 at 7:47 PM, UPBrandon bcr...@up.com wrote: In some of our Wicket applications, as the number of users has started to ramp up, we seem to be experiencing a scalability issue. Some users have had problems with pages expiring quickly. This is second-hand information so I can't elaborate much but supposedly, during peak times, pages are expiring after just a few minutes of inactivity. It would be nice to be able to set a minimum retention time but I don't seem to see an option like that. I've found information about how Wicket stores pages and revisions (http://cwiki.apache.org/WICKET/page-maps.html) but I haven't been able to find much on how Wicket manages that data when things start filling up. Are there any good explanations out there on the web? -Brandon -- View this message in context: http://www.nabble.com/Page-Maps-and-Expirations-tp21610595p21615739.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail
Page Maps and Expirations
In some of our Wicket applications, as the number of users has started to ramp up, we seem to be experiencing a scalability issue. Some users have had problems with pages expiring quickly. This is second-hand information so I can't elaborate much but supposedly, during peak times, pages are expiring after just a few minutes of inactivity. It would be nice to be able to set a minimum retention time but I don't seem to see an option like that. I've found information about how Wicket stores pages and revisions (http://cwiki.apache.org/WICKET/page-maps.html) but I haven't been able to find much on how Wicket manages that data when things start filling up. Are there any good explanations out there on the web? -Brandon -- View this message in context: http://www.nabble.com/Page-Maps-and-Expirations-tp21610595p21610595.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: Page Maps and Expirations
The project I work on uses Wicket 1.3.4 and we are using the default session store (SecondLevelCacheSessionStore.) The app is clustered and runs on WebLogic 8 through Apache. I'm not entirely sure how those two are setup but I don't believe there is any resource sharing between instances in a cluster. Instead, when a session is started, a WebLogic instance is chosen and all future requests in that session are sent to that one instance. Using that setup, there shouldn't be any issues with a user's request going to a machine that doesn't have their page map. The problem is happening during normal forward use. The example that I was given was a user taking a few minutes to fill out some information and by the time they submit the form, their session appears to have timed out and they get a page expired error. I hope that helps to clarify things a bit. Matej Knopp-2 wrote: couple of questions: -what wicket version are you using? -are you using httpsessionstore or secondlevelcachesessionstore (default)? -what application server/container are you using? -are you running the application in clustered environment? if yes, what kind of load balancing do you have? -do the expirations happen during normal operation or only when using back button (or using application in multiple tabs) -Matej On Thu, Jan 22, 2009 at 7:47 PM, UPBrandon bcr...@up.com wrote: In some of our Wicket applications, as the number of users has started to ramp up, we seem to be experiencing a scalability issue. Some users have had problems with pages expiring quickly. This is second-hand information so I can't elaborate much but supposedly, during peak times, pages are expiring after just a few minutes of inactivity. It would be nice to be able to set a minimum retention time but I don't seem to see an option like that. I've found information about how Wicket stores pages and revisions (http://cwiki.apache.org/WICKET/page-maps.html) but I haven't been able to find much on how Wicket manages that data when things start filling up. Are there any good explanations out there on the web? -Brandon -- View this message in context: http://www.nabble.com/Page-Maps-and-Expirations-tp21610595p21610595.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Page-Maps-and-Expirations-tp21610595p21612435.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: Page Maps and Expirations
Thanks Matej and Igor. We are using sticky sessions (I can even see the JSESSIONID in requests) and since a session sticks to a certain server/instance, there shouldn't be any need for replicating sessions among instances. There are dozens and dozens of web apps here and losing sessions hasn't been an issue. Would it make any difference if I said that sometime a user may get a page expired error only 30 seconds after the last page request? But this is a problem that only happens occasionally and supposedly under high load. Either way, I would still be interested in knowing more about how Wicket's session store works. - Under what circumstances are pages evicted from a page map? - Is there a limit on how many pages can be stored in a single page map? - Are there any global (per Wicket instance, not per map or session) limits on how many pages are held onto? - Under what circumstances are page maps destroyed? Only when a window or tab is closed? - Does Wicket ever destroy a session or does it let the container manage all that? I guess what all of those questions really get is this - is there ever a point where Wicket starts running out of space and has to clean house? If so, what is the process that it goes through? -Brandon igor.vaynberg wrote: yep. it looks like the servlet container is losing the session. do you have sticky sessions? if not then you need to have http session replication happening. -igor On Thu, Jan 22, 2009 at 1:11 PM, Matej Knopp matej.kn...@gmail.com wrote: Well, as far as I can tell, there is nothing special going on in Wicket that might cause session expiration. Last visited page is basically a normal session property. To me this seems more likely to be servlet container / load balancer issue. -Matej On Thu, Jan 22, 2009 at 9:21 PM, UPBrandon bcr...@up.com wrote: The project I work on uses Wicket 1.3.4 and we are using the default session store (SecondLevelCacheSessionStore.) The app is clustered and runs on WebLogic 8 through Apache. I'm not entirely sure how those two are setup but I don't believe there is any resource sharing between instances in a cluster. Instead, when a session is started, a WebLogic instance is chosen and all future requests in that session are sent to that one instance. Using that setup, there shouldn't be any issues with a user's request going to a machine that doesn't have their page map. The problem is happening during normal forward use. The example that I was given was a user taking a few minutes to fill out some information and by the time they submit the form, their session appears to have timed out and they get a page expired error. I hope that helps to clarify things a bit. Matej Knopp-2 wrote: couple of questions: -what wicket version are you using? -are you using httpsessionstore or secondlevelcachesessionstore (default)? -what application server/container are you using? -are you running the application in clustered environment? if yes, what kind of load balancing do you have? -do the expirations happen during normal operation or only when using back button (or using application in multiple tabs) -Matej On Thu, Jan 22, 2009 at 7:47 PM, UPBrandon bcr...@up.com wrote: In some of our Wicket applications, as the number of users has started to ramp up, we seem to be experiencing a scalability issue. Some users have had problems with pages expiring quickly. This is second-hand information so I can't elaborate much but supposedly, during peak times, pages are expiring after just a few minutes of inactivity. It would be nice to be able to set a minimum retention time but I don't seem to see an option like that. I've found information about how Wicket stores pages and revisions (http://cwiki.apache.org/WICKET/page-maps.html) but I haven't been able to find much on how Wicket manages that data when things start filling up. Are there any good explanations out there on the web? -Brandon -- View this message in context: http://www.nabble.com/Page-Maps-and-Expirations-tp21610595p21615739.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: I also have the question
From what I've read, the difference between the two browsers is that IE uses the file name's extension to determine what type of file it is and other browsers like FireFox use the MIME type provided by the remote server (your application in this case.) So, IE is seeing .csv and assuming it's a CSV file. FireFox on the other hand is looking at the text/plain MIME type you provided and assuming it's a plain text file. You are using the wrong mime type. wch2001 wrote: thanks, UPBrandon I tried your code, for csv, public class CsvRequestTarget extends ByteDataRequestTarget { public CsvRequestTarget(byte[] data, String fileName) { super(text/plain, data, fileName+.csv); } } but it can not work with IE and ff. Could you tell me your code about csv ? thanks a lot UPBrandon wrote: For a while, we were using a solution that allowed us to download generated PDF's but it only seemed to work in IE and some people had trouble using it from outside connections. What I wanted was a way to access dynamic/generated content that: - Doesn't cause Wicket to be come non-responsive after the request - Works in at least IE and FF - Allows a file name to be provided - Allows a mime type to be provided After taking another stab at it, I was able to get that working. Here is what I ended up with: public class ByteDataRequestTarget extends ByteArrayResource implements IRequestTarget { private String fileName; public ByteDataRequestTarget(String mimeType, byte[] data, String fileName) { super(mimeType, data, fileName); this.fileName = fileName; } public void detach(RequestCycle requestCycle) { } public void respond(RequestCycle requestCycle) { requestCycle.setRequestTarget(new ResourceStreamRequestTarget(this.getResourceStream() ) { public String getFileName() { return fileName; } } ); } } And then I subclassed for different common file types like PDF and CSV. Those subclasses basically just provide the MIME type for the user and automatically add the file extension. public class PdfRequestTarget extends ByteDataRequestTarget { public PdfRequestTarget(byte[] data, String fileName) { super(Constants.PDF_MIME_TYPE, data, fileName+.pdf); } } To use the class, you do something like this: new Button(buttonId, new Model(My Button) ) { public void onSubmit() { getRequestCycle().setRequestTarget(new PdfRequestTarget(getSomePdfData(), FileName) ); } }; I hope that helps. -- View this message in context: http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p21550916.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: I also have the question
For a while, we were using a solution that allowed us to download generated PDF's but it only seemed to work in IE and some people had trouble using it from outside connections. What I wanted was a way to access dynamic/generated content that: - Doesn't cause Wicket to be come non-responsive after the request - Works in at least IE and FF - Allows a file name to be provided - Allows a mime type to be provided After taking another stab at it, I was able to get that working. Here is what I ended up with: public class ByteDataRequestTarget extends ByteArrayResource implements IRequestTarget { private String fileName; public ByteDataRequestTarget(String mimeType, byte[] data, String fileName) { super(mimeType, data, fileName); this.fileName = fileName; } public void detach(RequestCycle requestCycle) { } public void respond(RequestCycle requestCycle) { requestCycle.setRequestTarget(new ResourceStreamRequestTarget(this.getResourceStream() ) { public String getFileName() { return fileName; } } ); } } And then I subclassed for different common file types like PDF and CSV. Those subclasses basically just provide the MIME type for the user and automatically add the file extension. public class PdfRequestTarget extends ByteDataRequestTarget { public PdfRequestTarget(byte[] data, String fileName) { super(Constants.PDF_MIME_TYPE, data, fileName+.pdf); } } To use the class, you do something like this: new Button(buttonId, new Model(My Button) ) { public void onSubmit() { getRequestCycle().setRequestTarget(new PdfRequestTarget(getSomePdfData(), FileName) ); } }; I hope that helps. wch2001 wrote: UPBrandon, Did u find any solution for it? anyone can help? thanks UPBrandon wrote: It's not that I necessary want to see the page refreshed with updated form values. In fact, I would prefer that the user not leave the page at all. All the form contains is a checkgroup of things to include in the PDF. All I want to do when the button is pressed is view/download the PDF but the form with the checkgroup needs to be submitted first so I can see what was checked when I generate the PDF. I suppose taking the ResourceReference's and using it in the onload would work but it seems like such a hack, not to mention that it might cause problems if the user uses the back button. While working on my DynamicWebResource, I was able to download a PDF and continue using my application using a link (assigned to either a link or button in HTML.) The only problem is that it doesn't do a submit. Accessing the DynamicWebResource from a button works but makes my app non-responsive. What I would like to do is either make the ResourceLink somehow submit my form or, even better, make a button component that handles the request in a way that doens't break Wicket. Ideas/suggestions? -Brandon igor.vaynberg wrote: so you want to see the page with updated form values _and_ stream the pdf? why dont you take that url you generated for your resourceref and append it to a window.onload javascript that does window.location=url; -gior As I mentioned in my previous response, I couldn't use getRequestCycle().setRequestTarget() directly because of the way the API works (you can use a ResourceReference but not a Resource.) Instead, I ended up with something like this: new AjaxButton(buttonId, form) { protected void onSubmit(AjaxRequestTarget target, Form form) { ResourceReference pdfReference = new ResourceReference() { protected Resource newResource() { return new BillPdfWebResource(...); } }; String url = getRequestCycle().get().urlFor(pdfReference).toString(); getRequestCycle().setRequestTarget(new RedirectRequestTarget(url) ); } } It works... but only once. When I click on the button, everything works, my PDF gets generated and downloaded but then my app becomes unresponsive. I can't interact with the site at all until I start over. Is there a better way to go about this that wouldn't cause that side effect? Whatever approach I take, I need to be able to submit a form when the PDF is generated. My example doesn't show it but my BillPdfWebResource class generates a PDF based on the user's selection and my Form's Model needs to be updated. Any suggestions? -Brandon igor.vaynberg wrote: onsubmit() { getrequestcycle().setrequesttarget(new redirectrequesttarget(urlfor(resourceref))); } -igor On Feb 13, 2008 8:18 AM, UPBrandon bcr...@up.com wrote: In a project I am working on, I wrote
Re: Howto use .xhtml instead of .html for template file extension
Out of curiosity, since pages in a Wicket application aren't accessed as directly as something like a JSP might be, what reasoning is there for using an XHTML file extension instead of HTML? -Brandon MYoung wrote: I follow this: http://cwiki.apache.org/confluence/display/WICKET/Use+a+different+extension+for+template+files added this to MyPage: @Override public String getMarkupType() { return xhtml; } and it doesn't work. Firefox wants to download the file instead of showing the page. http://www.nabble.com/file/p15641885/no-go-xhtml.jpg IE7 cannot even download the file. What am I doing wrong? -- View this message in context: http://www.nabble.com/Howto-use-.xhtml-instead-of-.html-for-template-file-extension-tp15641885p15674567.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: Opening DynamicWebResource from Button/AjaxButton?
It's not that I necessary want to see the page refreshed with updated form values. In fact, I would prefer that the user not leave the page at all. All the form contains is a checkgroup of things to include in the PDF. All I want to do when the button is pressed is view/download the PDF but the form with the checkgroup needs to be submitted first so I can see what was checked when I generate the PDF. I suppose taking the ResourceReference's and using it in the onload would work but it seems like such a hack, not to mention that it might cause problems if the user uses the back button. While working on my DynamicWebResource, I was able to download a PDF and continue using my application using a link (assigned to either a link or button in HTML.) The only problem is that it doesn't do a submit. Accessing the DynamicWebResource from a button works but makes my app non-responsive. What I would like to do is either make the ResourceLink somehow submit my form or, even better, make a button component that handles the request in a way that doens't break Wicket. Ideas/suggestions? -Brandon igor.vaynberg wrote: so you want to see the page with updated form values _and_ stream the pdf? why dont you take that url you generated for your resourceref and append it to a window.onload javascript that does window.location=url; -gior On Wed, Feb 20, 2008 at 2:33 PM, UPBrandon [EMAIL PROTECTED] wrote: As I mentioned in my previous response, I couldn't use getRequestCycle().setRequestTarget() directly because of the way the API works (you can use a ResourceReference but not a Resource.) Instead, I ended up with something like this: new AjaxButton(buttonId, form) { protected void onSubmit(AjaxRequestTarget target, Form form) { ResourceReference pdfReference = new ResourceReference() { protected Resource newResource() { return new BillPdfWebResource(...); } }; String url = getRequestCycle().get().urlFor(pdfReference).toString(); getRequestCycle().setRequestTarget(new RedirectRequestTarget(url) ); } } It works... but only once. When I click on the button, everything works, my PDF gets generated and downloaded but then my app becomes unresponsive. I can't interact with the site at all until I start over. Is there a better way to go about this that wouldn't cause that side effect? Whatever approach I take, I need to be able to submit a form when the PDF is generated. My example doesn't show it but my BillPdfWebResource class generates a PDF based on the user's selection and my Form's Model needs to be updated. Any suggestions? -Brandon igor.vaynberg wrote: onsubmit() { getrequestcycle().setrequesttarget(new redirectrequesttarget(urlfor(resourceref))); } -igor On Feb 13, 2008 8:18 AM, UPBrandon [EMAIL PROTECTED] wrote: In a project I am working on, I wrote a DynamicWebResource that generates a PDF file and, by setting the Content-Disposition in the header, got it so that the user is prompted to download the PDF when they click on a ResourceLink to my PDF-generating resource. That all works fine but now I need to open the PDF from a button. I want to allow the user to select a value in a form and press a button to view somewhat of a report for the item they selected. However, there doesn't appear to be any type of button that would lead a user to my DynamicWebResource. Is there any way to have a button do a submit (update the model) and then lead the user to a resource? -Brandon -- View this message in context: http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15459841.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15600541.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton
Re: Opening DynamicWebResource from Button/AjaxButton?
As I mentioned in my previous response, I couldn't use getRequestCycle().setRequestTarget() directly because of the way the API works (you can use a ResourceReference but not a Resource.) Instead, I ended up with something like this: new AjaxButton(buttonId, form) { protected void onSubmit(AjaxRequestTarget target, Form form) { ResourceReference pdfReference = new ResourceReference() { protected Resource newResource() { return new BillPdfWebResource(...); } }; String url = getRequestCycle().get().urlFor(pdfReference).toString(); getRequestCycle().setRequestTarget(new RedirectRequestTarget(url) ); } } It works... but only once. When I click on the button, everything works, my PDF gets generated and downloaded but then my app becomes unresponsive. I can't interact with the site at all until I start over. Is there a better way to go about this that wouldn't cause that side effect? Whatever approach I take, I need to be able to submit a form when the PDF is generated. My example doesn't show it but my BillPdfWebResource class generates a PDF based on the user's selection and my Form's Model needs to be updated. Any suggestions? -Brandon igor.vaynberg wrote: onsubmit() { getrequestcycle().setrequesttarget(new redirectrequesttarget(urlfor(resourceref))); } -igor On Feb 13, 2008 8:18 AM, UPBrandon [EMAIL PROTECTED] wrote: In a project I am working on, I wrote a DynamicWebResource that generates a PDF file and, by setting the Content-Disposition in the header, got it so that the user is prompted to download the PDF when they click on a ResourceLink to my PDF-generating resource. That all works fine but now I need to open the PDF from a button. I want to allow the user to select a value in a form and press a button to view somewhat of a report for the item they selected. However, there doesn't appear to be any type of button that would lead a user to my DynamicWebResource. Is there any way to have a button do a submit (update the model) and then lead the user to a resource? -Brandon -- View this message in context: http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15459841.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15600541.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]
Disabling Modal Unload Confirmation
I have a page that uses ModalWindows and I would like to disable the JavaScript confirmation that is displayed when you try to leave the page while a modal window is open. As recommended by developers here, I added Wicket.Window.unloadConfirmation = false; in my page header to disable those confirmations. However, when the page loads, the browser gives me an error say that Wicket.Window doesn't have any properties. As you might expect, the confirmation dialog is not not disabled. Looking at the source for my page, it looks like my code, which was declared inside of a wicket:head tag, is called before Wicket's modal.js. I assume that including modal.js before Wicket.Window.unloadConfirmation = false would fix the problem but I'm not sure how to do that. Does anyone know of a way to fix this? -Brandon -- View this message in context: http://www.nabble.com/Disabling-Modal-Unload-Confirmation-tp15491041p15491041.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]
Opening DynamicWebResource from Button/AjaxButton?
In a project I am working on, I wrote a DynamicWebResource that generates a PDF file and, by setting the Content-Disposition in the header, got it so that the user is prompted to download the PDF when they click on a ResourceLink to my PDF-generating resource. That all works fine but now I need to open the PDF from a button. I want to allow the user to select a value in a form and press a button to view somewhat of a report for the item they selected. However, there doesn't appear to be any type of button that would lead a user to my DynamicWebResource. Is there any way to have a button do a submit (update the model) and then lead the user to a resource? -Brandon -- View this message in context: http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15459841.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: Wicket Ideal Bandwidth
Regardless of what technologies you use on the server side (Wicket, JSF, Struts, etc.,) the end product that gets transmitted to the user is just plain old HTML. Use the same judgment you would use with any other page/site. If you have big pages with lots of images and whatnot, you will either need a faster connection or you would need to be a little more patient. :-) I suppose AJAX might be another consideration. If you are using AJAX a lot, you application's responsiveness might depend on your connection. But even then, with relatively small responses, responsiveness generally has more to do with latency than bandwidth. -Brandon carloc wrote: Hi guys, What do you think will be the ideal bandwidth to use when you are using Wicket? Will it work good on a 128kbps connection? what's the beset bandwidth that you could recommend? carlo -- View this message in context: http://www.nabble.com/Wicket-Ideal-Bandwidth-tp15452645p15459855.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: Dynamic DataTable columns
Well, it's not really a matter of hiding and showing table columns for convenience. It's really more a matter of having a selection panel that allows a user to select a business object (the panel puts it in a model) and and display panel that displays details for the selected business object. The business objects - we'll say a bill in this case - could have many different variations. Each type might have a lot of common information (date/time, total amount, customer name, address, etc.) but each type of bill might have fields that others don't. Normally, taking an OO approach, I would create a base display panel and have bill-specific panels that extend that base panel, adding extra columns to the details table when the DataTable is created. However, in this case, I have a selection panel and a display panel that share a model and once they are created, that's it. Staying with the bill example, the selection panel displays bills (an assortment of types) and the display panel has to show whatever is selected. Since I originally posted this message, I got around this limitation by creating a model that replaces a generic display panel with a more specialized panel as needed. But I still believe there is a need for a DataTable that is more dynamic. Ideally, a DataTable would take a java.util.List or a model wrapping a List and rather than referencing that list directly, the DataTable would use the its own getColumns() method, making it easy to add logic as needed. cblehman wrote: Can't you just create a new DataTable with the new list of columns in the ajax call when you want to add/remove a column, then repaint the container holding the Table? -Clay -Original Message- From: Timo Rantalaiho [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 10:26 PM To: users@wicket.apache.org Subject: Re: Dynamic DataTable columns On Mon, 28 Jan 2008, UPBrandon wrote: Although, in the mean time, I still have the same problem - not being able to change change the columns after the DataTable has been declared, at render time. Any suggestions? Roll your own using DataView. You can take ideas from DataTable but I doubt that the Column abstraction helps you if you want to change the columns dynamically; this is probably easier done by just changing the row Item creation. In my experience such high-level components as DataTable don't work well when you want a lot of control, then their value is more that of an example. Best wishes, Timo -- View this message in context: http://www.nabble.com/Dynamic-DataTable-columns-tp15142596p15162689.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]
Dynamic DataTable columns
I was wondering if there is any way to change the columns of a DataTable once it has been declared. On my page, I pass an IModel into a Panel that contains my DataTable. As the user users the page, the contents of the model will change and I would like for that to affect which columns are shown in the table. The problem is that DataTables take an array of IColumns (instead of a List, which could be manipulated after instantiation.) I would override the DataTable's getColumns() method to return the appropriate columns but it is final. Is there any technical/design reason why getColumns() is final? To me, it seems unnecessary and is very annoying in an OO framework. Does anyone know of any way I could make the columns in my table dynamic without setting the visibility of th's and td's from inside my IColumns? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/Dynamic-DataTable-columns-tp15142596p15142596.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: Dynamic DataTable columns
Hmm... looking at the code a bit, I don't think making getColumns() non-final it will help after all. I assumed that getColumns() was used internally by DataTable but it doesn't appear to be. What would really be nice is if DataTable took a List (or a model wrapping a list) instead of an IColumn array but I agree that would be a much bigger change. Although, in the mean time, I still have the same problem - not being able to change change the columns after the DataTable has been declared, at render time. Any suggestions? -Brandon igor.vaynberg wrote: are you sure that will help you? does datatable refresh the component hierarchy that defines the toolbars on every requests? -igor On Jan 28, 2008 11:32 AM, UPBrandon [EMAIL PROTECTED] wrote: Is there any chance simply removing the final modifier could make it into a 1.3.1 type of release? igor.vaynberg wrote: you will have to roll your own for now. we might fix this in 1.4 if you add this to the wiki wishlist for 1.4 page. -igor I was wondering if there is any way to change the columns of a DataTable once it has been declared. On my page, I pass an IModel into a Panel that contains my DataTable. As the user users the page, the contents of the model will change and I would like for that to affect which columns are shown in the table. The problem is that DataTables take an array of IColumns (instead of a List, which could be manipulated after instantiation.) I would override the DataTable's getColumns() method to return the appropriate columns but it is final. Is there any technical/design reason why getColumns() is final? To me, it seems unnecessary and is very annoying in an OO framework. Does anyone know of any way I could make the columns in my table dynamic without setting the visibility of th's and td's from inside my IColumns? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/Dynamic-DataTable-columns-tp15142596p15143304.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Dynamic-DataTable-columns-tp15142596p15144865.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: Dynamic DataTable columns
Is there any chance simply removing the final modifier could make it into a 1.3.1 type of release? igor.vaynberg wrote: you will have to roll your own for now. we might fix this in 1.4 if you add this to the wiki wishlist for 1.4 page. -igor I was wondering if there is any way to change the columns of a DataTable once it has been declared. On my page, I pass an IModel into a Panel that contains my DataTable. As the user users the page, the contents of the model will change and I would like for that to affect which columns are shown in the table. The problem is that DataTables take an array of IColumns (instead of a List, which could be manipulated after instantiation.) I would override the DataTable's getColumns() method to return the appropriate columns but it is final. Is there any technical/design reason why getColumns() is final? To me, it seems unnecessary and is very annoying in an OO framework. Does anyone know of any way I could make the columns in my table dynamic without setting the visibility of th's and td's from inside my IColumns? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/Dynamic-DataTable-columns-tp15142596p15143304.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]
FilterToolbar API Changes
Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 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: FilterToolbar API Changes
Do you have an address for that? I downloaded what I thought was the latest version from http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook yesterday but it appears to be using an older version of Wicket-Extensions. The page I was focusing on, ListContactsPage, uses the older (now missing) constructor that takes a DataTable and SortableDataProvider as parameters. Is a newer version available somewhere else online? -Brandon igor.vaynberg wrote: see wicket-phonebook in wicket-stuff -igor On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13370982 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: FilterToolbar API Changes
That worked perfectly. Thanks for the point in the right direction. For anyone looking for information on a similar problem, a change in Wicket-Extensions 1.3 beta 4 requires users to pass a FilterForm to a FilterToolbar when it is constructed. If your table already uses components like a CheckGroup, your DataTable should already be wrapped in a Form of some sort. Simply changing that Form to a FilterForm will allow you to use that form for both a CheckGroup and the FilterToolbar. But be aware that you will now have to manually add a focus-tracker and focus-restore component to your markup. The corresponding objects are added on the Java side by the FilterToolbar. An example, can be found at https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/src/java/wicket/contrib/phonebook/web/page/ListContactsPage.html Martijn Dashorst wrote: Check it out from subversion, then you are sure you have the latest (though it may still be a bit out of date). https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/ Martijn On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Do you have an address for that? I downloaded what I thought was the latest version from http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook yesterday but it appears to be using an older version of Wicket-Extensions. The page I was focusing on, ListContactsPage, uses the older (now missing) constructor that takes a DataTable and SortableDataProvider as parameters. Is a newer version available somewhere else online? -Brandon igor.vaynberg wrote: see wicket-phonebook in wicket-stuff -igor On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13370982 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13372438 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: DataTable FilterToolbar Shifted After AJAX Call
Oh, well that's good to hear. My team and I are using the last major release, beta 3. I will see if a more recent build fixes the problem and add a Jira ticket if it doesn't. Are nightly stable builds available anywhere? -Brandon Evan Chooly wrote: What version of wicket are you using? I saw this with beta3 but later snapshots fixed it for me. So if you're not on a recent snapshot, you might consider trying that and seeing if that helps. On 10/10/07, UPBrandon [EMAIL PROTECTED] wrote: I am working on a project that has a DataTable with a filter that uses AJAX to update an object on the backend and refresh the table, among other things. Everything is working well so far except the columns in the filter toolbar row are shifted one column to the right after the AJAX refresh. Using Firebug to inspect the toolbar row after the update, I see that everything is shifted one to the right because Wicket is inserting a div in the tr before the td's. So instead of tr td.../td td.../td /tr I have tr div/div td.../td td.../td /tr The contents of the div are: div id=filter-form18 wicket:id=filter-forminput type=hidden value= wicket:id=focus-tracker name=checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker id=queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker//div If it makes any difference, when I do the update, I am not updating the DataTable directly - I am updating a higher level Panel that contains the DataTable. Has anyone else had any similar problems? -Brandon -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13160984 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DataTable FilterToolbar Shifted After AJAX Call
I am working on a project that has a DataTable with a filter that uses AJAX to update an object on the backend and refresh the table, among other things. Everything is working well so far except the columns in the filter toolbar row are shifted one column to the right after the AJAX refresh. Using Firebug to inspect the toolbar row after the update, I see that everything is shifted one to the right because Wicket is inserting a div in the tr before the td's. So instead of tr td.../td td.../td /tr I have tr div/div td.../td td.../td /tr The contents of the div are: div id=filter-form18 wicket:id=filter-forminput type=hidden value= wicket:id=focus-tracker name=checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker id=queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker//div If it makes any difference, when I do the update, I am not updating the DataTable directly - I am updating a higher level Panel that contains the DataTable. Has anyone else had any similar problems? -Brandon -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 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: Appending JS to an Ajax Component
I can see how one JavaScript might be dependent on another (although it seems like such scripts should really be one script anyway) but that case is definitely not universal. In my experience, sometimes a Wicket user needs to add an onclick or onchange event to an Ajax component and execution order doesn't matter. I think it would be better to have AttributeAppender work consistently (but not address a special case) than to not work at all. There may be other technical reasons why applying an AttributeAppender to an Ajax component without having its output overwritten would be a challenge, but interdependency shouldn't be a reason. Thoughts? -Brandon igor.vaynberg wrote: well, the problem is you are trying to bind two things to the same event. the order of execution is not always clear if i call add(A) followed by add(B) does it always execute A,B or can B,A be acceptable? if it is A,B does B still execute if A fails? do we need to somehow prevent A from doing a return false; and preventing B from executing? etc etc etc. there is just no easy way to do this automatically and get all the usecases right. -igor On 9/25/07, UPBrandon [EMAIL PROTECTED] wrote: I did that and it worked. Thanks for a point in the right direction. But while I am writing, doesn't it seem like appenders should work more consistently, regardless of what component the appender is added to? Is there a technical reason why that is not (and could not be) the case? -Brandon igor.vaynberg wrote: you can putting your script into iajaxcalldecorator and giving that to the behavior -igor On 9/24/07, UPBrandon [EMAIL PROTECTED] wrote: I am trying to use an AttributeAppender to append an onchange script to a DropDownChoice that also has an OnChangeAjaxBehavior added to it. But only the OnChangeAjaxBehavior's script is showing up in the markup. Is there a trick to adding JavaScript to a component that also has an Ajax behavior? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12869413 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12885637 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12929158 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: Appending JS to an Ajax Component
I did that and it worked. Thanks for a point in the right direction. But while I am writing, doesn't it seem like appenders should work more consistently, regardless of what component the appender is added to? Is there a technical reason why that is not (and could not be) the case? -Brandon igor.vaynberg wrote: you can putting your script into iajaxcalldecorator and giving that to the behavior -igor On 9/24/07, UPBrandon [EMAIL PROTECTED] wrote: I am trying to use an AttributeAppender to append an onchange script to a DropDownChoice that also has an OnChangeAjaxBehavior added to it. But only the OnChangeAjaxBehavior's script is showing up in the markup. Is there a trick to adding JavaScript to a component that also has an Ajax behavior? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12869413 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12885639 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Appending JS to an Ajax Component
I am trying to use an AttributeAppender to append an onchange script to a DropDownChoice that also has an OnChangeAjaxBehavior added to it. But only the OnChangeAjaxBehavior's script is showing up in the markup. Is there a trick to adding JavaScript to a component that also has an Ajax behavior? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/Appending-JS-to-an-Ajax-Component-tf4512114.html#a12869413 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Refresh a page from an AjaxButton?
I'm writing a Wicket app that makes pretty heavy use of the Wicket-Extensions ModalWindow to present what is basically a dialog box where the user can enter information into a form. The form on each dialog box is submitted with an AjaxButton and each panel has a feedback panel that is refreshed to show validation errors. Everything works fine and right now I am just closing a the dialog when the form is submitted successfully. However, what I would like to do is have the entire page reload to reflect whatever changes the form submit may have caused. I know that I could add certain page elements to the AjaxButton's AjaxRequestTarget but the effect of the dialog could be wide spread. Is there any way to have an AjaxButton trigger a complete non-Ajax page refresh? -Brandon -- View this message in context: http://www.nabble.com/Refresh-a-page-from-an-AjaxButton--tf4469626.html#a12744000 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: Refresh a page from an AjaxButton?
That seems to work. I was trying to do exactly that earlier. At the time, I couldn't seem to access the setResponsePage() method but I must have been doing something wrong. For anyone who might be reading this later, I ended up calling setResponsePage(getPage() ); The only problem I am having now is that ModalWindow has an annoying are you sure you want to navigate away from this page JavaScript confirm since the modal window is open when the browser tries to move on. Maybe there's something in the API to disable that warning... Anyway, thanks for the help everyone. -Brandon John Ray wrote: UPBrandon wrote: Is there any way to have an AjaxButton trigger a complete non-Ajax page refresh? Call setResponsePage() passing the page you want to be loaded after the AJAX call is complete. To refresh the current page simply pass in the current page i.e. this. -- View this message in context: http://www.nabble.com/Refresh-a-page-from-an-AjaxButton--tf4469626.html#a12745497 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: Refresh a page from an AjaxButton?
I thought about it but using ModalWindows makes things a little more complicated. Using a regular button, the browser will navigate away and the modal window will be lost. If there were no validation on the form inputs and the window always closed after the submit, that might not be a problem but it does create a problem if you want to do validation and have errors show up in that modal window. Does that make sense at all? -Brandon David Bernard-2 wrote: Why not use a regular Button and the onSumit() method of the form if you want to reload the page ? /david UPBrandon wrote: I'm writing a Wicket app that makes pretty heavy use of the Wicket-Extensions ModalWindow to present what is basically a dialog box where the user can enter information into a form. The form on each dialog box is submitted with an AjaxButton and each panel has a feedback panel that is refreshed to show validation errors. Everything works fine and right now I am just closing a the dialog when the form is submitted successfully. However, what I would like to do is have the entire page reload to reflect whatever changes the form submit may have caused. I know that I could add certain page elements to the AjaxButton's AjaxRequestTarget but the effect of the dialog could be wide spread. Is there any way to have an AjaxButton trigger a complete non-Ajax page refresh? -Brandon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Refresh-a-page-from-an-AjaxButton--tf4469626.html#a12745341 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]