Messagebox"

From Documentation
Line 28: Line 28:
  
  
 +
=Customization=
 +
==The Default Title==
 +
If the title is not specified, the application's name (returned by <javadoc method="getAppName()" type="interface">org.zkoss.zk.ui.WebApp</javadoc>). You could change it by invoking <javadoc method="setAppName(java.lang.String)" type="interface">org.zkoss.zk.ui.WebApp</javadoc>.
 +
 +
Since 5.0.6, you could specify the application's name with a library property called [[ZK Configuration Reference/zk.xml/The Library Properties/org.zkoss.zk.ui.WebApp.name|org.zkoss.zk.ui.WebApp.name]]. For example, you could specify the following in <tt>WEB-INF/zk.xml</tt>:
 +
 +
<source lang="xml">
 +
<library-property>
 +
    <name>org.zkoss.zk.ui.WebApp.name</name>
 +
    <value>My Killer Application</value>
 +
</library-property>
 +
</source>
 +
 +
== The Template ==
 
=Supported events=
 
=Supported events=
  

Revision as of 06:46, 8 February 2011

Messagebox

Employment/Purpose

It provides a set of utilities to show message boxes.

It is typically used to alert users when an error occurs, or to prompt user for an decision.


Example

<window title="Messagebox demo" border="normal">
	<button label="Question" width="100px">
		<attribute name="onClick">{ Messagebox.show("Question is pressed. Are
			you sure?", "Question", Messagebox.OK | Messagebox.CANCEL,
			Messagebox.QUESTION); }</attribute>
	</button>
</window>


Customization

The Default Title

If the title is not specified, the application's name (returned by WebApp.getAppName()). You could change it by invoking WebApp.setAppName(String).

Since 5.0.6, you could specify the application's name with a library property called org.zkoss.zk.ui.WebApp.name. For example, you could specify the following in WEB-INF/zk.xml:

<library-property>
    <name>org.zkoss.zk.ui.WebApp.name</name>
    <value>My Killer Application</value>
</library-property>

The Template

Supported events

Name
Event Type
None None

Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
     



Last Update : 2011/02/08

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.