18 package org.turro.dossier.zul.issue;
20 import org.turro.string.Strings;
21 import org.turro.action.Contacts;
22 import org.turro.auth.Authentication;
23 import org.turro.contacts.Contact;
24 import org.turro.contacts.util.ContactCombobox;
25 import org.turro.dossier.entity.Issue;
26 import org.turro.dossier.entity.IssueParticipant;
27 import org.turro.dossier.entity.IssueParticipantRole;
28 import org.turro.dossier.issue.IssueWrapper;
29 import org.turro.i18n.I_;
30 import org.turro.plugin.contacts.IContact;
31 import org.turro.registry.ChangeCategory;
32 import org.turro.registry.Changes;
33 import org.turro.registry.UniqueString;
34 import org.turro.zkoss.grid.CollectionGrid;
35 import org.turro.zkoss.grid.EditableCell;
36 import org.zkoss.zk.ui.HtmlBasedComponent;
37 import org.zkoss.zk.ui.ext.AfterCompose;
38 import org.zkoss.zul.Row;
47 private Changes changes;
51 setSizedByContent(
true);
56 setSizedByContent(
true);
66 this.changes = changes;
76 ChangeCategory cc =
new ChangeCategory(4,
I_.
get(
"Participants"));
110 if(changes !=
null) {
112 ChangeCategory cc =
new ChangeCategory(4,
I_.
get(
"Participants"));
113 changes.addChange(
new UniqueString(cc,
I_.
byKey(ip.
getRole().toString()),
"-" + ip.
getName(),
true));
121 super.rowChanged(row);
122 if(changes !=
null) {
127 ChangeCategory cc =
new ChangeCategory(4,
I_.
get(
"Participants"));
145 cdc.setMold(
"select");
149 return super.createEditor(editableCell);
166 return super.formatCell(editableCell, value);
172 HtmlBasedComponent hbc = (HtmlBasedComponent) editableCell.
getEditor();
185 return super.getEditorValue(editableCell);
188 private void addColumns() {
190 "idContact",
null, 0,
false,
false).setHflex(
"7");
192 "role",
null, 0,
false,
false).setHflex(
"3");
static IContact getIContact()
void setIssue(Issue issue)
void setRole(IssueParticipantRole role)
IssueParticipantRole getRole()
IssueParticipant addReporter(Object contact)
Set< IssueParticipant > getParticipants()
void initiateRow(Row row, IssueParticipant value)
void setIssue(Issue issue)
void setChanges(Changes changes)
HtmlBasedComponent createEditor(EditableCell editableCell)
String formatCell(EditableCell editableCell, Object value)
Object getEditorValue(EditableCell editableCell)
boolean isValid(IssueParticipant v)
boolean deleteRow(Row row)
IssueParticipantGrid(Issue issue)
static String byKey(String key)
static String get(String msg)
void setCollection(Collection< V > collection)
Collection< V > getCollection()
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
Object getCellValue(EditableCell editableCell)