Dialog¶
In intra-mart Accel Kaiden!, tag lib is provided to create dialog.This chapter describes dialog creation.
Dialog Creation¶
<k:dialog title="sample dialog" id="sampleDialog" modal="true"> <%-- Dialog contents --%> </k:dialog>Notes
Dialog is handled as gadget block (<k:blockContainer>).Therefore, it should be placed inside the <k:gadgetContainer>.It should not be included in gadget block, TMtable, or dialog each.
Basic Operation of Dialog¶
Following is code example.
//obtaining dialog object var dialog = KAIDEN.getGadget("gadget ID").dialogs["sampleDialog"]; //register a button to dialog dialog.addButton("button name", function() { //process when the button is pressed }); //open the dialog dialog.open(); //close the dialog dialog.open();Notes
Please refer to button option of dialog of jQuery for the function that is specified by dialog.addButton().
Validation only in Dialog¶
Dialog which was created by <k:dialog> encloses the contents by <form> automatically.Therefore, it can be processed just as the same with the contents described in Validationif (dialog.validate("validation key")) { //Process when there was no error }The difference with the contents described in Validation is the following.
- Error message is not displayed on other screen and it will be displayed in own dialog.
![]()