◆ AttachmentControl()
org.turro.attach.zul.control.AttachmentControl.AttachmentControl |
( |
| ) |
|
Definition at line 240 of file AttachmentControl.java.
241 Executions.createComponents(
"/WEB-INF/_zul/bs/comps/attachment/attachmentControl.zul",
this,
null);
242 Selectors.wireComponents(
this,
this,
false);
243 Selectors.wireEventListeners(
this,
this);
◆ afterCompose()
void org.turro.attach.zul.control.AttachmentControl.afterCompose |
( |
| ) |
|
◆ getLabel()
String org.turro.attach.zul.control.AttachmentControl.getLabel |
( |
| ) |
|
◆ getPath()
String org.turro.attach.zul.control.AttachmentControl.getPath |
( |
| ) |
|
◆ getPublicOnly()
Boolean org.turro.attach.zul.control.AttachmentControl.getPublicOnly |
( |
| ) |
|
◆ getTreeFolder()
AttachTree org.turro.attach.zul.control.AttachmentControl.getTreeFolder |
( |
| ) |
|
◆ isReadOnly()
boolean org.turro.attach.zul.control.AttachmentControl.isReadOnly |
( |
| ) |
|
◆ isTreeCollapsed()
boolean org.turro.attach.zul.control.AttachmentControl.isTreeCollapsed |
( |
| ) |
|
◆ onCopy()
void org.turro.attach.zul.control.AttachmentControl.onCopy |
( |
| ) |
throws Exception |
◆ onCut()
void org.turro.attach.zul.control.AttachmentControl.onCut |
( |
| ) |
throws Exception |
◆ onDelete()
void org.turro.attach.zul.control.AttachmentControl.onDelete |
( |
| ) |
throws Exception |
Definition at line 217 of file AttachmentControl.java.
218 if(Application.getApplication().isInRole(
"attach:delete")) {
219 Messages.confirmDeletion().show(() -> {
220 Collection<Attachment> deleted = AttachmentUtil.delete(currentFolder.
getPath());
222 for(Attachment a : deleted) {
223 treeFolder.getAttachListener().deleteDone(a);
226 treeFolder.setSelectedItem(currentFolder);
AttachNavigatorListener getAttachListener()
◆ onDownload()
void org.turro.attach.zul.control.AttachmentControl.onDownload |
( |
| ) |
throws Exception |
Definition at line 186 of file AttachmentControl.java.
189 File targetZip = File.createTempFile(
"attach_",
"_folder.zip");
190 Compress.zip(af.getAllAttachments(), targetZip.toPath(),
191 a -> Paths.get(a.getPath(), a.getFileName()),
192 a ->
new ByteArrayInputStream(a.getWithContent().getAttachContent().getFileContent()));
193 Filedownload.save(targetZip,
"application/zip");
AttachFolder getCurrentFolder()
◆ onEvent()
void org.turro.attach.zul.control.AttachmentControl.onEvent |
( |
UploadEvent |
event | ) |
throws Exception |
◆ onLevelUp()
void org.turro.attach.zul.control.AttachmentControl.onLevelUp |
( |
| ) |
throws Exception |
Definition at line 142 of file AttachmentControl.java.
143 if(currentFolder !=
null && currentFolder.getParentItem() !=
null) {
144 currentFolder = (AttachFolder) currentFolder.getParentItem();
145 treeFolder.setSelectedItem(currentFolder);
◆ onNewFolder()
void org.turro.attach.zul.control.AttachmentControl.onNewFolder |
( |
| ) |
throws Exception |
◆ onPaste()
void org.turro.attach.zul.control.AttachmentControl.onPaste |
( |
| ) |
throws Exception |
Definition at line 208 of file AttachmentControl.java.
209 AttachmentUtil.paste(currentFolder.
getPath());
210 treeFolder.setSelectedItem(currentFolder);
213 paste.setDisabled(
true);
◆ onSearch()
void org.turro.attach.zul.control.AttachmentControl.onSearch |
( |
| ) |
|
◆ onSearchValue()
void org.turro.attach.zul.control.AttachmentControl.onSearchValue |
( |
| ) |
|
◆ onSelectFolder()
void org.turro.attach.zul.control.AttachmentControl.onSelectFolder |
( |
| ) |
|
◆ onSend()
void org.turro.attach.zul.control.AttachmentControl.onSend |
( |
| ) |
throws Exception |
Definition at line 169 of file AttachmentControl.java.
170 SendAttachments sa =
new SendAttachments(I_.get(
"Attachment")) {
172 protected void fillAttachment(File attachment, Object entity) {
173 AttachWd.writeToFile((Attachment) entity, attachment);
178 for(Attachment a : af.getAttachments()) {
179 sa.addAttachment(a, AttachPU.getObjectPath(a), a.getFileName());
182 sa.sendAttachments(
null);
◆ onUpload()
void org.turro.attach.zul.control.AttachmentControl.onUpload |
( |
UploadEvent |
event | ) |
throws Exception |
◆ onValidated()
void org.turro.attach.zul.control.AttachmentControl.onValidated |
( |
| ) |
|
◆ refreshControls()
void org.turro.attach.zul.control.AttachmentControl.refreshControls |
( |
| ) |
|
◆ selectFirst()
void org.turro.attach.zul.control.AttachmentControl.selectFirst |
( |
| ) |
|
◆ setEntity()
void org.turro.attach.zul.control.AttachmentControl.setEntity |
( |
Object |
entity | ) |
|
Implements org.turro.action.IEntityHolder.
Definition at line 289 of file AttachmentControl.java.
290 IElephantEntity iee = Entities.getController(entity);
291 path = iee.getPath();
292 if(Strings.isBlank(path)) {
295 label = iee.getName();
void setDoProcessors(boolean doProcessors)
◆ setLabel()
void org.turro.attach.zul.control.AttachmentControl.setLabel |
( |
String |
label | ) |
|
◆ setPath()
void org.turro.attach.zul.control.AttachmentControl.setPath |
( |
String |
path | ) |
|
◆ setPublicOnly()
void org.turro.attach.zul.control.AttachmentControl.setPublicOnly |
( |
Boolean |
publicOnly | ) |
|
◆ setReadOnly()
void org.turro.attach.zul.control.AttachmentControl.setReadOnly |
( |
boolean |
readOnly | ) |
|
◆ setTreeCollapsed()
void org.turro.attach.zul.control.AttachmentControl.setTreeCollapsed |
( |
boolean |
treeCollapsed | ) |
|
◆ showFor()
static void org.turro.attach.zul.control.AttachmentControl.showFor |
( |
Object |
entity, |
|
|
Consumer< Windows > |
onClose |
|
) |
| |
|
static |
Definition at line 374 of file AttachmentControl.java.
377 ac.setHeight(
"100%");
378 ac.setEntity(entity);
379 Windows.title(I_.get(
"Attachments"))
The documentation for this class was generated from the following file: