Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addded one more scenario by using business process to navigate between mater and detail. #6

Merged
merged 3 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions master-detail-demo/cms/cms_de.yaml

This file was deleted.

18 changes: 9 additions & 9 deletions master-detail-demo/cms/cms_en.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
com:
axonivy:
demo:
statefuldatatable:
masterdetail:
enums:
Availability:
IN_ORDER:
Expand Down Expand Up @@ -32,9 +32,9 @@ Dialogs:
com:
axonivy:
demo:
statefuldatatable:
masterdetail:
ui:
StatefulDatatable:
ProductList:
Error:
deliveryDateBeforeOrderDate: Delivery date cannot be before Order date
actions: Actions
Expand All @@ -46,8 +46,6 @@ Dialogs:
copy: Copy
copyProduct: Copy Product
delete: Delete
deleteProfileHeader: Profile Deletion
deleteProfileMessage: Are you sure you want to delete this profile?
deleteSelected: Delete selected
deletionHeader: Deleting products
deletionMessage: Do you want to delete all the selected products?
Expand All @@ -64,18 +62,20 @@ Dialogs:
productDetail: Product Detail
productName: Product Name
products: List of products
profilType: Profile Type
profileName: Profilname
publicProfiles: Public Profiles
quality: Quality
quantity: Quantity
required: 'Required:'
save: Save
saveProfile: Save Profile
state: State
title: Stateful Datatable
tooltipAddNewByDialog: Add new product by using a modal dialog.
tooltipEditByLink: Edit product by navigation to a new process start link.
tooltipEditThroughProcess: Edit product by navigation through business process.
tooltipEditWithViews: Edit product by navigation through multiple views of same Axon Ivy dialog.
validThrough: Valid Through
'yes': 'Yes'
Labels:
cancel: Cancel
'no': 'No'
ok: Ok
'yes': 'Yes'
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
MasterDetailDemoData #class
com.axonivy.demo #namespace
lazyDataModel com.axonivy.demo.masterdetail.ui.ProductLazyDataModel #field
productID String #field
77 changes: 39 additions & 38 deletions master-detail-demo/processes/MasterDetailDemo.p.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,36 @@
"config" : {
"callSignature" : "showProductList",
"outLink" : "showProductList.ivp",
"input" : {
"code" : [
"import com.axonivy.demo.masterdetail.ui.ProductRepoLazyDataModel;",
"",
"out.lazyDataModel = new ProductRepoLazyDataModel();"
]
}
"startName" : "Show Product List"
},
"visual" : {
"at" : { "x" : 104, "y" : 160 }
"at" : { "x" : 104, "y" : 80 }
},
"connect" : { "id" : "f8", "to" : "f7" }
}, {
"id" : "f6",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 360, "y" : 160 }
"at" : { "x" : 544, "y" : 80 }
}
}, {
"id" : "f7",
"type" : "DialogCall",
"name" : "List all products",
"config" : {
"dialogId" : "com.axonivy.demo.masterdetail.ProductList",
"startMethod" : "start(com.axonivy.demo.masterdetail.ui.ProductLazyDataModel)",
"call" : {
"params" : [
{ "name" : "lazyModel", "type" : "com.axonivy.demo.masterdetail.ui.ProductLazyDataModel" }
],
"startMethod" : "start()",
"output" : {
"map" : {
"param.lazyModel" : "in.lazyDataModel"
"out" : "in",
"out.productID" : "result.selectedProductId"
}
}
},
"visual" : {
"at" : { "x" : 232, "y" : 160 }
"at" : { "x" : 232, "y" : 80 }
},
"connect" : { "id" : "f9", "to" : "f6" }
"connect" : { "id" : "f13", "to" : "f12" }
}, {
"id" : "f0",
"type" : "RequestStart",
Expand All @@ -67,15 +59,9 @@
"showInStartList" : false
},
"visual" : {
"at" : { "x" : 104, "y" : 256 }
"at" : { "x" : 104, "y" : 304 }
},
"connect" : { "id" : "f3", "to" : "f2" }
}, {
"id" : "f1",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 544, "y" : 256 }
}
}, {
"id" : "f2",
"type" : "DialogCall",
Expand All @@ -93,30 +79,45 @@
}
},
"visual" : {
"at" : { "x" : 232, "y" : 256 }
"at" : { "x" : 232, "y" : 304 }
},
"connect" : { "id" : "f11", "to" : "f10" }
"connect" : { "id" : "f15", "to" : "f7" }
}, {
"id" : "f10",
"id" : "f12",
"type" : "Alternative",
"visual" : {
"at" : { "x" : 424, "y" : 80 }
},
"connect" : [
{ "id" : "f17", "to" : "f6", "label" : {
"name" : "exit"
}, "condition" : "in.productID.length() == 0" },
{ "id" : "f9", "to" : "f14", "label" : {
"name" : [
"edit",
"product"
]
} }
]
}, {
"id" : "f14",
"type" : "DialogCall",
"name" : "List all products",
"name" : "Product Detail",
"config" : {
"dialogId" : "com.axonivy.demo.masterdetail.ProductList",
"startMethod" : "start(com.axonivy.demo.masterdetail.ui.ProductLazyDataModel)",
"dialogId" : "com.axonivy.demo.masterdetail.ProductDetail",
"startMethod" : "start(String)",
"call" : {
"params" : [
{ "name" : "lazyModel", "type" : "com.axonivy.demo.masterdetail.ui.ProductLazyDataModel" }
{ "name" : "id", "type" : "String" }
],
"code" : [
"import com.axonivy.demo.masterdetail.ui.ProductRepoLazyDataModel;",
"",
"param.lazyModel = new ProductRepoLazyDataModel();"
]
"map" : {
"param.id" : "in.productID"
}
}
},
"visual" : {
"at" : { "x" : 408, "y" : 256 }
"at" : { "x" : 424, "y" : 200 }
},
"connect" : { "id" : "f4", "to" : "f1" }
"connect" : { "id" : "f16", "to" : "f7", "via" : [ { "x" : 248, "y" : 200 } ] }
} ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@
public class DaoServiceRegistry {

private static ProductRepoDAO productRepoDAO = null;
private static ProductDatabaseDAO productDatabaseDAO = null;

public static ProductRepoDAO getProductRepoDAO() {
if(productRepoDAO == null) {
productRepoDAO = new ProductRepoDAO();
}
return productRepoDAO;
}

public static ProductDatabaseDAO getProductDatabaseDAO() {
if(productDatabaseDAO == null) {
productDatabaseDAO = new ProductDatabaseDAO();
}
return productDatabaseDAO;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,4 @@ public static void createAndSaveBusinessTestData() throws ParseException {
DaoServiceRegistry.getProductRepoDAO().save(product);
}
}

public static void createAndSaveDatabaseTestData() throws ParseException {
for(Product product : createTestData()) {
DaoServiceRegistry.getProductDatabaseDAO().save(product);
}
}
}
Loading