Explain "Ybackoffice" Using Ant Extgen?
Explain "Ybackoffice" Using Ant Extgen?
Explain "Ybackoffice" Using Ant Extgen?
Ans: - ybackoffice template is used to generate your own back office extension
Explain “ybackoffice” using ant extgen?
✓ Step 1 = C:\Softwares\HYBRISCOMM6200P\hybris\bin\platform>ant extgen & Hit Enter
✓ Step 2 = Choose Template for generation = ybackoffice (type ybackoffice) and hit enter.
✓ Step 4 = Choose package name of your extension = com.chennatrainingcourses & other options as false
a) C:\Softwares\HYBRISCOMM6200P\hybris\bin\platform>setantenv.bat
b) C:\Softwares\HYBRISCOMM6200P\hybris\bin\platform>ant clean all
Contact us for more information chennareddytraining@gmail.com (Java–Salesforce–SAP Portal–UI5/Fiori–Hybris)
c) C:\Softwares\HYBRISCOMM6200P\hybris\bin\platform>hybrisserver.bat
d) https://localhost:9002 platform update (Select only "Creating essential data") update
✓ Step 9= Goto backoffice and see the results of the new extension (There should “ChennaTraining” node
with “Courses” as subnode / element.
https://localhost:9002/backoffice
✓ Step 10 = Add the new course details by clicking + sign next to the Courses and Save
C:\Softwares\HYBRISCOMM6200P\hybris\ bin\custom\chennatrainingcourses\resources\localization
folder and add the localization in the proper file (let’s do the localization for English)
Filename = chennatrainingcourses-locales_en.properties
✓ Step 2 = Goto https://localhost:9002/backoffice and follow these steps to see the new field
(a) Switch to the Application Orchestrator mode by pressing F4 (you'll need to be logged in as an
administrator).
(b) Click the Hybris logo in the upper right corner of the screen and select the Reset to Defaults option
under Show cockpit-config.xml
(c) After the page reloads, press F4 again to exit Application Orchestrator mode
Note: - Now Build the project, Start Server & Perform Update Operation.
Step 2 = Create editorArea_MyProduct.xml file in your Cockpit extension & add key for new attribute in xml file
Note: - Hybris Cockpit framework is highly customizable. Depending on amount need, we can distinguish
different levels of customization, easy, medium, and expert.
✓ Easy Customization = Can be done by configuration within existing cockpit & needs no own
implementation. The hybris Cockpit framework enables to configure user interface (UI) components
through XML. Each configuration is defined by a code, an object template, UI role, and a XML
configuration file. We can change the configuration defining how an item type is represented in lists,
editors, advanced search, or reference selectors.
✓ Medium Customization = Needs only little implementation, because it can be done by using an existing
cockpit as a template to be modified. Need valid ZK Studio Enterprise Edition license for medium
customization. We can:
o Add own editors for all view types to the system and make them available for configuration.
o Add custom section to editor area.
o Add custom column to list view.
o Add custom sections to navigation or editor area.
✓ Expert Customization = Needs experienced implementation, because it uses the hybris Cockpit
framework independently from the existing cockpits. We need a valid ZK Studio Enterprise Edition
license for expert customization. We can:
o Customize type service and change default types, created by default on base of items and add
the custom extended types to the cockpit type system.
o Implement own perspective by customizing all areas, these are Navigation Area, Browser Area,
and Editor Area.
o Create your own wizard for creating items, pages and page flows.
Business Scenario: - ABC Classification is a frequently used analytical method to classify objects (Customers,
Products or Employees) based on a particular measure (Revenue or Profit).
Your customers are classifying into three classes A, B and C according to the sales revenue they generate.
Threshold values used for individual ABC classes. Example: - All customers generating profit of 0 – 20K
belong to class C, >20K – 80K belong to class B, and >80K belong to class A.
Solution =
Step 1 = Creating ABCLevel Backoffice Extension: -
Backoffice extension can be created by using ant extgen with "ybackoffice" template.
Name your extension = abclevelbackoffice
Package Name = com.sat.abclevelbackoffice
Note: - Do not create a default widget / css file (Answer = false to both)
Finally add it in "localextensions.xml" file.
Now run ant all
Now you have new extension & can import into your IDE.
Note: - If you see any error in IDE because of jar files, then add 5 jar files (cockpitcore-2.0.5.2.jar,
cockpitframework-2.0.5.2.jar, zcommon-6.5.1.1.jar, zk-6.5.1.1.jar & zul-6.5.1.1.jar) in build path.
Step 2 = Modify abclevelbackoffice-backoffice-config.xml to display: - (1) Rewards Status Level
Configuration, (2) Reward Status Levels & (3) Customer Rewards Status as shown in above PIC.
${Path}/hybris/bin/custom/abclevelbackoffice/resources/abclevelbackoffice-backoffice-config.xml.