====== DrillDown Object на Form Applet ======
Первоисточник [[https://docs.oracle.com/cd/B40099_02/books/OTR/OTRObjTypesList87.html|bookshelf]]
DrillDown Object предоставляет пользователю возможность создать на поле List Applet Hyperlink при нажатии на который произойдет переход на другой View.\\
Важной оговоркой является что **You can configure Drilldown objects for list applets only.**\\
Но не стоит унывать, ниже я опишу как реализовать Driildown Object на Form Applet.
**Properties**
^Property^Description/Usage^
|Business Component|Название BC((Business Component)) в который будет проваливаться пользователь|
|Destination Field|Название Field в Destination BC ((Business Component)) значение которого должно быть равно значению в Source BC ((Business Component)). Если не указано никакого значение значит указано значение Id.|
|Hyperlink Field|Filed в BC ((Business Component)) на котором появится Drilldown.|
|Menu Text|**Не используется**|
|Name|Название Drilldown objects.|
|Sequence|Числовое значение определяющее последовательность сортировки|
|Source Field|Название поля, значение которого используется как Search Specification Destination Field.\\ **Если вы не указываете business component Property не указывайте Source Field**|
|View|View которое отобразиться после того как пользователь перейдет по Hyperlink|
|Visibility Type|A property that, when row ID-based drilldown is employed from an applet to a specific destination record, specifies a different visibility type (All, Sales Rep, Manager, or Personal) than the default visibility for the destination business component.|
===== Создание Drilldown Object =====
Прежде чем создать Drilldown Object на Form Applet необходимо добавить следующие Control:
^Name^Field^Caption - String Override^HTML Type^Method Invoked^
|Campaign Name|Campaign Name|Маркетинговое предложение|Text| |
|Campaign Name2|Campaign Name|Маркетинговое предложение|Link|Drilldown|
Создаем Drilldown Object:
^Name^Hiperlink Field^View^
|Campaign Name|Campaign Name|Call Center View|
Добавляем Control на Web Template и все компилируем.\\
При нажатии на Hyperlink "Маркетинговое предложение" мы перейдем на вид Call Center View.
{{drilldown01.png?nolink&800|}}
===== Создание нескольких Drilldown Object =====
Для создания двух Drilldown object добавляем следующие Control:
^Name^Field^Caption - String Override^HTML Type^Method Invoked^
|Campaign Name|Campaign Name|Маркетинговое предложение|Text| |
|Campaign Name2|Campaign Name|Маркетинговое предложение|Link|Drilldown|
|BCC Quote Name|BCC Quote Name|Коммерческое предложение|Text| |
|BCC Quote Name2|BCC Quote Name|Коммерческое предложение|Link|Drilldown|
=== Без обработки Server Script ===
Далее создаем необходимые нам Drilldown Object на соответствующие Field:
^Name^Hiperlink Field^View^
|Campaign Name|Campaign Name|Call Center View|
|BCC Quote Name|BCC Quote Name|Last Call Center View|
//При необходимости надо указать дополнительные Property//
=== При необходимости обработки Server Script ===
==== Browser Script ====
function Applet_PreInvokeMethod (name, inputPropSet)
{
if(name=="Drilldown")
{
var SWEFieldParts = inputPropSet.GetProperty("SWEField").split("_");
theApplication().SetProfileAttr("BCC_Drilldown_Field",SWEFieldParts[3]);
//alert(theApplication().GetProfileAttr("BCC_Drilldown_Field"));
}
return ("ContinueOperation");
}
====Manifest File====
На примере AL Service Request List Applet With Navigation
//Regenerate using:https://duncanford.github.io/prpm-code-generator/?prpm=PM&object=DesktopList&name=ALServiceRequestListAppletWithNavigation&userprops=&comments=Yes&logging=No
if (typeof(SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM) === "undefined") {
SiebelJS.Namespace("SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM");
define("siebel/custom/ALServiceRequestListAppletWithNavigationPM", ["siebel/listpmodel"],
function () {
SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM = (function () {
function ALServiceRequestListAppletWithNavigationPM(pm) {
SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM.superclass.constructor.apply(this, arguments);
}
SiebelJS.Extend(ALServiceRequestListAppletWithNavigationPM, SiebelAppFacade.ListPresentationModel);
ALServiceRequestListAppletWithNavigationPM.prototype.Init = function () {
// Init is called each time the object is initialised.
// Add code here that should happen before default processing
SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM.superclass.Init.apply(this, arguments);
// Add code here that should happen after default processing
this.AddMethod("InvokeMethod", PreInvokeMethod, {sequence: true, scope: this});
}
ALServiceRequestListAppletWithNavigationPM.prototype.Setup = function (propSet) {
// Setup is called each time the object is initialised.
// Add code here that should happen before default processing
SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM.superclass.Setup.apply(this, arguments);
// Add code here that should happen after default processing
}
function PreInvokeMethod(methodName, psInp, lp, returnStructure) {
//console.log("methodName=" + methodName);
//console.log("psInp=" + psInp);
//console.log("SWEField=" + psInp.GetProperty("SWEField"));
if(methodName=="Drill"+"down"){
var SWEFieldParts = psInp.GetProperty("SWEField").split("_");
theApplication().SetProfileAttr("BCC_Drilldown_Field",SWEFieldParts[3]);
SiebelApp.S_App.uiStatus.Free();
returnStructure["ContinueOperation"] = true;
}
}
return ALServiceRequestListAppletWithNavigationPM;
}()
);
return "SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM";
})
}
1. Скопировать файл 'ALServiceRequestListAppletWithNavigationPM.js' в папку 'applicationcontainer_external/siebelwebroot/scripts/siebel/custom'
2. Администрирование - Приложения -> Manifest Files - добавить новую запись
- Inactive Flag = false
- Наименование 'siebel/custom/ALServiceRequestListAppletWithNavigationPM.js'
3. Администрирование - Приложения -> Manifest Administration - добавить новую запись
- Inactive Flag = false
- Type = Applet
- Usage Type = Presentation Model
- Наименование = 'AL Service Request List Applet With Navigation'
4. Администрирование - Приложения -> Object Expression
- Inactive Flag = false
- Level = 1
4. Администрирование - Приложения -> Files
- Inactive Flag = false
- Последовательность = 1
- Наименование = 'siebel/custom/ALServiceRequestListAppletWithNavigationPM.js'
Создаем необходимые нам Drilldown Object на соответствующие Field:
^Name^Hiperlink Field^View^
|Campaign Name|Campaign Name| |
|BCC Quote Name|BCC Quote Name| |
//Property View оставляем пустым//
Создаем Server script в котором используем [[escript:GotoView Method]]
if (MethodName=="Drilldown")
{
switch (TheApplication().GetProfileAttr("Drilldown_Field"))
{
case "24": TheApplication().GotoView("Call Center View");
break;
case "25": TheApplication().GotoView("Last Call Center View");
break;
default:
return (ContinueOperation);
break;
} return (CancelOperation);
}
{{drilldown02.png?nolink&800|}}
--- //[[admin@siebelwiki.com.ua|wiki_admin]] 2014/12/02 09:05//
{{tag>Drilldown}}