Serenity: Entity Dialog Editor with template not showing properly in MasterDetail Editor

Created on 6 Nov 2017  路  5Comments  路  Source: serenity-is/Serenity

if i go direct from menu and open checkout its appearing properly with template as shown below.

image
url appears for above as follow
http://localhost:1621/RentACar/CheckOut#RentACar-CheckOut/1

while when i try to open from masterdetail form button its appearing like this
image
url appears for above as follow
http://localhost:1621/RentACar/Reservation#RentACar-CheckOutEditor/``1

i need editor to load dialog template when i click on masterdetail grid edit link.

All 5 comments

when i change checkouteditordialog to checkoutdialog, it start appearing properly in masterdetail editing, but i face another problem.

it cannot find primarykey of parent, while here parent is not present as its new record and is yet to be saved in databse.
image

hey @saeedahmad101
brother in your checkouteditor.ts
override new checkout button like this
protected getButtons(): Serenity.ToolButton[] {
var buttons = super.getButtons();
buttons[0].onClick = () => {

            this.createEntityDialog(this.getItemType(), dlg => {
                var dialog = dlg as CheckoutDialog;
                 dialog.onsave = (opt, callback) => this.save(opt, callback);
                var entity = this.getNewEntity() as Row //which contain ReservationID;
               so u will get Ur reservationID in entity
                dialog.loadEntityAndOpenDialog(entity);
            });
        }

        return buttons;
    }

please Check N let me Know ..actually i had same requirement before..

With Kind regards.
Aniket

thankx andy,

after applying your code i get following

image

this method is not available with Ur CheckoutDialog so comment it .....
it is only available with CheckoutEditorDialog.. n i think u dont want it here..
u cannot refersh memory grid with saved data[mentioned by @volkanceylan ]..

Closing due to inactivity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GitHubOrim picture GitHubOrim  路  3Comments

moostafaa picture moostafaa  路  3Comments

gfo2007 picture gfo2007  路  3Comments

dudeman972 picture dudeman972  路  3Comments

Pinellus picture Pinellus  路  3Comments