at.spardat.xma.mdl.list
Class ListWMClient

java.lang.Object
  extended byat.spardat.xma.mdl.WModel
      extended byat.spardat.xma.mdl.list.ListWM
          extended byat.spardat.xma.mdl.list.ListWMClient
All Implemented Interfaces:
Descriptive, IListWM, IListWMClient, ISelectable, IWModelClient, Synchronization, Transactional

public class ListWMClient
extends ListWM
implements IListWMClient

Client side implementation of ListWM.


Field Summary
 
Fields inherited from class at.spardat.xma.mdl.WModel
S_NULL
 
Fields inherited from interface at.spardat.xma.mdl.list.IListWM
S_MULTI_SELECT, S_NOT_STRICT
 
Constructor Summary
ListWMClient(short id, Page pm, int style)
          Constructs a ListWMClient.
 
Method Summary
 at.spardat.enterprise.fmt.IFmt getFmt()
          Returns the associated Formatter or null if none is associated.
 java.lang.String getFormattedString()
          Provides a string that results from applying the formatter to the internally stored representation of the selected entry.
 PageClient getPageModelC()
          Returns the PageClient this WidgetModelC belongs to.
 UIDelegateClient getUIDelegate()
          Returns the attached UIDelegateClient.
 boolean handle(ModelChangeEvent event)
          All events that might change a WidgetModel are executed via this method.
 boolean isDoPrefixSearch()
           
 boolean isEditable()
          Returns true if this model's widget may be modified by the end-user.
 boolean isEnabled()
          Returns true, if this model's widget is enabled.
 boolean isMandatory()
          Returns the MANDATORY-property of the associated formatter.
 boolean isPrefixSearchCaseSensitive()
           
 void setDoPrefixSearch(boolean doPrefixSearch)
          determine if prefix search has to be done on this model
 void setEditable(boolean what)
          Sets the editable-state of this models's widget.
 void setEnabled(boolean what)
          Sets the enabled-state of this model's widget.
 void setFmt(at.spardat.enterprise.fmt.IFmt formatter)
          Sets a new Formatter.
 void setMandatory(boolean what)
          If there is a formatter attached, this method clones the old formatter, changes the MANDATORY-property of the formatter to the provided value, and sets the formatter.
 void setPrefixSearchCaseSensitive(boolean prefixSearchCaseSensitive)
          determine if prefix seach has to be done case sensitive or not
 
Methods inherited from class at.spardat.xma.mdl.list.ListWM
add, add, add, add, add, add, add, changed, clear, commit, contains, contains, describe, deselect, deselectAll, equalsCS, estimateMemory, externalize, getEntry, getEntry, getSelected, getSelection, getSelectionCount, getStringEntry, indexOf, indexOf, internalize, isMultiSelect, isSelected, isStrict, isUserStrict, randomlyChange, remove, remove, remove, replace, replace, rollback, select, size
 
Methods inherited from class at.spardat.xma.mdl.WModel
cleanUpAfterServerEvent, getId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface at.spardat.xma.mdl.list.IListWM
add, add, add, add, add, add, add, clear, contains, contains, getEntry, getEntry, getStringEntry, indexOf, indexOf, remove, remove, remove, replace, replace, size
 
Methods inherited from interface at.spardat.xma.mdl.ISelectable
deselect, deselectAll, getSelected, getSelection, getSelectionCount, isMultiSelect, isSelected, isStrict, select
 

Constructor Detail

ListWMClient

public ListWMClient(short id,
                    Page pm,
                    int style)
Constructs a ListWMClient. The behaviour can be ajusted with the following styles
Method Detail

getFmt

public at.spardat.enterprise.fmt.IFmt getFmt()
Description copied from interface: IListWMClient
Returns the associated Formatter or null if none is associated.

Specified by:
getFmt in interface IListWMClient
Returns:
the attached formatter

setFmt

public void setFmt(at.spardat.enterprise.fmt.IFmt formatter)
Description copied from interface: IListWMClient
Sets a new Formatter.

