cancel
Showing results for 
Search instead for 
Did you mean: 

A simple TreeView-EFile plugin question

7joeblack8
Champ in-the-making
Champ in-the-making
Hi there,


let we assume we've got a space under main repository called "Test".

Under this test i put another space called "Main Folder" and then in this space some images as usual, but linked with the Main Folder with a Virtual Folder join.

Everything works like a charm, but in the treeview of the EFile Plugin rendering, the root is the "Test".

I would like to see my Main Folder with exploded the virtual folder.

Can anybody tell me wich is the right config coordinate?
I tried in the lowest part of the bootstrap to change Record Class or DefaultClass values but nothing.

Honestly i got the wanted result changing the DefaultClass with the type of the Main Folder, but always occurs an error.

thanks in advance!
14 REPLIES 14

deko
Star Contributor
Star Contributor
Hi 7joeblack8,

I dont get the full use case from your description. How do you link the images with a virtual folder join? Are you browsing to the efile plugin manually and are you using a fix physical root folder or are you searching for and opening objects in this plugin via a owmimetable jump and you are just displaying vitual structures?

If I got it right you should go the following way: For the efile plugin you can define a startupfolder. If you define not a physical path there, but you are using a virtual folder tempate (vf=template), you should be able to build up what you need, by using the correct root folder in the template already.

7joeblack8
Champ in-the-making
Champ in-the-making
i'll explain better: i'm using the ol dossiertemplate.xml of the HR example (from the previous OWD release..).
So the folder structure is explained in that template, and in the right place of the bootstrap obviously.

I make a folder search request, in the Search plugin, then in the resulting row i have the hyperlink to the right phisycal folder .

Onclick Alfresco WorkDesk automatically opens the EFile Plugin, and my aim is to have a treeview with that folder as root and the virtual folders opened.

Startup folder is not defined, and even if i try to give the starting space is useless as expected (tryed  <StartupFolder>vf=dossiertemplate.xml</StartupFolder> ).
You're saying that i have to define is in my template?

I don't get where is defined…

deko
Star Contributor
Star Contributor
You can define a (semi) virtual template, which has its own physical root node and virtual subnodes and you could define this template as startup folder of your efile plugin. This is what I wanted to make clear first.

In your case, you are using the object class of the resulting search hit (defined in owmimetable.xml) to jump to a configured efile plugin. For a dossier the format was defined like that:

<!– Default mimetype for a specific ow_folder –>
  <mime optionid="" type="ow_folder/FSmiley Surprisedwd:dossier">
    <icon>briefcase2.png</icon>
    <openicon>openbriefcase2.png</openicon>
    <!– <eventhandler type="id">com.wewebu.ow.Record.Doc</eventhandler> –>
    <eventhandler openrecord="false" type="id">com.wewebu.ow.Dossiers.Doc</eventhandler>
  </mime>


The above example from owmimetable.xml defines the icon for a folder from type FSmiley Surprisedwd:dossier and defines which plugin (defined by plugin ID) shall be used to open that folder in the eventhandler node. Please ensure that in your case openrecord is set to false, this will cause your expected behavior.

7joeblack8
Champ in-the-making
Champ in-the-making
thanks for explanation, really clear.
Anyways i wen to owmimetable.xml and i saw the openrecord is always set to true.

i tried to put something like:
<javascript><!– Default mimetype for a specific ow_folder ..ow_folder/OwFileSystemDirectory –>"
<mime optionid="" type="ow_folder/DEMO:testfolder"> <–if i put "F:" it break down…"
  <icon>folder.png</icon>"
  <openicon>folder_open.png</openicon>"
  <!– <eventhandler type="id">com.wewebu.ow.Record.Doc</eventhandler> –>"
   <eventhandler type="class" openrecord="true">com.wewebu.ow.server.plug.owrecord.OwRecordDocument</eventhandler>"
</mime>" </javascript>


but nothing happens…on treeview the folder container of the folder wich has to be the root is still there…

I got my result only if i set the bootstrap as this:

<javascript><RecordClasses optionid="">
       <!–RecordClassName>cmis:folder</RecordClassName–>
       <RecordClassName>FSmiley Very HappyEMO:testfolder</RecordClassName> 
   </RecordClasses> </javascript>

but….here's the exception…:

Error: Invalid virtual folder!
Error Source: OECM

java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.wewebu.ow.server.ui.OwAppContext.handleRequest(OwAppContext.java:1129)
   at com.wewebu.ow.server.app.OwMainAppContext.handleRequest(OwMainAppContext.java:655)
   at com.wewebu.ow.server.ui.OwWebApplication.handleRequest(OwWebApplication.java:358)
   at org.apache.jsp.default41_jsp._jspService(default41_jsp.java:71)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
   at com.wewebu.ow.server.servlets.OwServletFilter.doFilter(OwServletFilter.java:57)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
   at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
   at java.lang.Thread.run(Unknown Source)
