本文整理汇总了Java中org.zkoss.zk.ui.util.Clients类的典型用法代码示例。如果您正苦于以下问题:Java Clients类的具体用法?Java Clients怎么用?Java Clients使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Clients类属于org.zkoss.zk.ui.util包,在下文中一共展示了Clients类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkProtection
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
/**
* Some roles has edit permission, a sheet protection conflicts it, so show a warning.
* @param ss
*/
public static void checkProtection(Spreadsheet ss) {
for (int i=0 ; i < ss.getBook().getNumberOfSheets() ; i++){
Sheet sheet = ss.getBook().getSheetAt(i);
if (Ranges.range(sheet).isProtected()){
Clients.showNotification("Sheet "+sheet.getSheetName()+" is protected", Clients.NOTIFICATION_TYPE_WARNING, null,
"middle_center", 500);
}
}
}
示例2: process
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@Override
public boolean process(UserActionContext ctx){
try{
Book book = ctx.getBook();
save(book);
Clients.showNotification("saved "+book.getBookName(),"info",null,null,2000,true);
}catch(Exception e){
e.printStackTrace();
}
return true;
}
示例3: login
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@Listen("onClick = #loginButton")
public void login()
{
Clients.showBusy("Connection...");
String userName = userNameTextBox.getValue();
String password = passwordTextBox.getValue();
showNotify(userName + " / " + password);
DbSession dbSession = DbSessionFactory.produceDbSession(selectedDbConnection, userName, password);
try
{
dbSession.validate();
Sessions.getCurrent(true).setAttribute("dbsession", dbSession);
Executions.sendRedirect("database.zul");
}
catch (Exception ex)
{
showNotify(ex.getMessage());
}
Clients.clearBusy();
}
示例4: load
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@Listen("onClick = button[label='Fill with autorefresh']")
public void load(Event e){
Events.echoEvent("onLoadDataAutoRefresh", ss, null);
Clients.showBusy("populating");
}
示例5: clickMe
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@Command("clickMe")
public void clickMe() {
if (!checkPlugin()) {
return;
}
Integer office_id = getSessionOfficeId();
PrintRecords records = getPrintRecordsByOfficeId(office_id);
if (records.isInvited()) {
records.setInvited(false);
Clients.evalJavaScript("DHTMLSound()");
}
for (int i = 1; i < lines.size(); i++) {
final Str line = lines.get(i);
line.clear();
if (i <= records.getRecords().size()) {
line.labelA = new Label(
records.getRecords().get(i - 1).customerPrefix + records.getRecords()
.get(i - 1).customerNumber);
line.labelB = new Label(records.getRecords().get(i - 1).point);
final boolean blink = (
records.getRecords().get(i - 1).getState() == CustomerState.STATE_INVITED
|| records.getRecords().get(i - 1).getState()
== CustomerState.STATE_INVITED);
line.labelA.setClass(blink ? "blink_me" : "no_blink");
line.labelB.setClass(blink ? "blink_me" : "no_blink");
line.set();
}
}
}
示例6: login
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
private void login() {
Clients.clearWrongValue(Index.this);
ZKUtils.notNull(user);
ZKUtils.notNull(pass);
if (!authService.login(user.getText(), pass.getText())) {
Notification.showWarning("Usuario y/o contraseña invália");
return;
}
Executions.getCurrent().sendRedirect("/main.zul");
}
示例7: doAfterCompose
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
getPage().setTitle("Member List");
Clients.showNotification("Welcome to V3 Enterprise Member Registration System!");
List<Member> members = registrationService.getAllMembers();
memberListbox.setModel(new ListModelList<>(members));
}
示例8: doAfterCompose
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
long start = System.currentTimeMillis();
if (isPostImported()){
loadWithPostImporting();
}else{
loadDirectly();
}
long end = System.currentTimeMillis();
postImportingBox.setChecked(isPostImported());
Clients.showNotification("consumed (ms):"+(end-start));
}
示例9: showInfo
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
public static void showInfo(String msg){
Clients.showNotification(msg,"info",null,null,3000,false);
}
示例10: showError
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
public static void showError(String msg){
Clients.showNotification(msg,"error",null,null,-1,true);
}
示例11: setSelectedFieldMapItem
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
/**
* @param selectedFieldMapItem
* the selectedFieldMapItem to set
* @throws SearchLibException
*/
public void setSelectedFieldMapItem(
GenericLink<SourceField, ParserFieldTarget> selectedFieldMapItem)
throws SearchLibException {
this.selectedFieldMapItem = selectedFieldMapItem;
selectedParserField = selectedFieldMapItem.getSource().getUniqueName();
selectedIndexField = getClient().getSchema().getFieldList()
.get(selectedFieldMapItem.getTarget().getName());
captureRegexp = selectedFieldMapItem.getTarget().getCaptureRegexp();
removeTag = selectedFieldMapItem.getTarget().isRemoveTag();
reload();
Clients.resize(component);
}
示例12: showNotify
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
private void showNotify(String msg)
{
Clients.showNotification(msg,"info",null,null,1000);
}
示例13: onFormLoaded
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@WireEvent(EventType.FORM_LOADED)
public void onFormLoaded() {
Clients.evalJavaScript(sFormLoadedScript);
}
示例14: onEntryLoaded
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@WireEvent(EventType.ENTRY_LOADED)
public void onEntryLoaded(Entry e) {
Clients.evalJavaScript(sEntryLoadedScript);
}
示例15: onChangeFormMode
import org.zkoss.zk.ui.util.Clients; //导入依赖的package包/类
@WireEvent(EventType.CHANGE_FORM_MODE)
public void onChangeFormMode(int mode) {
Clients.evalJavaScript(sFormModeChangeScript);
}