- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 52 of file RoleGrid.java.
◆ RoleGrid()
org.turro.contacts.zul.contact.RoleGrid.RoleGrid |
( |
| ) |
|
◆ addRows()
void org.turro.contacts.zul.contact.RoleGrid.addRows |
( |
| ) |
|
Definition at line 80 of file RoleGrid.java.
81 for(
final Role r : contact.
getRoles()) {
82 final Row row =
new Row();
84 rows.appendChild(row);
86 Hbox hbox =
new Hbox();
87 row.appendChild(hbox);
89 final Listbox roles =
new Listbox();
90 roles.setMold(
"select");
92 for (String rs : (List<String>) ProfileMap.getRoleNames()) {
93 if(r.getName() ==
null) {
96 Listitem li =
new Listitem(rs);
97 li.setSelected(rs.equals(r.getName()));
98 roles.appendChild(li);
100 }
catch (IOException ex) {
101 Logger.getLogger(
RoleGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
103 roles.addEventListener(Events.ON_SELECT,
new EventListener() {
105 public void onEvent(Event event)
throws Exception {
106 r.setName(roles.getSelectedItem().getLabel());
109 hbox.appendChild(roles);
111 if(Application.getApplication().isInRole(
"contact-role:delete")) {
112 hbox.appendChild(
new Separator(
"vertical"));
113 Image img =
new Image(
"/_zul/images/edit-delete.png");
114 img.setStyle(
"cursor:pointer");
115 img.addEventListener(Events.ON_CLICK,
new EventListener() {
117 public void onEvent(Event event)
throws Exception {
118 ZkossUtils.confirmDeletion(
null,
new Command() {
120 public Object execute(Context context) {
129 hbox.appendChild(img);
◆ setAddToolbar()
void org.turro.contacts.zul.contact.RoleGrid.setAddToolbar |
( |
boolean |
addToolbar | ) |
|
Definition at line 72 of file RoleGrid.java.
74 toolbar =
new Toolbar();
75 getParent().appendChild(toolbar);
◆ setContact()
void org.turro.contacts.zul.contact.RoleGrid.setContact |
( |
Contact |
contact | ) |
|
Definition at line 64 of file RoleGrid.java.
65 this.contact = contact;
66 rows.getChildren().clear();
The documentation for this class was generated from the following file: