public class AuCmd0
extends java.lang.Object
zAu.cmd0
Modifier and Type | Method and Description |
---|---|
void |
alert(String msg)
Shows an alert to indicate some error occurs.
|
void |
bookmark(String bk,
boolean replace)
Sets a bookmark
|
void |
cfmClose(String msg)
Sets the message used to confirm the user when he is closing
the browser window.
|
void |
clearBusy()
Removes the busy message covering the whole browser.
|
void |
clearBusy(String uuid)
Removes the busy message covering the specified widget.
|
void |
clearWrongValue(String... any)
Closes the all error messages related to the specified widgets.
|
void |
clientInfo(String dtid)
Asks the client information.
|
void |
download(String url)
Asks the client to download the resource at the specified URL.
|
void |
echo(String dtid)
Asks the client to echo back an AU request, such that
the server can return other commands.
|
void |
echoGx(String evtnm,
String data,
String... any)
Ask the client to echo back globally.
|
void |
historyState(boolean replace,
Object state,
String title,
String url)
Pushes or replaces a history state.
|
void |
loadCSS(String href,
String id,
String media)
Loads a CSS file.
|
void |
loadScript(String url,
String callback,
boolean once)
Loads a JavaScript file and execute it.
|
void |
log(String msg)
Logs the message.
|
void |
moveBy(int x,
int y)
Moves the browser window.
|
void |
moveTo(int x,
int y)
Moves the browser window to the specified location
|
void |
obsolete(String dtid,
String msg)
Shows an error to indicate the desktop is timeout.
|
void |
print()
Prints the content of the browser window.
|
void |
redirect(String url,
String target)
Redirects to the specified URL.
|
void |
resizeBy(int x,
int y)
Resizes the browser window.
|
void |
resizeTo(int x,
int y)
Resizes the browser window to the specified size.
|
void |
script(String script)
Executes the JavaScript.
|
void |
scrollBy(int x,
int y)
Scrolls the content of the browser window.
|
void |
scrollIntoView(String id)
Scrolls the widget or an DOM element into the view
|
void |
scrollTo(int x,
int y)
Scrolls the contents of the browser window to the specified location.
|
void |
showBusy(String msg)
Shows the busy message covering the whole browser window.
|
void |
showBusy(String uuid,
String msg)
Shows the busy message covering the specified widget.
|
void |
showNotification(String msg,
String type,
String pid,
String ref,
String pos,
Offset off,
int dur,
boolean closable)
Shows a notification popup.
|
void |
submit(String id)
Submit a form.
|
void |
syncAllErrorbox()
Ask the client to sync all the errorboxes and its reference widget position on the desktop.
|
void |
title(String title)
Changes the brower window's titile.
|
void |
wrongValue(Object... the)
Shows the error messages for the specified widgets.
|
public void bookmark(String bk, boolean replace)
bk
- the bookmarkreplace
- if true, it will replace the bookmark without creating
a new one history.public void obsolete(String dtid, String msg)
dtid
- the desktop UUIDmsg
- the error messagepublic void alert(String msg)
wrongValue(zk.Object...)
instead.msg
- the error messagepublic void redirect(String url, String target)
url
- the URL to redirect totarget
- [optional] the window name to show the content
of the URL. If omitted, it will replace the current content.public void title(String title)
title
- the new titlepublic void script(String script)
script
- the JavaScript code snippet to executepublic void echo(String dtid)
dtid
- the desktop ID (Desktop
).AuCmd1.echo2(zk.Widget, _global_.String, zk.Object)
,
echoGx(_global_.String, _global_.String, _global_.String...)
public void clientInfo(String dtid)
onClientInfo
response.dtid
- the desktop ID (Desktop
).public void download(String url)
url
- the URL to download frompublic void print()
public void scrollBy(int x, int y)
x
- the offset (difference) in the X coordinate (horizontally) (pixels)y
- the offset in the Y coordinate (vertically) (pixels)public void scrollTo(int x, int y)
x
- the X coordinate to scroll to (pixels)y
- the Y coordinate to scroll to (pixels)public void resizeBy(int x, int y)
x
- the number of pixels to increase/decrease (pixels)y
- the number of pixels to increase/decrease (pixels)public void resizeTo(int x, int y)
x
- the required width (pixels)y
- the required height (pixels)public void moveBy(int x, int y)
x
- the number of pixels to move in the X coordinatey
- the number of pixels to move in the Y coordinatepublic void moveTo(int x, int y)
x
- the left (pixels)y
- the top (pixels)public void cfmClose(String msg)
msg
- the message to show in the confirm dialogpublic void showNotification(String msg, String type, String pid, String ref, String pos, Offset off, int dur, boolean closable)
msg
- message to showtype
- the notification type (warning, info, error)pid
- uuid of the page to which it belongsref
- uuid of a reference componentpos
- the position of notificationoff
- the offset of x and ydur
- the duration of notificationclosable
- the close button of notificationpublic void showBusy(String msg)
msg
- the message.public void showBusy(String uuid, String msg)
uuid
- the component's UUIDmsg
- the message.public void clearBusy()
public void clearBusy(String uuid)
uuid
- the component's UUIDpublic void clearWrongValue(String... any)
Widget
has a method called clearErrorMessage
(such as InputWidget.clearErrorMessage(boolean, boolean)
).
If no such method, nothing happens.any
- number of UUID of widgets.wrongValue(zk.Object...)
public void wrongValue(Object... the)
Widget
has a method called setErrorMessage
(such as InputWidget.setErrorMessage(_global_.String)
).
If no such method, jq
is used instead.the
- widgets and messages. The first argument
is the widget's UUID, and the second is the error message.
The third is UUID, then the fourth the error message, and so on.clearWrongValue(_global_.String...)
public void submit(String id)
submit
, then the widget's submit
method is called. Otherwise, it looks for the DOM element
and invokes the submit
method (i.e., assume it is
the FROM element).id
- the UUID of the widget, or the ID of the FORM element.public void scrollIntoView(String id)
id
- the UUID of the widget, or the ID of the DOM element.public void loadScript(String url, String callback, boolean once)
url
- the JavaScript file pathcallback
- the function to execute after the JavaScript file loaded.once
- true means the JavaScript file will be cached.public void historyState(boolean replace, Object state, String title, String url)
replace
- if true, it will replace the current history without creating a new one.state
- a state object.title
- a title for the state. May be ignored by some browsers.url
- the new history entry's URL. Ignored if not specified.public void syncAllErrorbox()
public void log(String msg)
msg
- the message to logpublic void loadCSS(String href, String id, String media)
href
- the URL of the CSS file.id
- the identifier. Ignored if not specified.media
- the media attribute. Ignored if not specified.public void echoGx(String evtnm, String data, String... any)
Unlike echo(_global_.String)
, it will search all browser windows for
Note: this feature requires ZK EE the given desktop IDs.
evtnm
- the event namedata
- any string-typed dataany
- number of desktop IDs.Copyright © 2005-2023 Potix Corporation. All Rights Reserved.