One Table, Two Fields one Varchar and the other Image 

Note: For images, XMLPortletFactory uses Liferay Image Gallery.


         For our client "goodclient" we are doing a portlet project called "xmlpfexampleI" where we want to create a users table maintenance, where there are two fields one is the "userName" and the other is the "userPhoto". 


         This is how the portlet will look in the page with Liferays Classic theme. We used the 30% column in this case,  because looks better.


       When adding a new record to the table, a upload widget will appear, to help in the task. This is how it looks.


        This is how the portlet will look in user edit mode. Observe that if we want to delete the image field, we have to select the "delete" check field, and press submit.


      Remember the note at the beginning, images are stored in the Lifray Image Gallery, so you are able to access those images through Control Panel:


          Here you have the full XMLPortletFactory xml file.


          And here you have the portlet war generated. (for liferay 6.0.6)


          If you want to use this example you can follow instructions here DOCUMENTATION