Forum Stats

  • 3,873,122 Users
  • 2,266,506 Discussions
  • 7,911,426 Comments

Discussions

File explorer in Webcenter portal 12c.

User_QUFP4
User_QUFP4 Member Posts: 176 Red Ribbon
edited Apr 19, 2018 12:02PM in WebCenter Portal

Hello,

I'm trying to achieve a file explorer in Webcenter portal 12c page.

Steps I followed -

1. Created a page parameter - datasource = #{facesContext.externalContext.requestParameterMap['datasource']}

2. Set the Paramters of content presenter : DataSource = #{bindings.datasource} and Contents under a folder.

3. Created a multiple items content presenter template to display the folder and file structure.

I'm passing the Folder GUID in my URL. Here is my code -

<af:iterator rows="6" var="node" varStatus="iterator" value="#{nodes}" id="it0" >

       

        <af:link text="#{node.isFolder   ? node.name : node.propertyMap['dDocTitle'].value}" id="folderlinks"

                          destination = "#{node.isFolder ? '/portal' .concat(WCAppContext.currentWebCenterURI) .concat('?datasource=Webcenterportalcontent%23dCollectionID%3A').concat(node.propertyMap['fFolderGUID'].value)  : node.url.renderUrl}">

          

         </af:link>

      So, my sub-folder URL would be - <URL...>?datasource=Webcenterportalcontent%23dCollectionID%3A<GUID HERE>

In my file explorer, there are many folders which has many sub-folders. I mean to say there are many levels. The file explorer is working fine.

Now, I'm trying to create a "Back" link to go back to the parent folder. When I click on the folder link, everytime this content presenter template code is called and the whole page is being refreshed by which I'm loosing all the data.

Is there anyway -

1. To store all the page parameters (or)

2. To just add the paramters at the end of the URL instead of refreshing the whole page (like pprnav)

3. Example : Folder structure : Folder1 > Folder2 > Folder 3>Folder 4

Back link in Folder 4 should go back to Folder 3 in which the URL should be <URL>?datasource=Webcenterportalcontent%23dCollectionID%3A<GUID OF FOLDER2>

Not sure how to get the value of GUID of folder 2 here. Please advise if my approach is wrong or a better way to achive this.

Thanks as always!

Best Answer

  • User_QUFP4
    User_QUFP4 Member Posts: 176 Red Ribbon
    edited Apr 19, 2018 12:02PM Answer ✓

    Thanks a lot for your reply.

    Used content presenter template and got this fixed. Now, Back link is working with no issues.

    Passed all thre Parent IDs in the URL and fetched the parent id from the url each time.

    Thank you !!

Answers

  • User_QUFP4
    User_QUFP4 Member Posts: 176 Red Ribbon
    edited Apr 18, 2018 3:29PM

    Adding to this, I have stored the #{param.datsource} value in a variable -

    <c:set var="paramter_value" value="#{param.datasource}"/>

    But, how to make this paramter_value like an array to store all the paramter values.

    Please advise. Thanks a lot for your help.

  • User_QUFP4
    User_QUFP4 Member Posts: 176 Red Ribbon
    edited Apr 18, 2018 11:51PM

    Also, when I try to see the full URL of the page after adding the paramters - using #{WCAppContext.currentWebcenterURI}

    Getting the URL without the paramters at any level -

    like : /portal_name/page_name.

    Thoughts?

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Apr 19, 2018 1:23AM

    We have OOTB file explorer feature in WCP. Can you try Content Manager taskflow from Resource Catalogs? Let me know if you need more details.

    Kind Regards,

    DM

  • User_QUFP4
    User_QUFP4 Member Posts: 176 Red Ribbon
    edited Apr 19, 2018 12:02PM Answer ✓

    Thanks a lot for your reply.

    Used content presenter template and got this fixed. Now, Back link is working with no issues.

    Passed all thre Parent IDs in the URL and fetched the parent id from the url each time.

    Thank you !!

This discussion has been closed.