|
| Object | getEntity (Object value) |
| |
| void | renderTree (ElephantMarker marker, List< Item< Object, Object >> items) |
| |
| void | renderItem (ElephantMarker marker, Object item) |
| |
| String | parseTree (ElephantMarker marker, List< Item< Object, Object >> items) |
| |
| String | parseItem (ElephantMarker marker, Object item) |
| |
| WhereClause | getChildrenClause (String currPath) |
| |
| WhereClause | getLeafClause (String currPath) |
| |
| Object | getId (Object item) |
| |
| Object | getParentId (Object entity) |
| |
| VisualElements | loadVisuals () |
| |
| abstract void | renderTree (ElephantMarker marker, List< Item< E, ID >> items) |
| |
| abstract void | renderItem (ElephantMarker marker, E item) |
| |
| abstract String | parseTree (ElephantMarker marker, List< Item< E, ID >> items) |
| |
| abstract String | parseItem (ElephantMarker marker, E item) |
| |
- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 39 of file GroupsTree.java.
◆ GroupsTree()
| org.turro.www.groupit.GroupsTree.GroupsTree |
( |
IConstructor |
constructor, |
|
|
String |
context, |
|
|
String |
category |
|
) |
| |
Definition at line 43 of file GroupsTree.java.
44 super(
new ContactsPU(),
new ElephantMarker(
constructor));
45 this.category = category;
46 this.context = context;
◆ getChildrenClause()
| WhereClause org.turro.www.groupit.GroupsTree.getChildrenClause |
( |
String |
currPath | ) |
|
|
protected |
Reimplemented from org.turro.jpa.iterator.DaoTree< E, ID >.
Definition at line 96 of file GroupsTree.java.
97 WhereClause wc =
new WhereClause();
98 wc.addClause(
"select g from GroupIt g");
99 wc.addClause(
"where g.category = :category");
100 wc.addNamedValue(
"category", category);
101 wc.addClause(
"and g.publishable = TRUE");
102 if(Strings.isBlank(currPath)) {
103 wc.addClause(
"and g.parent is null");
105 wc.addClause(
"and g.parent.pathName = :pathName");
106 wc.addNamedValue(
"pathName", currPath);
108 wc.addClause(
"order by g.name");
◆ getCssClass()
| String org.turro.www.groupit.GroupsTree.getCssClass |
( |
Item |
item | ) |
|
Definition at line 139 of file GroupsTree.java.
140 GroupIt gi = (GroupIt) item.getValue();
141 String selected = GroupItUtil.getSelectedGroup(
constructor, context);
142 String path = gi.getPathName();
143 if(path ==
null || selected ==
null) {
145 }
else if(path.equals(selected)) {
147 }
else if(selected.startsWith(path)) {
◆ getEntity()
| Object org.turro.www.groupit.GroupsTree.getEntity |
( |
Object |
value | ) |
|
|
protected |
Definition at line 51 of file GroupsTree.java.
52 return value instanceof String ?
getDao().find(GroupIt.class, (String) value) : value;
◆ getFolderImageSrc()
| String org.turro.www.groupit.GroupsTree.getFolderImageSrc |
( |
| ) |
|
Definition at line 135 of file GroupsTree.java.
136 return ElephantContext.getRootWebPath() + Images.getImage(
"group");
◆ getId()
| Object org.turro.www.groupit.GroupsTree.getId |
( |
Object |
item | ) |
|
|
protected |
Definition at line 122 of file GroupsTree.java.
123 return item instanceof GroupIt ? ((GroupIt) item).getName() :
new Path((String) item).getLastNode();
◆ getImageSrc()
| String org.turro.www.groupit.GroupsTree.getImageSrc |
( |
Item |
item | ) |
|
Definition at line 131 of file GroupsTree.java.
132 return ElephantContext.getRootWebPath() + Images.getImage(
"group");
◆ getLeafClause()
| WhereClause org.turro.www.groupit.GroupsTree.getLeafClause |
( |
String |
currPath | ) |
|
|
protected |
◆ getParentId()
| Object org.turro.www.groupit.GroupsTree.getParentId |
( |
Object |
entity | ) |
|
|
protected |
◆ parseItem()
| String org.turro.www.groupit.GroupsTree.parseItem |
( |
ElephantMarker |
marker, |
|
|
Object |
item |
|
) |
| |
|
protected |
Definition at line 90 of file GroupsTree.java.
String parse(String rootTmpl, String tmpl)
Object put(Object key, Object value)
◆ parseTree()
| String org.turro.www.groupit.GroupsTree.parseTree |
( |
ElephantMarker |
marker, |
|
|
List< Item< Object, Object >> |
items |
|
) |
| |
|
protected |
Definition at line 76 of file GroupsTree.java.
77 String selPath = GroupItUtil.getSelectedGroup(
constructor, context);
78 if(Strings.isBlank(selPath) && !items.isEmpty()) {
79 selPath = ((GroupIt) ((Item) items.iterator().next()).getValue()).getPathName();
80 GroupItUtil.setSelectedGroup(
constructor, context, selPath);
◆ renderItem()
| void org.turro.www.groupit.GroupsTree.renderItem |
( |
ElephantMarker |
marker, |
|
|
Object |
item |
|
) |
| |
|
protected |
Definition at line 70 of file GroupsTree.java.
void process(String rootTmpl, String tmpl)
◆ renderTree()
| void org.turro.www.groupit.GroupsTree.renderTree |
( |
ElephantMarker |
marker, |
|
|
List< Item< Object, Object >> |
items |
|
) |
| |
|
protected |
Definition at line 56 of file GroupsTree.java.
57 String selPath = GroupItUtil.getSelectedGroup(
constructor, context);
58 if(Strings.isBlank(selPath) && !items.isEmpty()) {
59 selPath = ((GroupIt) ((Item) items.iterator().next()).getValue()).getPathName();
60 GroupItUtil.setSelectedGroup(
constructor, context, selPath);
The documentation for this class was generated from the following file: