BrightSide Workbench Full Report + Source Code
org.turro.crm.zul.customer.CustomerOwnersGrid Class Reference
Inheritance diagram for org.turro.crm.zul.customer.CustomerOwnersGrid:
Collaboration diagram for org.turro.crm.zul.customer.CustomerOwnersGrid:

Public Member Functions

 CustomerOwnersGrid ()
 
void setCustomer (Customer customer)
 
- Public Member Functions inherited from org.turro.zkoss.grid.CollectionGrid< V >
 CollectionGrid ()
 
 CollectionGrid (Collection< V > collection)
 
Collection< V > getCollection ()
 
void setCollection (Collection< V > collection)
 
void updateCollection (Collection< V > collection)
 
Row getDependingRow ()
 
void setDependingRow (Row dependingRow)
 
void clearTable ()
 
void deleteSelectedRow (Row row)
 
void afterCompose ()
 
- Public Member Functions inherited from org.turro.zkoss.grid.EditableGrid< V >
 EditableGrid ()
 
boolean isAllowDeletions ()
 
void setAllowDeletions (boolean allowDeletions)
 
boolean isAllowInsertions ()
 
void setAllowInsertions (boolean allowInsertions)
 
EditableCell getCurrentCell ()
 
Row getLastRow ()
 
boolean isReadOnly ()
 
void setReadOnly (boolean readOnly)
 
boolean isSelectInput ()
 
void setSelectInput (boolean selectInput)
 
boolean isShowZeros ()
 
void setShowZeros (boolean showZeros)
 
void clearFoot ()
 
void clearRows ()
 
void clearValidRows ()
 
void clearColumns ()
 
List< V > getValues ()
 
List< V > getAllValues ()
 
EventListener getEditListener ()
 
EventListener getNextListener ()
 
EventListener getKeyListener ()
 
EventListener getBlurListener ()
 
EventListener getCancelListener ()
 
void processEdition (EditableCell editableCell)
 
void cancelEdition ()
 
HtmlBasedComponent getEditor (EditableCell editableCell)
 
Row appendValue ()
 
Row addNewRow ()
 
void insertInSelectedRow (Row row)
 
Column getEditableColumn (int cellIndex)
 
void updateRow (Row row)
 
void updateRows ()
 
EditableColumn addColumn (String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
 
EditableColumn addColumn (String label, String javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly) throws ClassNotFoundException
 
EditableColumn addColumn (String image, String tooltip, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
 
EditableColumn addColumn (String image, String tooltip, String javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly) throws ClassNotFoundException
 
- Public Member Functions inherited from org.turro.zkoss.grid.PagingGrid
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void refine ()
 
boolean isDefaultBehavior ()
 
void setDefaultBehavior (boolean defaultBehavior)
 
String getRefineValue ()
 
void setRefineValue (String value)
 
int getMaxResults ()
 
void setMaxResults (int maxResults)
 
String getPagingMold ()
 
void setPagingMold (String pagingMold)
 
int getRowCount ()
 
void setRowCount (int rows)
 
void setHeadersVisible (boolean value)
 
boolean isHeadersVisible ()
 
String getVarColumns ()
 
void setVarColumns (String varColumns)
 
Collection< String > getVarColumnsList (String defaultCols)
 
void addDetailColumn ()
 
void addDetailColumn (HtmlBasedComponent caption)
 
void openDetails ()
 
boolean isEmpty ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Protected Member Functions

void initiateRow (Row row, CustomerOwner value)
 
boolean deleteRow (Row row)
 
boolean isValid (CustomerOwner v)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
String formatCell (EditableCell editableCell, Object value)
 
- Protected Member Functions inherited from org.turro.zkoss.grid.CollectionGrid< V >
void cellChanged (EditableCell editableCell, Object value)
 
void rowChanged (Row row)
 
boolean filterValue (V v)
 
- Protected Member Functions inherited from org.turro.zkoss.grid.EditableGrid< V >
Object getCellValue (EditableCell editableCell)
 
Object getEditorValue (EditableCell editableCell)
 
void setCellValue (EditableCell editableCell, Object value)
 
HtmlBasedComponent createRenderer (EditableCell editableCell)
 
boolean isCellValid (EditableCell editableCell, Object value)
 
boolean canDeleteRow (Row row)
 
boolean canEditRow (Row row)
 
abstract void initiateRow (Row row, V value)
 
abstract boolean isValid (V v)
 

Additional Inherited Members

- Public Attributes inherited from org.turro.zkoss.grid.EditableGrid< V >
EditEventListener editListener
 
NextEventListener nextListener
 
KeyEventListener keyListener
 
CancelEventListener cancelListener
 
BlurEventListener blurListener
 
boolean allowInsertions
 
- Protected Attributes inherited from org.turro.zkoss.grid.CollectionGrid< V >
Row dependingRow
 
- Protected Attributes inherited from org.turro.zkoss.grid.EditableGrid< V >
EditableCell currentCell
 
String ctrlKeys
 
Row lastRow
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file CustomerOwnersGrid.java.

Constructor & Destructor Documentation

◆ CustomerOwnersGrid()

org.turro.crm.zul.customer.CustomerOwnersGrid.CustomerOwnersGrid ( )

Definition at line 40 of file CustomerOwnersGrid.java.

40  {
41  addColumns();
42  }

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.crm.zul.customer.CustomerOwnersGrid.createEditor ( EditableCell  editableCell)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 74 of file CustomerOwnersGrid.java.

74  {
75  if(editableCell.getCellIndex() == 0) {
76  Object value = getCellValue(editableCell);
77  VendorCombobox cdc = new VendorCombobox();
78  if(value != null) cdc.setObjectValue((Vendor) value);
79  return cdc;
80  } else if(editableCell.getCellIndex() == 1) {
81  Object value = getCellValue(editableCell);
82  FormulaListbox cdc = new FormulaListbox();
83  cdc.setFormulaType(FormulaType.FORMULA_COMISSION);
84  cdc.setMold("select");
85  if(value != null) cdc.setObjectValue((Formula) value);
86  return cdc;
87  } if(editableCell.getCellIndex() == 2) {
88  Object value = getCellValue(editableCell);
89  FormulaListbox cdc = new FormulaListbox();
90  cdc.setFormulaType(FormulaType.FORMULA_ALERT);
91  cdc.setMold("select");
92  if(value != null) cdc.setObjectValue((Formula) value);
93  return cdc;
94  }
95  return super.createEditor(editableCell);
96  }
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.crm.zul.customer.CustomerOwnersGrid.deleteRow ( Row  row)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 61 of file CustomerOwnersGrid.java.

61  {
62  CustomerOwner t = (CustomerOwner) row.getValue();
63  EntityCollections.entities(customer.getOwnedBy()).remove(t);
64  t.setCustomer(null);
65  return true;
66  }
void setCustomer(Customer customer)
Set< CustomerOwner > getOwnedBy()
Definition: Customer.java:88
Here is the call graph for this function:

◆ formatCell()

String org.turro.crm.zul.customer.CustomerOwnersGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 99 of file CustomerOwnersGrid.java.

99  {
100  if(editableCell.getCellIndex() == 0) {
101  return value != null ? ((Vendor) value).getName() : null;
102  } else if(editableCell.getCellIndex() == 1) {
103  return value != null ? ((Formula) value).getName() : null;
104  } else if(editableCell.getCellIndex() == 2) {
105  return value != null ? ((Formula) value).getName() : null;
106  }
107  return super.formatCell(editableCell, value);
108  }
Here is the call graph for this function:

◆ initiateRow()

void org.turro.crm.zul.customer.CustomerOwnersGrid.initiateRow ( Row  row,
CustomerOwner  value 
)
protected

Definition at line 50 of file CustomerOwnersGrid.java.

50  {
51  if(value == null) {
52  value = new CustomerOwner();
53  value.setOwningDate(new Date());
54  value.setCustomer(customer);
55  customer.getOwnedBy().add(value);
56  }
57  row.setValue(value);
58  }
void setOwningDate(Date owningDate)
Here is the call graph for this function:

◆ isValid()

boolean org.turro.crm.zul.customer.CustomerOwnersGrid.isValid ( CustomerOwner  v)
protected

Definition at line 69 of file CustomerOwnersGrid.java.

69  {
70  return !v.isEmpty();
71  }
Here is the call graph for this function:

◆ setCustomer()

void org.turro.crm.zul.customer.CustomerOwnersGrid.setCustomer ( Customer  customer)

Definition at line 44 of file CustomerOwnersGrid.java.

44  {
45  this.customer = customer;
46  setCollection(customer.getOwnedBy());
47  }
void setCollection(Collection< V > collection)
Here is the call graph for this function:

The documentation for this class was generated from the following file: