View Javadoc

1   /*
2    * DataSourceSelectAction.java
3    * Created on 29 Март 2006 г., 0:12
4    */
5   
6   package org.weda.store.actions;
7   
8   import org.weda.action.ActionContainer;
9   import org.weda.action.ActionState;
10  import org.weda.store.ObjectSource;
11  import org.weda.store.ObjectSource.Mode;
12  import org.weda.action.impl.AbstractAction;
13  import org.weda.action.impl.ActionStateImpl;
14  
15  /**
16   *
17   * @author Mikhail Titov
18   */
19  public class ObjectSourceSelectAction extends AbstractAction {
20      
21      public ActionState getActionState(ActionContainer targetObject) 
22          throws Exception 
23      {
24          ObjectSource ds = (ObjectSource)targetObject;
25          return new ActionStateImpl(
26                  ds.getMode()==Mode.SELECT, ds.hasSelectedRows());
27      }
28  
29      public Object execute(ActionContainer targetObject) throws Exception {
30          return null;
31      }
32      
33  }