Specified by:
setFmt in interface IListWMClient
Parameters:
formatter - to be set. It must be compatible to the type of the entries. For type T_STRING, any formatter may be set. For the other types, the type of the formatter must be compatible with the type specified in the superclass.

getFormattedString

public java.lang.String getFormattedString()
Description copied from interface: IListWMClient
Provides a string that results from applying the formatter to the internally stored representation of the selected entry.

Specified by:
getFormattedString in interface IListWMClient

handle

public boolean handle(ModelChangeEvent event)
Description copied from class: WModel
All events that might change a WidgetModel are executed via this method.

Overrides:
handle in class ListWM

getUIDelegate

public UIDelegateClient getUIDelegate()
Description copied from interface: IWModelClient
Returns the attached UIDelegateClient.

Specified by:
getUIDelegate in interface IWModelClient
Returns:
the UIDelegateClient which never is null.

getPageModelC

public PageClient getPageModelC()
Returns the PageClient this WidgetModelC belongs to.

Returns:
PageClient, never null.

isEditable

public boolean isEditable()
Description copied from interface: IWModelClient
Returns true if this model's widget may be modified by the end-user. Returns false, if the widget may not be edited, but the content of the widget should be readable and receive focus.

Specified by:
isEditable in interface IWModelClient

setEditable

public void setEditable(boolean what)
Description copied from interface: IWModelClient
Sets the editable-state of this models's widget. A widget which is not editable can not be modified by the end user. Unlike the disabled-state, its contents remains readable and still receives focus.

Usually, this method is called on all widget-models of a page to set the whole page to a read-only mode.

If this method is not called, the default is true.

Specified by:
setEditable in interface IWModelClient
Parameters:
what - true if the model's widget should be editable, false otherwise.

isEnabled

public boolean isEnabled()
Description copied from interface: IWModelClient
Returns true, if this model's widget is enabled. Returns false, if it is disabled. A disabled control is displayed in a greyed look and does not receive focus.

Specified by:
isEnabled in interface IWModelClient

setEnabled

public void setEnabled(boolean what)
Description copied from interface: IWModelClient
Sets the enabled-state of this model's widget.

Specified by:
setEnabled in interface IWModelClient
Parameters:
what - the state to set.

isMandatory

public boolean isMandatory()
Description copied from interface: IListWMClient
Returns the MANDATORY-property of the associated formatter. Returns false, if there is no formatter associated.

Specified by:
isMandatory in interface IListWMClient
See Also:
ISimpleWMClient.isMandatory()

setMandatory

public void setMandatory(boolean what)
Description copied from interface: IListWMClient
If there is a formatter attached, this method clones the old formatter, changes the MANDATORY-property of the formatter to the provided value, and sets the formatter. If there is no formatter attached, this method does nothing.

Specified by:
setMandatory in interface IListWMClient
See Also:
ISimpleWMClient.setMandatory(boolean)

isPrefixSearchCaseSensitive

public boolean isPrefixSearchCaseSensitive()
Specified by:
isPrefixSearchCaseSensitive in interface IListWMClient
Returns:
if prefix search will be done case sensitive
Since:
1.7.3

setPrefixSearchCaseSensitive

public void setPrefixSearchCaseSensitive(boolean prefixSearchCaseSensitive)
determine if prefix seach has to be done case sensitive or not

Specified by:
setPrefixSearchCaseSensitive in interface IListWMClient
Parameters:
prefixSearchCaseSensitive -
Since:
1.7.3

isDoPrefixSearch

public boolean isDoPrefixSearch()
Specified by:
isDoPrefixSearch in interface IListWMClient
Returns:
if prefix search will be done on this list model
Since:
1.8.1

setDoPrefixSearch

public void setDoPrefixSearch(boolean doPrefixSearch)
determine if prefix search has to be done on this model

Specified by:
setDoPrefixSearch in interface IListWMClient
Since:
1.8.1