File attachment

hi all,

can any one give me the steps to file attachment functionality in CAF, i need to do file attachment in CAF, please give me any sample if you have , send me to my anilellendula@gmail.com.

regards,
anil kumar ellendula

  1. Drag & Drop the file input control to the Portlet’s view.

  2. Drag & Drop the ‘file item’ control into the file input and a command button next to the file input.

  3. Fill the action property of the button. Just add a method in your portletBean and use this method here.

  4. Go to the body of your method. There you can handle the fileItem as you need to (for example fileItem.toString() will return the file name+extension; fileItem.getString() will return the content of the file as String etc.)

There are a few questions in this forum around handling of the File on the server side that include working examples. So feel free to search for those threads and download the examples as well.

Regards,
–mark