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

Messagebox with no button

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.5.1
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
      None

      Description

      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>
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: