telosys.objects
Class ListView

java.lang.Object
  extended bytelosys.objects.ListView

public class ListView
extends java.lang.Object

Class for list management


Constructor Summary
ListView()
           
 
Method Summary
 boolean doAdd()
          Adds an item in the list
 boolean doClear()
          Clears the list
 boolean doDelete(java.lang.Number iRowIndexToDelete)
          Deletes an item in the list
 boolean doInsert(java.lang.Number iNewRowIndex)
          Inserts an item in the list
 boolean doSelect(java.lang.Number iNewRowIndex)
          Selects an item in the list
 boolean doSort(string sField, string sOrder)
          Sorts the list
 object getActions()
          Returns the actions object
 string getItemName()
          Returns the selected item name
 string getListId()
          Returns the list id
 string getListName()
          Returns the list name
 function getResponseProcessor()
          Returns the response processor (a function)
 object getSelectedRow()
          Returns the selected row of the list
 string getSelectedRowColor()
          Returns the color of the selected row
 number getSelectedRowIndex()
          Returns the index of the selected row
 void highlightRow(object oTR)
          Sets the color of the given row
 void setEventAddRow(object oFunction)
          Sets the event when we add a row
 void setEventClearList(object oFunction)
          Sets the event when we clear the list
 void setEventDeleteRow(object oFunction)
          Sets the event when we delete a row
 void setEventInsertRow(object oFunction)
          Sets the event when we insert a row
 void setEventSelectRow(object oFunction)
          Sets the event when we select a row
 void setEventSortList(object oFunction)
          Sets the event when we sort the list
 void setSelectedRowColor(string sColor)
          Sets the color of the selected row
 void show()
          Shows (alert) the description of the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListView

public ListView()
Method Detail

setSelectedRowColor

public void setSelectedRowColor(string sColor)
Sets the color of the selected row

Parameters:
sColor - the new color

setEventSelectRow

public void setEventSelectRow(object oFunction)
Sets the event when we select a row

Parameters:
oFunction - the function object

setEventInsertRow

public void setEventInsertRow(object oFunction)
Sets the event when we insert a row

Parameters:
oFunction - the function object

setEventAddRow

public void setEventAddRow(object oFunction)
Sets the event when we add a row

Parameters:
oFunction - the function object

setEventDeleteRow

public void setEventDeleteRow(object oFunction)
Sets the event when we delete a row

Parameters:
oFunction - the function object

setEventClearList

public void setEventClearList(object oFunction)
Sets the event when we clear the list

Parameters:
oFunction - the function object

setEventSortList

public void setEventSortList(object oFunction)
Sets the event when we sort the list

Parameters:
oFunction - the function object

getListId

public string getListId()
Returns the list id

Returns:
the list id

getListName

public string getListName()
Returns the list name

Returns:
the list name

getItemName

public string getItemName()
Returns the selected item name

Returns:
the selected item name

getActions

public object getActions()
Returns the actions object

Returns:
the actions object

getResponseProcessor

public function getResponseProcessor()
Returns the response processor (a function)

Returns:
the response processor

getSelectedRow

public object getSelectedRow()
Returns the selected row of the list

Returns:
the selected row

getSelectedRowIndex

public number getSelectedRowIndex()
Returns the index of the selected row

Returns:
the index of the selected row

getSelectedRowColor

public string getSelectedRowColor()
Returns the color of the selected row

Returns:
the color of the selected row

show

public void show()
Shows (alert) the description of the list


highlightRow

public void highlightRow(object oTR)
Sets the color of the given row

Parameters:
oTR - the row object ()

doSelect

public boolean doSelect(java.lang.Number iNewRowIndex)
Selects an item in the list

Parameters:
iNewRowIndex - the index of the new selected row
Returns:
true (OK to continue) | false (KO to continue)

doInsert

public boolean doInsert(java.lang.Number iNewRowIndex)
Inserts an item in the list

Parameters:
iNewRowIndex - the index of the new row
Returns:
true (OK to continue) | false (KO to continue)

doAdd

public boolean doAdd()
Adds an item in the list

Returns:
true (OK to continue) | false (KO to continue)

doDelete

public boolean doDelete(java.lang.Number iRowIndexToDelete)
Deletes an item in the list

Parameters:
iRowIndexToDelete - the index of the row to delete
Returns:
true (OK to continue) | false (KO to continue)

doClear

public boolean doClear()
Clears the list

Returns:
true (OK to continue) | false (KO to continue)

doSort

public boolean doSort(string sField,
                      string sOrder)
Sorts the list

Parameters:
sField - the field
sOrder - the order to sort
Returns:
true (OK to continue) | false (KO to continue)