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

Public Member Functions

 CampaignVendorGrid ()
 
void setCampaign (Campaign campaign)
 
- 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, CampaignVendor value)
 
boolean deleteRow (Row row)
 
boolean isValid (CampaignVendor 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 39 of file CampaignVendorGrid.java.

Constructor & Destructor Documentation

◆ CampaignVendorGrid()

org.turro.crm.zul.sale.CampaignVendorGrid.CampaignVendorGrid ( )

Definition at line 43 of file CampaignVendorGrid.java.

43  {
44  addColumns();
45  }

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.crm.zul.sale.CampaignVendorGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 76 of file CampaignVendorGrid.java.

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

◆ deleteRow()

boolean org.turro.crm.zul.sale.CampaignVendorGrid.deleteRow ( Row  row)
protected

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

Definition at line 63 of file CampaignVendorGrid.java.

63  {
64  CampaignVendor t = (CampaignVendor) row.getValue();
65  EntityCollections.entities(campaign.getCampaignVendors()).remove(t);
66  t.setCampaign(null);
67  return true;
68  }
Set< CampaignVendor > getCampaignVendors()
Definition: Campaign.java:106
Here is the call graph for this function:

◆ formatCell()

String org.turro.crm.zul.sale.CampaignVendorGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 101 of file CampaignVendorGrid.java.

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

◆ initiateRow()

void org.turro.crm.zul.sale.CampaignVendorGrid.initiateRow ( Row  row,
CampaignVendor  value 
)
protected

Definition at line 53 of file CampaignVendorGrid.java.

53  {
54  if(value == null) {
55  value = new CampaignVendor();
56  value.setCampaign(campaign);
57  campaign.getCampaignVendors().add(value);
58  }
59  row.setValue(value);
60  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.crm.zul.sale.CampaignVendorGrid.isValid ( CampaignVendor  v)
protected

Definition at line 71 of file CampaignVendorGrid.java.

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

◆ setCampaign()

void org.turro.crm.zul.sale.CampaignVendorGrid.setCampaign ( Campaign  campaign)

Definition at line 47 of file CampaignVendorGrid.java.

47  {
48  this.campaign = campaign;
50  }
void setCollection(Collection< V > collection)
Here is the call graph for this function:

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