As I see, Mr. Florent Guillaume has created new jira issue
for Note document preview. Considering this I recommend to
take attention with previewing of attached files to Note
document. It does not work (click on the preview link of the
attached file above the iframe with rest preview).
I think the problem starts with class NotePreviewAdapter.
The adapter ignores feature of attached files. May be it is
good to replace getAdapter method it with
public HtmlPreviewAdapter getAdapter(DocumentModel doc) {
ConverterBasedHtmlPreviewAdapter adapter = new
ConverterBasedHtmlPreviewAdapter();
adapter.setAdaptedDocument(doc);
BlobHolder bh = doc.getAdapter(BlobHolder.class);
return adapter;
}
In this case Note can preview either its content (string)
and attached files (see schema type files)
Unfortunately, it still a small problem with method handle
of org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet. As
you can see it uses
String xpath = (String)
req.getAttributes().get("fieldPath");
attribute from the request, but after its use this attribute
doesn't returns to "default" state. This cause a strange
behavior when user has removed all attached files to the
document and goes back to Preview Tab.
To restore correct preview (of note:note) first user have to
select some other tab and after that goes back to Preview
tab. This a bug.
Have a nice work,
George
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/