Version : Liferay 6.2

Step 1 :

portletName="<%=PortletKeys.DYNAMIC_DATA_MAPPING %>" 
var="selectFileURL" windowState="<%= 
LiferayWindowState.POP_UP.toString() %>">
    <portlet:param name="struts_action" value='/dynamic_data_mapping/select_document_library' />

Step 2 :

 <aui:form action="" name="fm">
        <div class="input-append">
            <aui:input name="fileId" type="hidden"/>
            <aui:input name="fileName" type="text" readonly="true" label=""/>
            <aui:button name="openFileSelectorButton" value="select"/>

Step 3 :

    <aui:script use="aui-base">'#<portlet:namespace />openFileSelectorButton').on(
                function(event) {
                            dialog: {
                                constrain: true,
                                modal: true
                            id: '<portlet:namespace />selectFileFromDocumentLibrary',
                            title: '<liferay-ui:message arguments="file" key="select-x" />',
                            uri: '<%= selectFileURL.toString() %>'
                        _166_selectDocumentLibrary = function(url, uuid, groupId, fileName, version){
                             document.getElementById("<portlet:namespace/>fileName").value = fileName;
                             document.getElementById("<portlet:namespace/>fileId").value = uuid;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: