intra-mart Accel Kaiden! / Programming Guide

«  Display Mode and Format of Element such as Text Box   ::   Contents   ::   Creation Method and Dynamic Change of Drop Down List Selections  »

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 Validation
if (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.
../../../_images/dialog-validation.png

«  Display Mode and Format of Element such as Text Box   ::   Contents   ::   ドCreation Method and Dynamic Change of Drop Down List Selections  »