com.wewebu.ow.server.app
Class OwFieldManagerComboModel

java.lang.Object
  extended by com.wewebu.ow.server.app.OwFieldManagerComboModel
All Implemented Interfaces:
OwComboModel

public class OwFieldManagerComboModel
extends Object
implements OwComboModel

Combo Box Model used when OwFieldManager needs to display combobox fields.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.0.0.0

Field Summary
 
Fields inherited from interface com.wewebu.ow.server.app.OwComboModel
EMPTY_VALUE
 
Constructor Summary
OwFieldManagerComboModel(Locale locale_p, boolean allowEmptyField_p, String selectedValue_p, String[] displayNames_p, String[] values_p)
          Constructor
 
Method Summary
 OwComboItem[] getAllItems()
          Get all items.
 OwComboItem getItemAt(int position_p)
          Return the OwComboItem object at the specified position.
 OwComboItem getSelectedItem()
          Return the selected OwComboItem object.
 int getSize()
          Get the number of items in this model.
 boolean hasItemOutOfRange()
          Specify if the model has an item that is out of range.
 boolean isSelectedItem(OwComboItem item_p)
          Check if the given item is the selected one.
 void setSelectedItem(OwComboItem item_p)
          Set the given item as selected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwFieldManagerComboModel

public OwFieldManagerComboModel(Locale locale_p,
                                boolean allowEmptyField_p,
                                String selectedValue_p,
                                String[] displayNames_p,
                                String[] values_p)
Constructor

Parameters:
locale_p - - the current Locale object.
allowEmptyField_p - - flag specifying that empty value is allowed.
selectedValue_p - - the selected value.
displayNames_p - - the display names array.
values_p - - the values array.
Method Detail

getAllItems

public OwComboItem[] getAllItems()
Description copied from interface: OwComboModel
Get all items.

Specified by:
getAllItems in interface OwComboModel
Returns:
- an array of OwComboItem objects.

getSelectedItem

public OwComboItem getSelectedItem()
Description copied from interface: OwComboModel
Return the selected OwComboItem object. Can be null.

Specified by:
getSelectedItem in interface OwComboModel

getSize

public int getSize()
Description copied from interface: OwComboModel
Get the number of items in this model.

Specified by:
getSize in interface OwComboModel
Returns:
the number of items.

isSelectedItem

public boolean isSelectedItem(OwComboItem item_p)
Description copied from interface: OwComboModel
Check if the given item is the selected one.

Specified by:
isSelectedItem in interface OwComboModel
Parameters:
item_p - - the given OwComboItem object
Returns:
- true if the given item is selected.

setSelectedItem

public void setSelectedItem(OwComboItem item_p)
Description copied from interface: OwComboModel
Set the given item as selected.

Specified by:
setSelectedItem in interface OwComboModel
Parameters:
item_p - - the OwComboItem

getItemAt

public OwComboItem getItemAt(int position_p)
Description copied from interface: OwComboModel
Return the OwComboItem object at the specified position. Can be null.

Specified by:
getItemAt in interface OwComboModel
Parameters:
position_p - - the position in the list

hasItemOutOfRange

public boolean hasItemOutOfRange()
Description copied from interface: OwComboModel
Specify if the model has an item that is out of range. E.g: if a choice list has 3 values in the ECM, and one of the values is stored as a property for an object, and than the stored value is removed from choice list, that value is no longer in the choice range.

Specified by:
hasItemOutOfRange in interface OwComboModel
Returns:
true if this model has an item out of range.


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.