Customizing CSC application
Customize panel pages:
Customized panel jsp(/panels/xxx/xxx.jsp) should be configured in serviceFramework.xml as below
<?xml version="1.0" encoding="UTF-8"?>
<framework-template
xsi:noNamespaceSchemaLocation="http://www.atg.com/xsds/FrameworkDataSpecification.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<panel-definition>
<id>
cmcOrderSearchP
</id>
<app-id>
workspace
</app-id>
<enabled-yn>
true
</enabled-yn>
<object-type>
PanelDefinition
</object-type>
<resource-bundle>
atg.commerce.csr.FrameworkResources
</resource-bundle>
<template-ids>
<map-entry>
<key>
panelTemplate
</key>
<value>
panelTemplate
</value>
</map-entry>
</template-ids>
<panel-id>
cmcOrderSearchP
</panel-id>
<content-url>
/panels/order/search.jsp
</content-url>
<other-context>
xxxagent
</other-context>
<title-key>
cmcOrderSearchP
</title-key>
<visible-yn>
true
</visible-yn>
<show-title-yn>
true
</show-title-yn>
<panel-open-yn>
true
</panel-open-yn>
<allow-panel-toggle-yn>
false
</allow-panel-toggle-yn>
<available-yn>
false
</available-yn>
<content-open-yn>
true
</content-open-yn>
<allow-content-toggle-yn>
false
</allow-content-toggle-yn>
<tab-holder-yn>
false
</tab-holder-yn>
<always-tabbed-yn>
false
</always-tabbed-yn>
<tabbed-yn>
false
</tabbed-yn>
<allow-tabbing-yn>
false
</allow-tabbing-yn>
<allow-slots-yn>
false
</allow-slots-yn>
<tab-scroll-index>
0
</tab-scroll-index>
<panel-item-count>
0
</panel-item-count>
<access-right>
cmcOrderSearchP
</access-right>
</panel-definition>
</framework-template>
Make sure to update new context root as above xml otherwise it will take OOB JSP. Customized jsp should be modified only with dynamic content. Everything else should be same as OOB jsp.
Order Search Page:
1. Create property file as below
File: (atg/commerce/custsvc/ui/fragments/order/OrderSearchDefault.properties)
URL=/include/order/orderSearchUIFragment.jsp
servletContext=XXXagent(webapp contextroot)
Get OOB orderSearchUIFragment.jsp and add custom properties.Custom properties should have same div classes as OOB .Only dynamic content should be updated.Everything else should be same as OOB jsp.
Ideally OrderSearchDefault.properties should point to default (OOB) jsp and OrderSearchExtended.properties should point to extended jsp. But in this example, mixed up OOB properties and extended properties into single jsp. OOB jsp got overriden completely
Other way of customizing JSP:
OrderSearchResults page:
2. File: atg/commerce/custsvc/ui/fragments/order/OrderViewExtended.properties
URL=/include/order/orderViewUIFragment.jsp
servletContext=XXXagent
In this example,we dont modify/touch OrderViewDefault.properties.
Only custom properties will be added with same div classes as OOB jsp into OrderViewExtended.properties. OOB Jsp is not overriden here. Both JSP will get executed.
Disabling properties:
3. if we dont want to display specific property in order search results table. Follow below steps.
Ex : atg/commerce/custsvc/ui/tables/order/search/WorkOn.properties
enable=false
Here WorkOn property is disabled for not showing
Here WorkOn property is disabled for not showing
4. Other way is to remove properties:
File: atg/commerce/custsvc/order/OrderSearchUIConfiguration
Update 'columns' list by removing any properties.
columns=\ /atg/commerce/custsvc/ui/tables/order/search/Toggle,\ /atg/commerce/custsvc/ui/tables/order/search/ViewLink,\ /atg/commerce/custsvc/ui/tables/order/search/LastName,\ /atg/commerce/custsvc/ui/tables/order/search/FirstName,\ /atg/commerce/custsvc/ui/tables/order/search/Total,\/atg/commerce/custsvc/ui/tables/order/search/ItemsReturned,\/atg/commerce/custsvc/ui/tables/order/search/DateSubmitted,\ /atg/commerce/custsvc/ui/tables/order/search/Originator,\ /atg/commerce/custsvc/ui/tables/order/search/State,\ /atg/commerce/custsvc/ui/tables/order/search/WorkOn
Customizing properties:
File: atg/commerce/custsvc/ui/tables/order/search/ColumnRendererPage.properties
servletContext=/xxxagent
Customize jsp (webapp/include/order/search/columnRenderer.jsp) as per the example(1) given.
This example to customize order search results table(Not order search results details page)
To turn on debug mode
If you want to see the jsp's being used in panel's or To turn on debug mode, set the
To turn on debug mode
If you want to see the jsp's being used in panel's or To turn on debug mode, set the
useDebugPanelStackMode property of the /atg/svc/agent/ui/AgentUIConfiguration to true.
Comments
Post a Comment