BrightSide Workbench Full Report + Source Code
org.turro.publication.zul.www.CategoryListbox Class Reference
Inheritance diagram for org.turro.publication.zul.www.CategoryListbox:
Collaboration diagram for org.turro.publication.zul.www.CategoryListbox:

Public Member Functions

 CategoryListbox ()
 
long getGroupId ()
 
void setGroupId (long groupId)
 
String convertToString (PublicationCategory v)
 
boolean getChecked (PublicationCategory v)
 
void setChecked (PublicationCategory v, boolean checked)
 
- Public Member Functions inherited from org.turro.jpa.input.JpaListbox< V >
 JpaListbox ()
 
 JpaListbox (Dao dao, String query, boolean checkmark, boolean autoSave)
 
boolean isAutoSave ()
 
void setAutoSave (boolean autoSave)
 
Dao getDao ()
 
void setDao (Dao dao)
 
String getQuery ()
 
void setQuery (String query)
 
abstract String convertToString (V v)
 
abstract boolean getChecked (V v)
 
abstract void setChecked (V v, boolean checked)
 
boolean isAllowNull ()
 
void setAllowNull (boolean allowNull)
 
String getNullLabel ()
 
void setNullLabel (String nullLabel)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericListbox< V >
 GenericListbox ()
 
void setDisabled (boolean value)
 
void afterCompose ()
 
void clearItems ()
 
void setObjectValue (V value)
 
void setObjectValues (Collection< V > collection)
 
getObjectValue ()
 
Collection< V > getObjectValues ()
 
Collection< V > getDeselectedObjectValues ()
 
boolean isSelectFirst ()
 
void setSelectFirst (boolean selectFirst)
 
Set getDeselectedItems ()
 
void sort ()
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 

Protected Member Functions

void populateList ()
 
- Protected Member Functions inherited from org.turro.jpa.input.JpaListbox< V >
boolean equals (V value, V obj)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.zkoss.input.GenericListbox< V >
boolean populated = false
 

Detailed Description

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

Definition at line 29 of file www/CategoryListbox.java.

Constructor & Destructor Documentation

◆ CategoryListbox()

org.turro.publication.zul.www.CategoryListbox.CategoryListbox ( )

Definition at line 33 of file www/CategoryListbox.java.

33  {
34  super();
35  setCheckmark(false);
36  setAutoSave(false);
37  setDao(new PublicationPU());
38  setNullLabel("All");
39  }
void setAutoSave(boolean autoSave)
Definition: JpaListbox.java:55
void setNullLabel(String nullLabel)
Here is the call graph for this function:

Member Function Documentation

◆ convertToString()

String org.turro.publication.zul.www.CategoryListbox.convertToString ( PublicationCategory  v)

Definition at line 71 of file www/CategoryListbox.java.

71  {
72  if(v == null) return "";
73  return v.getName();
74  }
Here is the call graph for this function:

◆ getChecked()

boolean org.turro.publication.zul.www.CategoryListbox.getChecked ( PublicationCategory  v)

Definition at line 77 of file www/CategoryListbox.java.

77  {
78  return true;
79  }

◆ getGroupId()

long org.turro.publication.zul.www.CategoryListbox.getGroupId ( )

Definition at line 41 of file www/CategoryListbox.java.

41  {
42  return groupId;
43  }

◆ populateList()

void org.turro.publication.zul.www.CategoryListbox.populateList ( )
protected

Reimplemented from org.turro.jpa.input.JpaListbox< V >.

Definition at line 50 of file www/CategoryListbox.java.

50  {
51  if(groupId > 0) {
52  setQuery(
53  "select cat from PublicationCategory as cat " +
54  "where publishable = TRUE " +
55  "and exists (" +
56  " select pub from Publication as pub " +
57  " where pub.publicationCategory = cat " +
58  " and pub.publicationGroup.id = " + groupId + " " +
59  ")" +
60  "order by cat.name");
61  } else {
62  setQuery(
63  "select cat from PublicationCategory as cat " +
64  "where publishable = TRUE " +
65  "order by cat.name");
66  }
67  super.populateList();
68  }
void setQuery(String query)
Definition: JpaListbox.java:71
Here is the call graph for this function:

◆ setChecked()

void org.turro.publication.zul.www.CategoryListbox.setChecked ( PublicationCategory  v,
boolean  checked 
)

Definition at line 82 of file www/CategoryListbox.java.

82  {
83  }

◆ setGroupId()

void org.turro.publication.zul.www.CategoryListbox.setGroupId ( long  groupId)

Definition at line 45 of file www/CategoryListbox.java.

45  {
46  this.groupId = groupId;
47  }

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