Hi all!
I extended the /jsp/browse/browse.jsp page to show the properties of my custom model as grid columns when the user is watching the corresponding content type.
So, adding these rules to my web-client-config-custom.xml file:
<config evaluator="node-type" condition="sos:folderTest">
<navigation>
<override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/extension/browse/browseTest.jsp" />
<override from-outcome="browse" to-view-id="/jsp/extension/browse/browseTest.jsp" />
</navigation>
</config>
When the user is watching a folderTest's node, the browseTest.jsp is shown instead of the normal browse.jsp. Everything's fine.
The problem is the "paste all" action!! It doesn't work. I have cut a document belonging to a custom type and it's correctly added to the clipboard. It can be correctly pasted to a normal folder but paste action doesn't work if I try to paste it to my custom folder.
Debugging the code I think the problem is the navigation rule!
17:25:27,156 DEBUG [org.alfresco.web.bean.clipboard.ClipboardBean] Clipboard destination View Id: /jsp/extension/browse/browseTest.jsp
17:25:27,156 DEBUG [org.alfresco.web.bean.clipboard.ClipboardBean] Clipboard Item: workspace://SpacesStore/e928c800-5eba-4f18-a6af-d355700b9a8f not suitable for Move paste to current View Id.
private boolean performClipboardOperation(ClipboardItem item, int action)
throws Throwable
{
boolean success = false;
FacesContext fc = FacesContext.getCurrentInstance();
// test the current JSF view to see if the clipboard item can paste to it
if (logger.isDebugEnabled())
logger.debug("Clipboard destination View Id: " + fc.getViewRoot().getViewId());
if (item.getMode() == ClipboardStatus.CUT)
{
if (item.canMoveToViewId(fc.getViewRoot().getViewId()) == true)
{
success = item.paste(fc, fc.getViewRoot().getViewId(), action);
}
else
{
// we cannot support this view as a Move paste location
if (logger.isDebugEnabled())
logger.debug("Clipboard Item: " + item.getNodeRef() + " not suitable for Move paste to current View Id.");
}
}
And no error is shown! The document remains in the original folder and no action is taken.
How can I fix it?? How can I allow the paste action to my custom JSPs???
I just wanted to add some columns to the grid when the user views some content types. I thought all the actions would continue working!
Thanks!
Sergi