One Table, Two Fields one Varchar and the other Document

Note: For documents, XMLPortletFactory uses Liferay Document Library.

 

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

 

         This is how the portlet will look in the page with Liferays Classic theme. 

  

       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 document field, we have to select the "delete" check field, and press submit.

 

      Remember the note at the beginning, documents are stored in the Lifray Document Library, so you are able to access those documents through Control Panel:

 

          Here you have the full XMLPortletFactory xml file.

XMLPFExample10.xml

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

xmlpfexampleJ-portlet-6.0.6.1.war

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