◆ accept()
void org.turro.zul.acceptance.AcceptanceListbox.accept |
( |
| ) |
|
Definition at line 128 of file AcceptanceListbox.java.
129 IContact logged = Authentication.getIContact();
130 for(Listitem li : (Collection<Listitem>) getSelectedItems()) {
131 if(li.getValue() instanceof Acceptance) {
132 Acceptance acceptance = li.getValue();
133 if(Authentication.isAdministrator() || acceptance.getContact().getId().equals(logged.getId())) {
135 AcceptanceUtil.accept(acceptance)
◆ delete()
void org.turro.zul.acceptance.AcceptanceListbox.delete |
( |
| ) |
|
Definition at line 142 of file AcceptanceListbox.java.
143 Dao dao =
new ContactsPU();
144 for(Listitem li : (Collection<Listitem>) getSelectedItems()) {
145 if(li.getValue() instanceof Acceptance) {
146 dao.deleteObject(li.getValue());
◆ getPath()
String org.turro.zul.acceptance.AcceptanceListbox.getPath |
( |
| ) |
|
◆ isAcceptable()
boolean org.turro.zul.acceptance.AcceptanceListbox.isAcceptable |
( |
| ) |
|
Definition at line 69 of file AcceptanceListbox.java.
70 if(Authentication.isAdministrator())
return true;
71 IContact logged = Authentication.getIContact();
72 for(Acceptance a : list) {
73 if(a.getContact().getId().equals(logged.getId()) && a.getDateAcceptance() ==
null) {
◆ isEraser()
boolean org.turro.zul.acceptance.AcceptanceListbox.isEraser |
( |
| ) |
|
Definition at line 84 of file AcceptanceListbox.java.
85 return Application.getApplication().isInRole(
"acceptance:delete");
◆ isPetitioner()
boolean org.turro.zul.acceptance.AcceptanceListbox.isPetitioner |
( |
| ) |
|
Definition at line 80 of file AcceptanceListbox.java.
81 return Application.getApplication().isInRole(
"acceptance:petition");
◆ petition()
void org.turro.zul.acceptance.AcceptanceListbox.petition |
( |
| ) |
|
Definition at line 88 of file AcceptanceListbox.java.
89 final ContactCombobox contactInput =
new ContactCombobox();
94 new InputField(
"Contact", null, null, 0) {
96 protected HtmlBasedComponent createEditor() {
100 new InputField(
"Comment",
null,
null, 3)
104 public Object execute(Context context) {
105 InputField[] fields = (InputField[]) context.get(
"fields");
106 if(fields.length > 0) {
107 Contact contact =
null;
108 String comment =
null;
109 for(InputField f : fields) {
110 if(
"Contact".equals(f.getLabel())) {
111 contact = contactInput.getContact();
112 }
else if(
"Comment".equals(f.getLabel())) {
113 comment = (String) f.getValue();
116 if(contact !=
null) {
118 AcceptanceUtil.request((Contact) Authentication.getIContact().getContact(), contact, path, comment)
◆ refreshStatus()
void org.turro.zul.acceptance.AcceptanceListbox.refreshStatus |
( |
| ) |
|
◆ setPath()
void org.turro.zul.acceptance.AcceptanceListbox.setPath |
( |
String |
path | ) |
|
The documentation for this class was generated from the following file: