cancel
Showing results for 
Search instead for 
Did you mean: 

document preview in task edit as a form

leftright
Champ on-the-rise
Champ on-the-rise
Hello!
I would like to have a flash preview of a certain document in share task-edit form(as in document details).
I have a workflow property that contains the nodeRef of this document,
a custom form control would then be used on this property to display flash preview of the document.
What do I have to do to achieve this, or is there a better way to show a preview of a certain
document by its nodeRef in task-edit page?
Thank you for your answers.
5 REPLIES 5

aaditvmajmudar
Confirmed Champ
Confirmed Champ
Document preview is shown by component(presentation webscript) "web-preview" on document details page.

So you can reuse that component on task edit page by including that component in task edit page template instance and template file.

Hope this helps.

thank you for your answer. But if understand correctly in order to work web-preview,
needs a nodeRef in url as a GET parameter. Isn't that a problem.

aaditvmajmudar
Confirmed Champ
Confirmed Champ
Can you append noderef to task edit URL?

No, I don't have any idea how to achieve this, does any body know?
If I noticed correctly web-preview can be called in the following way

http://192.168.111.128:8080/share/page/components/preview/web-preview?nodeRef=workspace://SpacesStor...

when I enter this in browser i get a blank page, but no mistakes. If i call ia remote(or some other way) this url
and htmlid would be set to a property of a certain html element on form, would I see a webpreview in form?
So web preview can be called in a way like websscript if I undesrtand correctly?

aaditvmajmudar
Confirmed Champ
Confirmed Champ
You need to include web preview component in wokflow-details.xml template instance file.

After this render this component in template file worklfow-details.ftl file.

You can take example of document details page template instance file (document-details.xml) and template file (document-details.ftl).

And yes if you are opening task from my tasks dashlet then just modify URL of edit task from my-tasks.js file and append noderef of package node.

After doing this, you will be able to load the preview of component.

Hope this helps.