|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dacf.control.swing.LOV
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.
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 |
public LOV()
Method Detail |
public void show()
show
in interface LOVInterface
public void setSize(int w, int h)
setSize
in interface LOVInterface
w
- width of the dialogh
- height of the dialogpublic void setLocation(int x, int y)
setLocation
in interface LOVInterface
x
- positiony
- posotionpublic void setTitle(java.lang.String dialogTitle)
setTitle
in interface LOVInterface
dialogTitle
- public java.lang.String getTitle()
getTitle
in interface LOVInterface
public void setDataItemName(java.lang.String dataItemName)
setDataItemName
in interface LOVInterface
dataItemName
- - data item name to bind topublic java.lang.String getDataItemName()
getDataItemName
in interface LOVInterface
public void setAutomaticRefresh(boolean bRefresh)
setAutomaticRefresh
in interface LOVInterface
bRefresh
- boolean value to indicate if refresh should occur
or notpublic boolean getAutomaticRefresh()
getAutomaticRefresh
in interface LOVInterface
public void setRestrictedQuery(java.lang.String dataItemName, java.lang.Object value)
setRestrictedQuery
in interface LOVInterface
value
- used in building the WHERE clausepublic java.lang.Object getRestrictedQuery()
getRestrictedQuery
in interface LOVInterface
public void runQuery(boolean bIgnoreQueryCondition)
runQuery
in interface LOVInterface
bIgnoreQueryCondition
- should the WHERE clause be builtpublic void executeReturnItems()
executeReturnItems
in interface LOVInterface
public void validate(java.lang.String columnDataItemName, java.lang.Object value) throws ValidationException
validate
in interface LOVInterface
value
- - value to be validatedcolumnDataItemName
- - name of the column to validate
ValidationException
public void itemSelected(LOVSelectionEvent evt)
itemSelected
in interface LOVSelectionListener
|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2003, Oracle. All rights reserved.