Re: Upload/Download FormComponent
Not exactly sure what the issue is. You can simply put the components into panels (or other objects). Meaning make a Download Component, then an Upload Component separate classes so they can be re-used in the future if you only want to allow a download form... then put them in one form and decide which panel to show (each panel holding 2 components). Then the onsubmit method knows which is showing (since its the same component that decides which to show) and in theory that is the least amount of code as far as I can tell More then that I am not sure what you are asking for I don't consider myself a seasoned wicketeer though. Matthew -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Upload-Download-FormComponent-tp3310023p3313094.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
Upload/Download FormComponent
Hi, I'd like to wrap up some functionality in a nice reusable component but I'm not sure how to go about it. I have a page which has a panel with 2 links : a file download and a 'delete' link. If a file, specified in my code, is present on my server, this panel permits me to either download it or remove it. On the other hand if the file isn't present, an component is shown permitting the user to upload a file. This file will either be renamed so that the 'download' panel can detect it or prefixed with some text which would achieve the same result. Now this is quite simple to do by switching visibilities etc.. but I need 4 of these components within my form. Thus the need to wrap this behaviour up in order to reduce the amount of redundant code but I'm not sure how to go about it. I would be most grateful for any suggestions from the more seasoned Wicketeers amongst you! Thanks,