//package com.onaro.sanscreen.client.view.actions; // //import java.awt.event.*; //import java.util.*; // //import com.onaro.sanscreen.client.view.*; //import com.onaro.util.*; //import com.onaro.util.xml.*; //import com.onaro.util.jfc.*; // ///** // * An actoin switching the main view of a composite view to another view filtered // * by the current selected object. // */ //public class ViewBySelectionAction extends ConfigurableAction { // // /** // * The composite view containin the originating and target views. // */ // private CompositeDirector composite; // // /** // * The name of the view to switch to. // */ // private String targetViewName; // // /** // * Constructs an action that when perfomed, switches the main view of a composite // * director to show the target view filtered by the current selected object. // * // * @param conf a a configuration element having the following attributes:
CompositeView
in which to
// * show the data
// * @throws InvalidConfigException the attributes listed above are missing
// */
// public ViewBySelectionAction(ActionFactory.ActionInitInfo actionInitInfo, ResourceBundle resources,
// ViewDirector targetView) throws InvalidConfigException, IllegalInitException {
// super(actionInitInfo, resources);
//
// this.composite = (CompositeDirector)targetView;
//
// targetViewName = conf.getAttribute("view");
// if (targetViewName == null || targetViewName.length() == 0)
// throw new InvalidConfigException("Mandatory attribute 'view' is missing in '" + conf.getPath());
// }
//
// /**
// * When the action is performed, switch the views.
// *
// * @param e
// */
// public void actionPerformed(ActionEvent e) {
// composite.showBySelectedObject(targetViewName);
// }
//
// public String toString() {
// StringBuilder s = new StringBuilder("SwitchViewBySelectionActoin[");
// s.append("name='").append(getName()).append("', ");
// s.append("targetView='").append(targetViewName).append("', ");
// s.append("display-name='").append(getValue(NAME));
// s.append("']");
// return s.toString();
// }
//}