How to show More record option(button) in the custom sidecar.

Hello,

I have a module Inventory Item where I am showing a custom sidecar on creating records. Sidecar shows on related To Order request Item option and in the sidecar, I am showing other modules (Order Request Item) record lists. Afterload 20 records, I want to add the load more records button(Link).

Please help to customize this.

  • Hi

    Link "Show More" is automatically rendered and triggerable once plugin "Pagination" is loaded in the target view. So I "believe" that the best approach is to make this custom view to inherit from ListView.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hi André Lopes


    "Show More" is not rendering automatically in custom sidecar. Can you explain with example?

    My code:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    $viewdefs['II_Inventory_Item']['base']['layout']['wp-selection'] = array(
    'type' => 'selection-list',
    'components' => array(
    array(
    'layout' => array(
    'type' => 'base',
    'name' => 'main-pane',
    'css_class' => 'main-pane span12',
    'components' => array(
    array(
    'layout' => array(
    'type' => 'filterpanel',
    'availableToggles' => array(),
    'filter_options' => array(
    'stickiness' => false,
    ),
    'components' => array(
    array(
    'view' => 'customWp-selection',
    'context' => array(
    'module' => 'M03_Work_Product',
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    ({
    extendsFrom: 'MultiSelectionListView',
    allowedFields: ["name", "work_product_status_c"],
    initialize: function (options) {
    this._super("initialize", arguments);
    this.collection.reset();
    },
    render: function () {
    this._super("render", arguments);
    this.layout.$el.parent().addClass("span12 wp_selection");
    this.layout.$el.parent().css("width","100%");
    },
    addActions: function () {
    this._super('addActions');
    this.rightColumns = [];
    this.meta.panels[0].fields = _.filter(this.meta.panels[0].fields, function (field) {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    var wpLayout = this.layout.layout.getComponent("dashboard-pane").getComponent("wp-selection");
    var wpView = wpLayout.getComponent("main-pane").getComponent("filterpanel").getComponent("customWp-selection");
    var wpModels = [];
    if (wps.records && wps.records.length > 0) {
    wpModels = wps.records;
    }
    wpView.collection.reset();
    wpView.collection.add(wpModels);
    wpView.render();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thanks 

    Laxmichand saini 

    laxmichand