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 <input type=file> 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,

Reply via email to