Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1351

Messagebox with no button

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major Major
    • 6.5.1
    • None
    • Components
    • Security Level: Jimmy
    • None
    • None

      as code below, messagebox has default button even assign null to buttons attribute, it is make sense to provide a way to create a messagebox with no button easily instead of using template

      <zk>
      	<button label="test has button messagebox">
      		<attribute name="onClick"><![CDATA[
      			Messagebox.show("Something is changed. Are you sure?", 
      			    "Question", null,
      			    Messagebox.QUESTION,
      			        new org.zkoss.zk.ui.event.EventListener(){
      			            public void onEvent(Event e){
      			                if(Messagebox.ON_OK.equals(e.getName())){
      			                    //OK is clicked
      			                }else if(Messagebox.ON_CANCEL.equals(e.getName())){
      			                    //Cancel is clicked
      			                }
      			            }
      			        }
      			    );
      		]]></attribute>
      	</button>
      </zk>
      

            jumperchen jumperchen
            benbai benbai
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: