SimpleDialog acts is an extension of Dialog and used to capture binary decisions like OK/Cancel from user without using a browser dialog.
component-family | net.sf.yui4jsf.Container |
renderer-type | net.sf.yui4jsf.component.SimpleDialogRenderer |
component-class | net.sf.yui4jsf.component.dialog.SimpleDialog |
renderer-class | net.sf.yui4jsf.component.dialog.SimpleDialogTag |
tag-class | net.sf.yui4jsf.component.dialog.SimpleDialogTag |
<yui:simpleDialog header="Header Text" text="Body Text" yesText="Yes Button Text" noText="No Button Text" icon="{block|warn|help|info|alarm|tip}" close="{true|false}" draggable="{true|false}" underlay="{true|false}" modal="{true|false}" visible="{true|false}" monitorResize="{true|false}" x="150" y="200" fixedCenter="{true|false}" width="400" height="300" zIndex="1" constrainToViewport="{true|false}" iframe="{true|false}"> </yui:simpleDialog>
<yui:simpleDialog>
Standard Attributes - id, rendered, binding
Standard Panel Attributes - See panel component for more info
header - Header text
text - Body text
yesText - Text that's displayed on the yes button, default is "Yes"
noText - Text that's displayed on the no button, default is "No"
icon - Constant image to be rendered on the left side of the simple dialog. Possible values are block|warn|help|info|alarm|tip, default value is warn
- Show and Hide
SimpleDialog is not visible by default, suppose the id of the simpleDialog is "mySimpleDialog", in order to show it you'll need to call it's visibility functions;YUI4JSF.mySimpleDialog.show(); YUI4JSF.mySimpleDialog.hide();
- Changing default behavior of yes and no buttons
Currently selecting no hides the simpleDialog and yes submits it's parent form. Although currently not supported, it'll be possible to change this behavior and attach custom events soon.