BrightSide Workbench Full Report + Source Code
org.turro.zkoss.input.GenericCombobox< V > Class Template Referenceabstract
Inheritance diagram for org.turro.zkoss.input.GenericCombobox< V >:
Collaboration diagram for org.turro.zkoss.input.GenericCombobox< V >:

Public Member Functions

 GenericCombobox ()
 
getObjectValue ()
 
void setObjectValue (V value)
 
boolean isAllowNotInModelValues ()
 
void setAllowNotInModelValues (boolean allowNotInModelValues)
 
void refreshModel ()
 
abstract void populateList (String value, LinkedList list, int nRows)
 
abstract String getTextFromObject (V value)
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 
void render (Comboitem item, Object data, int index) throws Exception
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Parameters
<V>

Definition at line 35 of file GenericCombobox.java.

Constructor & Destructor Documentation

◆ GenericCombobox()

Definition at line 40 of file GenericCombobox.java.

40  {
41  initComponent();
42  }

Member Function Documentation

◆ getObjectValue()

V org.turro.zkoss.input.GenericCombobox< V >.getObjectValue ( )

Reimplemented in org.turro.financials.document.ConceptCombobox, and org.turro.financials.account.AccountCombobox.

Definition at line 44 of file GenericCombobox.java.

44  {
45  Class<V> genericClass = (Class<V>) ((ParameterizedType) getClass()
46  .getGenericSuperclass()).getActualTypeArguments()[0];
47  V value = null;
48  if(Reflections.of(genericClass).canCast(String.class) && allowNotInModelValues) {
49  // if String allow new values
50  value = (V) getText();
51  }
52  Comboitem ci = getSelectedItem();
53  if(ci != null) {
54  value = ci.getValue();
55  }
56  if(value == null && allowNotInModelValues && currentValue != null) {
57  if(getText().equals(getTextFromObject(currentValue))) {
58  value = currentValue;
59  }
60  }
61  return value;
62  }
abstract String getTextFromObject(V value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRelatedEntity()

Object org.turro.zkoss.input.GenericCombobox< V >.getRelatedEntity ( )

Definition at line 124 of file GenericCombobox.java.

124  {
125  return relatedEntity;
126  }

◆ getTextFromObject()

abstract String org.turro.zkoss.input.GenericCombobox< V >.getTextFromObject ( value)
abstract

Reimplemented in org.turro.jpa.input.JpaLabelCombobox< V >.

Here is the caller graph for this function:

◆ isAllowNotInModelValues()

boolean org.turro.zkoss.input.GenericCombobox< V >.isAllowNotInModelValues ( )

Definition at line 74 of file GenericCombobox.java.

74  {
75  return allowNotInModelValues;
76  }

◆ populateList()

abstract void org.turro.zkoss.input.GenericCombobox< V >.populateList ( String  value,
LinkedList  list,
int  nRows 
)
abstract

Reimplemented in org.turro.zkoss.text.CharsetCombobox, org.turro.zkoss.filter.FilterNameCombobox, org.turro.zkoss.contact.IContactCombobox, org.turro.ranking.RankingCombobox, org.turro.matching.MatchingCombobox, org.turro.contacts.CoworkerCombobox, org.turro.contacts.BusinessCombobox, org.turro.agreements.AgreementCombobox, org.turro.publication.zul.www.AuthorCombobox, org.turro.occurrence.OccurrenceCombobox, org.turro.jpa.input.JpaLabelCombobox< V >, org.turro.jpa.input.JpaCombobox< V >, org.turro.entities.EntityRootCombobox, org.turro.entities.EntityCombobox, org.turro.dossier.zul.issue.GroupingCombobox, org.turro.dossier.zul.dossier.WorthGroupingCombobox, org.turro.dossier.zul.dossier.DiscriminatorCombobox, org.turro.dossier.zul.dossier.DescriptorGroupingCombobox, org.turro.dossier.issue.IssueCombobox, org.turro.dossier.dossier.DossierDescriptionCombobox, org.turro.dossier.dossier.DossierCombobox, org.turro.dossier.dossier.CategoryCombobox, org.turro.crm.zul.vendor.VendorCombobox, org.turro.crm.zul.sale.SaleProspectCombobox, org.turro.crm.zul.customer.CustomerCombobox, org.turro.zul.intouch.InTouchNameCombobox, org.turro.zul.groupit.CategoryCombobox, org.turro.zul.fieldit.AutoFillCombobox, org.turro.contacts.zul.contact.ContactGroupingCombobox, org.turro.contacts.util.ContactCombobox, org.turro.contacts.profile.PositionCombobox, org.turro.financials.product.ProductExtendedCombobox, org.turro.financials.product.ProductCombobox, org.turro.financials.product.ProductByContractorCombobox, org.turro.financials.linetype.LineTypeCombobox, org.turro.financials.document.DocumentDefinitionCombobox, org.turro.financials.document.contract.DocumentsByContractCombobox, org.turro.financials.document.ConceptCombobox, org.turro.financials.contract.ProviderCombobox, org.turro.financials.contract.HumanResourceCombobox, org.turro.financials.contract.ContractGroupingCombobox, org.turro.financials.contract.ContractDefinitionCombobox, org.turro.financials.contract.ContractCombobox, org.turro.financials.account.AccountCombobox, org.turro.erp.workorder.WorkOrderCombobox, org.turro.erp.resource.ResourceCombobox, org.turro.erp.resource.ResourceAptitudeCombobox, org.turro.erp.humanres.OwnedAptitudeCombobox, org.turro.erp.humanres.HumanResourceCombobox, org.turro.erp.humanres.HumanResourceAptitudeCombobox, org.turro.erp.aptitude.AptitudeDegreeCombobox, and org.turro.erp.aptitude.AptitudeCombobox.

◆ refreshModel()

void org.turro.zkoss.input.GenericCombobox< V >.refreshModel ( )

Definition at line 82 of file GenericCombobox.java.

82  {
83  Constraint c = getConstraint();
84  setConstraint((Constraint) null);
85  createModel();
86  setConstraint(c);
87  }
Here is the caller graph for this function:

◆ render()

void org.turro.zkoss.input.GenericCombobox< V >.render ( Comboitem  item,
Object  data,
int  index 
) throws Exception

Reimplemented in org.turro.entities.EntityCombobox.

Definition at line 135 of file GenericCombobox.java.

135  {
136  item.setLabel(getTextFromObject((V) data));
137  item.setValue(data);
138  }
Here is the call graph for this function:

◆ setAllowNotInModelValues()

void org.turro.zkoss.input.GenericCombobox< V >.setAllowNotInModelValues ( boolean  allowNotInModelValues)

Definition at line 78 of file GenericCombobox.java.

78  {
79  this.allowNotInModelValues = allowNotInModelValues;
80  }
Here is the caller graph for this function:

◆ setObjectValue()

void org.turro.zkoss.input.GenericCombobox< V >.setObjectValue ( value)

Definition at line 64 of file GenericCombobox.java.

64  {
65  Constraint c = getConstraint();
66  setConstraint((Constraint) null);
67  currentValue = value;
68  if(!selectObjectItem(value)) {
69  setText(value != null ? getTextFromObject(value) : null);
70  }
71  setConstraint(c);
72  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRelatedEntity()

void org.turro.zkoss.input.GenericCombobox< V >.setRelatedEntity ( Object  relatedEntity)

Definition at line 128 of file GenericCombobox.java.

128  {
129  this.relatedEntity = relatedEntity;
130  }

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