use of org.alfresco.web.bean.ml.MultilingualManageDialog in project acs-community-packaging by Alfresco.
the class BrowseBean method setupMLContainerContentAction.
/**
* Action event called by all actions that need to setup a <b>Multilingual</b> Content Document context on the
* BrowseBean before an action page/wizard is called. The context will be a Node in
* setDocument() which can be retrieved on the action page from BrowseBean.getDocument().
*/
public void setupMLContainerContentAction(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
NodeRef translation = new NodeRef(Repository.getStoreRef(), id);
// remember the bean from which the action comes
FacesContext fc = FacesContext.getCurrentInstance();
DocumentDetailsDialog docDetails = (DocumentDetailsDialog) FacesHelper.getManagedBean(fc, "DocumentDetailsDialog");
docDetails.setTranslationDocument(new MapNode(translation));
MultilingualManageDialog mmDialog = (MultilingualManageDialog) FacesHelper.getManagedBean(fc, "MultilingualManageDialog");
mmDialog.setTranslationDocument(docDetails.getTranslationDocument());
// set the ml container as the current document
NodeRef mlContainer = getMultilingualContentService().getTranslationContainer(translation);
setupContentAction(mlContainer.getId(), true);
}
Aggregations