use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class CheckinCheckoutDialog method setupWorkflowContentAction.
public void setupWorkflowContentAction(ActionEvent event) {
// do the common processing
setupContentAction(event);
// retrieve the id of the task
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
property.setWorkflowTaskId(params.get("taskId"));
property.setWorkflowAction(true);
if (logger.isDebugEnabled())
logger.debug("Setup for workflow package action for task id: " + property.getWorkflowTaskId());
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class CheckinCheckoutDialog method setupContentAction.
// ------------------------------------------------------------------------------
// Navigation action event handlers
/**
* Action event called by all actions that need to setup a Content Document context on the
* CheckinCheckoutDialog before an action page/wizard is called. The context will be a Node in
* setDocument() which can be retrieved on action pages via getDocument().
*
* @param event ActionEvent
*/
public void setupContentAction(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
if (id != null && id.length() != 0) {
setupContentDocument(id);
} else {
property.setDocument(null);
}
resetState();
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class ManageTaskDialog method removePackageItem.
/**
* Removes an item from the workflow package
*
* @param event The event containing a reference to the item to remove
*/
public void removePackageItem(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String nodeRef = new NodeRef(Repository.getStoreRef(), params.get("id")).toString();
if (this.packageItemsToAdd != null && this.packageItemsToAdd.contains(nodeRef)) {
// remove the item from the added list if it was added in this
// dialog session
this.packageItemsToAdd.remove(nodeRef);
if (LOGGER.isDebugEnabled())
LOGGER.debug("Removed item from the added list: " + nodeRef);
} else {
// add the node to the list of items to remove
if (this.packageItemsToRemove == null) {
this.packageItemsToRemove = new ArrayList<String>(1);
}
this.packageItemsToRemove.add(nodeRef);
if (LOGGER.isDebugEnabled())
LOGGER.debug("Added item to the removed list: " + nodeRef);
}
// reset the rich list so it re-renders
this.packageItemsRichList.setValue(null);
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class WorkflowBean method setupTaskDialog.
// ------------------------------------------------------------------------------
// Navigation handlers
public void setupTaskDialog(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
String type = params.get("type");
// setup the dispatch context with the task we're opening a dialog for
TransientNode node = new TransientNode(QName.createQName(type), id, null);
this.navigationBean.setupDispatchContext(node);
// pass on parameters for the dialog
Application.getDialogManager().setupParameters(event);
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class EditOnlineDialog method handleCifsEditing.
/**
* Action listener for handle cifs online editing action. E.g "edit_doc_online_cifs" action
*
* @param event ActionEvent
*/
public void handleCifsEditing(ActionEvent event) {
handle(event);
Node workingCopyNode = property.getDocument();
if (workingCopyNode != null) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String cifsPath = params.get("cifsPath");
if (cifsPath != null) {
// modify cifsPath for editing working copy
property.setCifsPath(cifsPath.substring(0, cifsPath.lastIndexOf('\\') + 1) + workingCopyNode.getName());
}
FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:close:browse");
}
}
Aggregations