Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Learn about step to summary data by using Ajax.
Requirement
System must calculate Total Price of all Supplier records to Summary Price of Oder Request Item.
Procedure
1. From ONEWEB workspace, create java file name "com.manual.doc.order.ajax.CalculateOrderRequestItemSummaryPrice" in MasterWeb and override method "processManual()" with coding below.
1.1. Go to App Designer and open entity "Doc Order Request Item - Back Office" then click edit at module "Supplier" and find module id at property name "Module ID" 1.2. Replace "MD8321225761_session" with module id from step 1.1 (concate module id with "_session")
2. From ONEWEB workspace, open java file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" and add new function with coding below.
2.1. Replace "MD8321225761" at function name with module id from step 1.1 2.2. Go to App Designer and open entity "Doc Order Request Item - Back Office" then click edit at module "Order Item" and find module id at property name "Module ID" 2.3. Replace "MD9443222701" with module id from step 2.2
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.ajax.CalculateOrderRequestItemSummaryPrice" and java script file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" will update to server.
4. Test by log in to FrontWeb. 4.1. Login with Back Office user. 4.2. Go to To Do List and claim job. 4.3. Click edit Order Item. 4.4. Click edit Supplier and save. 4.5. The system must calculate summary to Summary Price.
When creating an app, we need much more complex features than basic CRUD operations. We need additional data processing, data validation and data conversion capabilities as well. We will learn about how we can do these on App Designer using customization.
Learn about step to calculate remain order unit at back office screen. 1. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" in MasterWeb and override method "modifyInsertMany(String moduleID, HashMap hStoreHashMap, String processMode, int row)" with coding below.
2. Replace "MD9443222701_session" with module id of module "Order Item" in entity "Doc Order Request Item - Back Office" (concatenate module id with "_session") Click edit at module "Order Item" and find module id at property name "Module ID"
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" will update to server.
4. Go to App Designer and open entity name "Doc Order Request Item - Back Office" to edit.
5. From Tools > Action drag Module Action to the box under module Supplier (Tab Supplier List). The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Change Process Name to "UPDATE" Put "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" to Class Action. Click OK.
6. Click Save this Entity.
7. Test by log in to FrontWeb. Login with Back Office user. Go to To Do List and claim job. Click edit Order Item. Click edit Supplier. The system must calculate remain order unit.
Learn about step to validate one to many record when submit. 1. From ONEWEB workspace, open java file name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" and override method "validateResult()" with coding below.
2. Replace "MD11784591_session" with module id of module "Order Request Item" in entity "Doc Order Request - Requester" (concatenate module id with "_session") Click edit at module "Order Request Item" and find module id at property name "Module ID"
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" will update to server.
4. Test by log in to FrontWeb. Click menu SETTING > Refresh Cache to update new configuration at App Designer to server. Click menu DOC Order Request and click CREATE. Submit without adding oder request item.
Learn about step to customize validate data with DAO.
Requirement
For all order items, summary of all "Order Unit" at module supplier list must equal to "Unit" of order item.
Procedure
1. From ONEWEB workspace, create java file name "com.manual.service.ManualJDBCServiceLocator" in MasterWeb with coding below.
2. From ONEWEB workspace, create java file name "com.manual.doc.order.dao.ManualDocObjectDAO" in MasterWeb with coding below
3. From ONEWEB workspace, create java file name "com.manual.doc.order.dao.ManualDocOrderDAO" at MasterWeb with coding below.
4. From ONEWEB workspace, create java file name "com.manual.doc.order.dao.ManualDocOrderDAOImpl" at MasterWeb with coding below.
5. From ONEWEB workspace, create java file name "com.manual.service.ManualDAOFactory" at MasterWeb with coding below.
6. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestBackOfficeUpdateMode" at MasterWeb with coding below.
7. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name from step 1-6 will update to server.
8. Test by logging in to FrontWeb. 8.1. Login with Back Office user. 8.2. Go to To Do List and claim job. 8.3. Click save or submit. 8.4. If found at least one record of order item that Unit not equal to summary of order unit, the system must show error message "Please verify un-assign order unit."
Learn about step to customize validate data with DAO.
Requirement
For all order items, summary of all "In Stock" at module supplier list must not less than "Unit" of order item.
Procedure
1. From ONEWEB workspace, open java file name "com.manual.doc.order.dao.ManualDocOrderDAO" at MasterWeb and add new method with coding below.
public int countInCompleteInStock(String requestID) throws Exception;
2. From ONEWEB workspace, open java file name "com.manual.doc.order.dao.ManualDocOrderDAOImpl" at MasterWeb and add new method with coding below.
3. From OneWeb workspace, create java file name "com.manual.doc.order.java.OrderRequestAdminUpdateMode" at MasterWeb with coding below.
4. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name from step 1-3 will update to server.
5. Test by log in to FrontWeb. 5.1. Login with Admin user. 5.2. Go to To Do List and claim job. 5.3. Click save or submit. 5.4. If found at least one record of order item that Unit more than summary of In Stock, the system must show error message "Please verify supplier stock."
Learn about step to validate Order Unit and auto calculate Total Price after changing Order Unit. Requirement 1. Order Unit must <= In Stock and Order Unit must <= Remain Order Unit. 2. Auto calculate Total Price after changed Order Unit.
Procedure 1. From ONEWEB workspace, create javascript file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" in MasterWeb and override method "modifyInsertMany(String moduleID, HashMap hStoreHashMap, String processMode, int row)" with coding below.
2. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The javascript file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" will update to server.
3. Go to App Designer and open entity name "Doc Order Request Item - Back Office" to edit.
4. From Tools > Action drag Entity Action to the box under entity name. The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Change Process Name to "UPDATE". Put "/MasterWeb/manual/js/doc/order/order_request_item_back_office_update_mode.js" to Script File. Click OK.
5. Click Save this Entity.
6. Test by log in to FrontWeb. Login with Back Office user. Go to To Do List and claim job. Click edit Order Item. Click edit Supplier. The system must calculate remain order unit.
Learn about how to summary data from all one to many records after save child entity.
Requirement
System must calculate total amount of all Supplier records to Summary Price of Oder Request Item.
Procedure
1. From ONEWEB workspace, open java file name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" and override method "modifyResult()" with coding below.
1.1. Go to App Designer and open entity "Doc Order Request - Back Office" then click edit at module "Order Request Item" and find module id at property name "Module ID". 1.2. Replace "MD1290242832_session" with module id from step 1.1 (concatenate module id with "_session"). 1.3. Replace "MD1290242832" with module id from step 1.1. 1.4. Go to App Designer and open entity "Doc Order Request - Back Office" then click edit at module "Order Request" and find module id at property name "Module ID". 1.5. Replace "MD7333074691" with module id from step 1.4. 1.6. Go to App Designer and open entity "Doc Order Request Item- Back Office" then click edit at module "Order Item" and find module id at property name "Module ID". 1.7. Replace "MD9443222701" with module id from step 1.6
2. Go to App Designer and open entity "Doc Order Request - Back Office" then click edit at entity action "UPDATE". 2.1. On Action Field Configuration put "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" to Class Action. 2.2. Click OK. 2.3. Click Save this Entity.
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" will update to server.
4. Test by log in to FrontWeb. 4.1. Login with Back Office user. 4.2. Go to To Do List and claim job. 4.3. Click edit Order Item. 4.4. Click edit Supplier and save. 4.5. Click save at child entity. 4.6. System must calculate Summary Price to Total Amt.
Learn about step to get login user and put to field name "Requester" on screen. 1. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" in MasterWeb with coding below.
2. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The new class name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" will deploy to server.
3. Go to App Designer and open entity name "Doc Order Request - Requester" to edit.
4. From Tools > Action drag Entity Action to the box under entity name. The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Put "com.manual.doc.order.java.OrderRequestRequesterSearchMode" to Class Action. Click OK.
5. Click Save this Entity.
6. Test by log in to FrontWeb. Click menu SETTING > Refresh Cache to update new configuration at App Designer to server. Click menu DOC Order Request and click CREATE. Login user will autometic put to field Requester.
Learn about step to get login user and add to search criteria. 1. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestRequesterSearchMode" in MasterWeb with coding below.
2. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The new class name "com.manual.doc.order.java.OrderRequestRequesterSearchMode" will deploy to server.
3. Go to App Designer and open entity name "Doc Order Request - Requester" to edit.
4. From Tools > Action drag Entity Action to the box under entity name. The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Put "com.manual.doc.order.java.OrderRequestRequesterSearchMode" to Class Action. Click OK.
5. Click Save this Entity.
6. Test by log in to FrontWeb. Click menu SETTING > Refresh Cache to update new configuration at App Designer to server. Click menu DOC Order Request and click SEARCH. Result will display only record that create by Requester who login.