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

Public Member Functions

Campaign getCampaign ()
 
void setCampaign (Campaign campaign)
 
void addCustomers ()
 
void refresh ()
 
void afterCompose ()
 
- 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 clearColumns ()
 
void clearRows ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Detailed Description

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

Definition at line 58 of file CampaignProspectsGrid.java.

Member Function Documentation

◆ addCustomers()

void org.turro.crm.zul.sale.CampaignProspectsGrid.addCustomers ( )

Definition at line 71 of file CampaignProspectsGrid.java.

71  {
72  final GenericFilterListbox<Customer> customers = new GenericFilterListbox<>(
73  new CustomerFilter(), new CustomerFilterGrid(), new CustomerListbox());
74 
75  customers.show(I_.get("Customers"), "800px", "600px", new Command() {
76  @Override
77  public Object execute(Context context) {
78  if(customers != null) {
79  for(Customer customer : customers.getObjectValues()) {
80  SaleProspect sp = campaign.customerExists(customer);
81  if(sp == null) {
82  sp = new SaleProspect();
83  sp.setCampaign(campaign);
84  sp.setCustomer(customer);
85  sp.setType(ProspectType.OPPORTUNITY);
86  sp.setStage(ProspectStage.STARTED);
87  campaign.getSaleProspects().add(sp);
88  }
89  sp.setProspectDate(campaign.getCampaignDate());
90  sp.setClosingDate(campaign.getClosingDate());
91  sp.setDescription(campaign.getDescription());
92  sp.setIAttendees(new TargetFinder(sp.getCustomer().getIContact()).find(campaign.getTargetArray()));
93  if(campaign.getCampaignVendors().isEmpty()) {
94  for(CustomerOwner co : customer.getOwnedBy()) {
95  sp.addCustomerOwner(co);
96  }
97  } else {
98  for(CampaignVendor cv : campaign.getCampaignVendors()) {
99  if(!cv.isEmpty()) {
100  sp.addCampaignVendor(cv);
101  }
102  }
103  }
104  }
105  refresh();
106  }
107  return null;
108  }
109  });
110  }
SaleProspect customerExists(Customer customer)
Definition: Campaign.java:149
Set< CampaignVendor > getCampaignVendors()
Definition: Campaign.java:106
Set< SaleProspect > getSaleProspects()
Definition: Campaign.java:114
Here is the call graph for this function:

◆ afterCompose()

void org.turro.crm.zul.sale.CampaignProspectsGrid.afterCompose ( )

Definition at line 176 of file CampaignProspectsGrid.java.

176  {
177  addColumns();
178  addRows();
179  }

◆ getCampaign()

Campaign org.turro.crm.zul.sale.CampaignProspectsGrid.getCampaign ( )

Definition at line 63 of file CampaignProspectsGrid.java.

63  {
64  return campaign;
65  }

◆ refresh()

void org.turro.crm.zul.sale.CampaignProspectsGrid.refresh ( )

Definition at line 171 of file CampaignProspectsGrid.java.

171  {
172  addRows();
173  }
Here is the caller graph for this function:

◆ setCampaign()

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

Definition at line 67 of file CampaignProspectsGrid.java.

67  {
68  this.campaign = campaign;
69  }

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