Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class LOV

java.lang.Object
  extended byoracle.dacf.control.swing.LOV
All Implemented Interfaces:
LOVInterface, LOVSelectionListener

public class LOV
extends java.lang.Object
implements LOVInterface, LOVSelectionListener

LOV (List of values dialog) LOV displays a dialog which lets the user to search for a data item from a list of values. The dialog displays a textfield where the end user can enter a value and click the Find button to search for it. The results of the search are displayed in a Grid. The LOV can be configured to 'return values' to the original FORM when the user selects a row and clicks OK. The LOV dialog usage requires the following attributes to be defined. 1) The query used in the LOV 2) setting up 'return items' 3) controlling when the LOV is displayed 4) Setting up the LOV dialog itself Some of the above attributes have to be set on the LOV data producer objects instead of the LOV itself. The LOV data producer object includes the a) oracle.dacf.dataset.LOVRowsetInfo - defines the query to be used by the LOV b) oracle.dacf.dataset.LOVAttrributeInfo - represents the column objects The LOV itself is a DAC control and should be bound to LOVRowSetInfo. The LOVRowsetInfo and LOVAttributeInfo objects respectively play the role of RowsetInfo and AttributeInfo's.

1. Query used in the LOV The query used in the LOV dialog should be defined on the LOVRowsetInfo object. The LOVRowsetInfo unlike RowsetInfo object are not updatable. The query can be specified using the QueryInfoEditor in the design time.

2. Return items The objetive of using an LOV is to let the user search and choose a value and 'return' that value to the original FORM. Each column (in the Grid) displayed by the LOV can be configured to return value to the original FORM. The return item is specified as a data item name which represents the control in the original FORM. Each column (in the query) is represented by LOVAttributeInfo object. The LOVAttributeInfo controls different attributes of the columns, including the 'return item name'. The LOVAttributeInfo's gets generated automatically by the QueryInfoEditor when desgning the LOVRowsetInfo object.

3. Displaying the LOV dialog The LOV's can be displayed by calling the show method in response to a menu or button click. The DAC framework also provides support to display the LOV dialog automatically in response 1) changing focus to a DAC control 2) in response to a validation failure The LOV can be associated with an AttributInfo by setting the 'LOV' property. Whenever focus changes to a control bound to this AttributeInfo the LOV dialog will be displayed. The LOV dialog will also be displayed when the validation fails in a control bound to this AttributeInfo 4. Binding the LOV The LOV dialog is the UI component and should be bound to a LOVRowsetInfo.

Version:
PUBLIC

Constructor Summary
LOV()
          For validation
 
Method Summary
 void executeReturnItems()
          execute return items
 boolean getAutomaticRefresh()
          Return if the LOV has been configured to refresh before displaying
 java.lang.String getDataItemName()
          Return the data item name to which we are currently bound to
 java.lang.Object getRestrictedQuery()
          get Restricted query in use
 java.lang.String getTitle()
          get the dialog title
 void itemSelected(LOVSelectionEvent evt)
           
 void runQuery(boolean bIgnoreQueryCondition)
          run query
 void setAutomaticRefresh(boolean bRefresh)
          determines if the dataset has to be Queried before displaying the LOV
 void setDataItemName(java.lang.String dataItemName)
          specify a InfoBus based dataset.
 void setLocation(int x, int y)
          specify the location for the LOV dialog
 void setRestrictedQuery(java.lang.String dataItemName, java.lang.Object value)
          define a restricted query ( a column value pair)
 void setSize(int w, int h)
          set the size of the LOV dialog
 void setTitle(java.lang.String dialogTitle)
          set the title for the LOV dialog
 void show()
          display the LovDialog
 void validate(java.lang.String columnDataItemName, java.lang.Object value)
          validate the data item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LOV

public LOV()
For validation

Method Detail

show

public void show()
display the LovDialog

Specified by:
show in interface LOVInterface

setSize

public void setSize(int w,
                    int h)
set the size of the LOV dialog

Specified by:
setSize in interface LOVInterface
Parameters:
w - width of the dialog
h - height of the dialog

setLocation

public void setLocation(int x,
                        int y)
specify the location for the LOV dialog

Specified by:
setLocation in interface LOVInterface
Parameters:
x - position
y - posotion

setTitle

public void setTitle(java.lang.String dialogTitle)
set the title for the LOV dialog

Specified by:
setTitle in interface LOVInterface
Parameters:
dialogTitle -

getTitle

public java.lang.String getTitle()
get the dialog title

Specified by:
getTitle in interface LOVInterface
Returns:
dialog title

setDataItemName

public void setDataItemName(java.lang.String dataItemName)
specify a InfoBus based dataset. Specify a data item name

Specified by:
setDataItemName in interface LOVInterface
Parameters:
dataItemName - - data item name to bind to

getDataItemName

public java.lang.String getDataItemName()
Return the data item name to which we are currently bound to

Specified by:
getDataItemName in interface LOVInterface

setAutomaticRefresh

public void setAutomaticRefresh(boolean bRefresh)
determines if the dataset has to be Queried before displaying the LOV

Specified by:
setAutomaticRefresh in interface LOVInterface
Parameters:
bRefresh - boolean value to indicate if refresh should occur or not

getAutomaticRefresh

public boolean getAutomaticRefresh()
Return if the LOV has been configured to refresh before displaying

Specified by:
getAutomaticRefresh in interface LOVInterface

setRestrictedQuery

public void setRestrictedQuery(java.lang.String dataItemName,
                               java.lang.Object value)
define a restricted query ( a column value pair)

Specified by:
setRestrictedQuery in interface LOVInterface
Parameters:
value - used in building the WHERE clause

getRestrictedQuery

public java.lang.Object getRestrictedQuery()
get Restricted query in use

Specified by:
getRestrictedQuery in interface LOVInterface
Returns:
restricted query in use

runQuery

public void runQuery(boolean bIgnoreQueryCondition)
run query

Specified by:
runQuery in interface LOVInterface
Parameters:
bIgnoreQueryCondition - should the WHERE clause be built

executeReturnItems

public void executeReturnItems()
execute return items

Specified by:
executeReturnItems in interface LOVInterface

validate

public void validate(java.lang.String columnDataItemName,
                     java.lang.Object value)
              throws ValidationException
validate the data item. Users may catch the Validation Exception and pop the LovDialog.

Specified by:
validate in interface LOVInterface
Parameters:
value - - value to be validated
columnDataItemName - - name of the column to validate
Throws:
ValidationException

itemSelected

public void itemSelected(LOVSelectionEvent evt)
Specified by:
itemSelected in interface LOVSelectionListener

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.