org.openswing.swing.lookup.client
Class LookupServerDataLocator

java.lang.Object
  extended byorg.openswing.swing.tree.client.TreeDataLocator
      extended byorg.openswing.swing.lookup.client.LookupDataLocator
          extended byorg.openswing.swing.lookup.client.LookupServerDataLocator

public class LookupServerDataLocator
extends LookupDataLocator

Title: OpenSwing Framework

Description: Lookup Data Source that send requests to server side when validating code and when opening lookup grid frame.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it


Constructor Summary
LookupServerDataLocator()
           
 
Method Summary
 java.lang.String getGridMethodName()
           
 TreeDataLocator getTreeDataLocator()
           
 Response getTreeModel(javax.swing.JTree tree)
          Method called by the TreePanel to fill the tree.
 java.lang.String getValidationMethodName()
           
 Response loadData(int action, int startIndex, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType)
          Method called by lookup controller when user clicks on lookup button.
 void setGridMethodName(java.lang.String gridMethodName)
          Set the method called on server side to fetching rows to fill in the lookup grid.
 void setTreeDataLocator(TreeDataLocator treeDataLocator)
          Set the tree data locator.
 void setValidationMethodName(java.lang.String validationMethodName)
          Set the method called on server side.
 Response validateCode(java.lang.String code)
          Method called by lookup controller when validating code.
 
Methods inherited from class org.openswing.swing.lookup.client.LookupDataLocator
getLookupFrameParams, getLookupValidationParameters, setLookupFrameParams, setLookupValidationParameters
 
Methods inherited from class org.openswing.swing.tree.client.TreeDataLocator
getNodeNameAttribute, getTreeNodeParams, loadDataCompleted, setNodeNameAttribute, setTreeNodeParams
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupServerDataLocator

public LookupServerDataLocator()
Method Detail

validateCode

public Response validateCode(java.lang.String code)
Method called by lookup controller when validating code.

Specified by:
validateCode in class LookupDataLocator
Parameters:
code - code to validate
Returns:
code validation response: VOListResponse if code validation has success, ErrorResponse otherwise

getValidationMethodName

public final java.lang.String getValidationMethodName()
Returns:
method called on server side

setValidationMethodName

public final void setValidationMethodName(java.lang.String validationMethodName)
Set the method called on server side.


getGridMethodName

public java.lang.String getGridMethodName()
Returns:
method called on server side to fetching rows to fill in the lookup grid

setGridMethodName

public void setGridMethodName(java.lang.String gridMethodName)
Set the method called on server side to fetching rows to fill in the lookup grid.

Parameters:
gridMethodName - method called on server side to fetching rows to fill in the lookup grid

loadData

public Response loadData(int action,
                         int startIndex,
                         java.util.Map filteredColumns,
                         java.util.ArrayList currentSortedColumns,
                         java.util.ArrayList currentSortedVersusColumns,
                         java.lang.Class valueObjectType)
Method called by lookup controller when user clicks on lookup button.

Specified by:
loadData in class LookupDataLocator
Parameters:
action - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
startIndex - current index row on grid to use to start fetching data
filteredColumns - filtered columns
currentSortedColumns - sorted columns
currentSortedVersusColumns - ordering versus of sorted columns
valueObjectType - type of value object associated to the lookup grid
Returns:
list of value objects to fill in the lookup grid: VOListResponse if data fetching has success, ErrorResponse otherwise

getTreeModel

public final Response getTreeModel(javax.swing.JTree tree)
Method called by the TreePanel to fill the tree.

Specified by:
getTreeModel in class TreeDataLocator
Returns:
tree model

getTreeDataLocator

public final TreeDataLocator getTreeDataLocator()
Returns:
tree data locator

setTreeDataLocator

public final void setTreeDataLocator(TreeDataLocator treeDataLocator)
Set the tree data locator.

Parameters:
treeDataLocator - tree data locator