Caused by: com.wewebu.ow.server.exceptions.OwInvalidOperationException: Invalid virtual folder!
   at com.wewebu.ow.server.ecm.OwStandardSemiVirtualFolderAdapter.getVirtualFolder(OwStandardSemiVirtualFolderAdapter.java:165)
   at com.wewebu.ow.server.ecm.OwStandardSemiVirtualFolderAdapter.getChildren(OwStandardSemiVirtualFolderAdapter.java:71)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISSemiVirtualFolderObject.getChilds(OwCMISSemiVirtualFolderObject.java:188)
   at com.wewebu.ow.server.dmsdialogs.views.OwObjectTreeView.createChildObjects(OwObjectTreeView.java:76)
   at com.wewebu.ow.server.ui.OwTreeView$OwTreeViewNode.createChilds(OwTreeView.java:287)
   at com.wewebu.ow.server.ui.OwTreeView$OwTreeViewNode.toggleExpand(OwTreeView.java:263)
   at com.wewebu.ow.server.ui.OwTreeView.navigate(OwTreeView.java:714)
   at com.wewebu.ow.server.dmsdialogs.views.OwObjectTreeViewEXTJS.navigate(OwObjectTreeViewEXTJS.java:834)
   at com.wewebu.ow.server.plug.owrecord.OwRecordDocument.openFolder(OwRecordDocument.java:426)
   at com.wewebu.ow.server.plug.owrecord.OwRecordDocument.onDispatch(OwRecordDocument.java:472)
   at com.wewebu.ow.server.app.OwMasterDocument.dispatch(OwMasterDocument.java:174)
   at com.wewebu.ow.server.app.OwMimeManager.delegateToMasterPlugin(OwMimeManager.java:1085)
   at com.wewebu.ow.server.app.OwMimeManager.onPluginEventHandler(OwMimeManager.java:1045)
   … 30 more
Caused by: java.lang.UnsupportedOperationException
   at java.util.Collections$UnmodifiableCollection.addAll(Unknown Source)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractTransientObject.addFilter(OwCMISAbstractTransientObject.java:117)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISBulkTransientObject.fetchObject(OwCMISBulkTransientObject.java:57)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISBulkTransientObject.retrieveProperties(OwCMISBulkTransientObject.java:49)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAlfrescoBulkTransientObject.secureAspects(OwCMISAlfrescoBulkTransientObject.java:41)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoObjectClass.getAspects(OwCMISAbstractAlfrescoObjectClass.java:57)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoObjectClass.getAspectsClasses(OwCMISAbstractAlfrescoObjectClass.java:78)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoClass.getAspectsNativePropertyClasses(OwCMISAbstractAlfrescoClass.java:164)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoClass.getNativePropertyClasses(OwCMISAbstractAlfrescoClass.java:309)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractNativeObject.getProperties(OwCMISAbstractNativeObject.java:108)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISSemiVirtualFolderObject.getProperties(OwCMISSemiVirtualFolderObject.java:376)
   at com.wewebu.ow.server.ecm.OwStandardSemiVirtualFolderAdapter.getVirtualFolder(OwStandardSemiVirtualFolderAdapter.java:141)
   … 42 more

deko
Star Contributor
Star Contributor
Please test once more with openrecord="false" and no change to owbootstrap.xml. Thank you!

7joeblack8
Champ in-the-making
Champ in-the-making
same error…i checked the old owmime file (from old release of OWD) and it worked without any definition there…i don't know if it can help…

in the bootstrap there's a voice called

<javascript><VirtualFoldersContainer></VirtualFoldersContainer></javascript>

i tryied to set it to "/other" without any result…maybe that's the key?

deko
Star Contributor
Star Contributor
In your first comment you wrote:

Everything works like a charm, but in the treeview of the EFile Plugin rendering, the root is the "Test".

Why are you having errors now? You need to revert to this state again, where you do not have any errors and then set openrecord=false in owmimetable and you will have your expected behavior, opening in the correct root folder and the underlying virtual folders.

7joeblack8
Champ in-the-making
Champ in-the-making
well..now i'm the situation that this "true" or "false" makes the root displayed as i wanted but with error invalid or makes the wrong root (wich is parent of the one that i want) and no errors..

7joeblack8
Champ in-the-making
Champ in-the-making
i've spend 2 days on this problem without solution.

I've redone the entire project two times starting from the HR example, applying my own model.

Same old error. If i try to use my custom folder as root, i got an error of Invalid Virtual Folder.

The stacktrace says that the exeption is started when WorkDesk tries to get the semi-virtual folders as childs.
Infact, if i ignore the error and extend manually the tree it works, and if i went back to search and click again to linked folder, it opens my Dossier Plugin without error.

It just can't get the list of virtual folder if is my custom folder. But my template works, i'm quite sure, i checked tons of times.

Is there a bug here?

Deko i can provide my files if it can help!