Monday, 19 October 2015

JQuery Id selector in ADF

Some times we have a requirement like have to write some css changes based on id selector.
The ADF components will rendered with some mixed special characters. For this case if you want to find the id, We need do add '\\' before to the special character.

Example:

ADF Actual Rendered ID:pt1:r1:0:pgl13

JQuery ID selector:

 $("#pt1:r1:0:pgl13");----------It doesn't work

$("#pt1\\:r1\\:0\\:pgl13")-------It works.

ADF Menu | MenuBar | commandMenuItem Skinning

Drop down menus are a common requirement for web applications, In html we can create using elements like ul, li, div e.t.c. In ADF, We can achieve using menuBar and menu components.

The below image is how the dropdown look and feel without applying any custom skinning.












The below image is how the dropdown look and feel after applying skinning.














These are the component structure in an source page.












The below are the skinning selectors for getting above look and feel.

af|menu::bar-item-open-icon-style {
    background-image: url("/images/select-arrow.png");
    height: 16px;
    width: 16px;
    padding-top: 2px;
}

af|menu::bar-item-text {
    color: #666;
    font-size: 14px;
    font-family: openSans-Regular;
}

af|menu::bar-item-text:hover {
    color: #eeaa00;
    font-size: 14px;
    font-family: openSans-Regular;
}

af|menu::bar-item {
    padding: 0px;
    height: 25px;
}

af|menu::bar-item:highlighted {
    background-image: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid #c00;
    padding: 0px;
}

af|menu::bar-item:depressed {
    background-image: none;

background: transparent;
    border: none;
    border-bottom: 2px solid #c00;
        padding: 0px;
}

af|menu:highlighted af|menu::bar-item-open-icon-style {
    background-image: url("/images/select-arrow.png");
    padding-top: 2px;
}

af|menu:depressed af|menu::bar-item-open-icon-style {
    background-image: url("/images/select-arrow.png");
    padding-top: 2px;
}
af|menuBar
{
    overflow: visible !important;
    background: transparent;
    height: 25px;
}
af|commandMenuItem::menu-item-text {
    font-family: openSans-Regular;
    font-size: 13px;
    padding: 5px;
    font-weight: 400;
    color: #333;
    background-color: #f9f9fa;
}
af|menu::child-container
{
    background-color:#f9f9fa;
    min-width: 180px;
    border-top: none;
}
af|commandMenuItem::menu-item-text:hover {
    background: #fcc200 !important;
}
af|commandMenuItem::menu-item-text:active {
    background: #fcc200 !important;
}
af|commandMenuItem::menu-item-icon-style {
    display: none;
}

af|commandMenuItem::menu-item-open-indicator {
    display: none;
}

af|commandMenuItem::menu-item-accelerator {
    display: none;
}

For reference download below sample application.

Wednesday, 14 October 2015

Create Responsibility API


A responsibility is an important configuration which allows the user to navigate to the various menus and form functions within that responsibility.Oracle API is used to load responsibility from one instance to another instance.

The custom responsibility parameters can be passed to the below API to insert data to Oracle standard tables fnd_responsibility and fnd_responsibility_tl  
*fnd_responsibility_pkg.insert_row


Sample script with description to upload the responsibility is explained below.

 fnd_responsibility_pkg.insert_row
     (      x_rowid                       => v_rowid,
            x_responsibility_id           => fnd_responsibility_s.NEXTVAL,
            x_application_id              => 260,          -- Cash Management
            x_web_host_name               => NULL,
            x_web_agent_name              => NULL,
            x_data_group_application_id   => 260,          -- Cash Management
            x_data_group_id               => 0,            -- Standard
            x_menu_id                     => 1012396,      -- CE_CASH_MANAGER
            x_start_date                  => SYSDATE,
            x_end_date                    => NULL,
            x_group_application_id        => NULL,
            x_request_group_id            => NULL,
            x_version                     => 4,
            x_responsibility_key          => 'TEST_RESPONSIBILITY',
            x_responsibility_name         => 'Test Responsibility',
            x_description                 => 'Responsibility for testing',
            x_creation_date               => SYSDATE,
            x_created_by                  => -1,
            x_last_update_date            => SYSDATE,
            x_last_updated_by             => -1,
            x_last_update_login           => -1
     );

--SUDHAN S