use of com.servoy.j2db.server.headlessclient.PageJSActionBuffer.DivDialogAction in project servoy-client by Servoy.
the class MainPage method toBack.
public void toBack() {
touch();
if (isShowingInDialog() && callingContainer != null) {
callingContainer.touch();
ServoyDivDialog divDialog = callingContainer.divDialogs.get(getContainerName());
if (divDialog != null) {
callingContainer.addJSAction(new DivDialogAction(divDialog, DivDialogAction.OP_TO_BACK));
}
} else {
appendJavaScriptChanges("window.blur();");
}
}
use of com.servoy.j2db.server.headlessclient.PageJSActionBuffer.DivDialogAction in project servoy-client by Servoy.
the class MainPage method setDialogBounds.
public void setDialogBounds(String windowName, int x, int y, int width, int height) {
touch();
if (callingContainer != null) {
callingContainer.touch();
ServoyDivDialog divDialog = callingContainer.divDialogs.get(windowName);
if (divDialog != null) {
callingContainer.addJSAction(new DivDialogAction(divDialog, DivDialogAction.OP_SET_BOUNDS, new Object[] { x, y, width, height }));
}
}
}
use of com.servoy.j2db.server.headlessclient.PageJSActionBuffer.DivDialogAction in project servoy-client by Servoy.
the class MainPage method showOpenFileDialog.
@SuppressWarnings("nls")
public void showOpenFileDialog(final IMediaUploadCallback callback, boolean multiSelect, String acceptFilter, String title) {
if ((isShowingInDialog() || isClosingAsDivPopup()) && callingContainer != null) {
callingContainer.showOpenFileDialog(callback, multiSelect, acceptFilter, title);
} else {
touch();
this.mediaUploadMultiSelect = multiSelect;
this.mediaUploadFilter = acceptFilter;
this.mediaUploadCallback = new IMediaUploadCallback() {
boolean uploaded = false;
public void uploadComplete(IUploadData[] fu) {
touch();
uploaded = true;
mediaUploadCallback = null;
addJSAction(new DivDialogAction(fileUploadWindow, DivDialogAction.OP_CLOSE));
callback.uploadComplete(fu);
}
public void onSubmit() {
if (!uploaded) {
mediaUploadCallback = null;
divDialogs.remove(FILE_UPLOAD_PAGEMAP);
fileUploadWindow.setPageMapName(null);
fileUploadWindow.remove(fileUploadWindow.getContentId());
addJSAction(new DivDialogAction(fileUploadWindow, DivDialogAction.OP_CLOSE));
}
}
};
fileUploadWindow.setPageMapName(FILE_UPLOAD_PAGEMAP);
if (title == null) {
fileUploadWindow.setTitle(client.getI18NMessage("servoy.filechooser.title"));
} else if (!"".equals(title)) {
fileUploadWindow.setTitle(title);
}
divDialogs.put(FILE_UPLOAD_PAGEMAP, fileUploadWindow);
addJSAction(new DivDialogAction(fileUploadWindow, DivDialogAction.OP_SHOW, new Object[] { FILE_UPLOAD_PAGEMAP }));
}
}
Aggregations