【问题标题】:APEX row selectorAPEX 行选择器
【发布时间】:2019-10-15 20:14:41
【问题描述】:

我正在交互式网格上显示我的结果。我希望能够选择多行并单击将打开“编辑”表单的编辑按钮。我有很多问题:

  1. 检索所选行的汽车 ID。 (我无法访问列值,我可以访问项目值)
  2. 将 id 集合或数组传递给编辑表单。
  3. 保存集合。

不小心在答案框中添加了更多代码…………..

【问题讨论】:

  • 请参阅 Monica Godoy 的以下博客文章,了解一个很好的示例,让您走得更远:blogs.oracle.com/apex/… 至于将模式页面中的值代理到父页面,请参阅最后两部分这篇较早的博文:danielmcghan.us/2016/03/… 结合两篇博文中的概念应该可以帮助您,但如果您需要更多帮助,请告诉我们。

标签: oracle-apex


【解决方案1】:

我取得了一些进展,但我有点卡住了。我关注了 oracle 博客,它很有帮助。所以在区域的属性上我添加了以下代码:

function (config) {
  var $ = apex.jQuery,
  toolbarData = $.apex.interactiveGrid.copyDefaultToolbar(),
  toolbarGroup = toolbarData.toolbarFind("actions3");

  toolbarGroup.controls.push(
  {
    type: "BUTTON",
    action: "updateCar",
    label: "Edit Selected Cars",
    hot: true,
  });

   config.toolbarData = toolbarData;
   config.initActions = function (actions)
   {
      // Defining the action for activate button
     actions.add(
     {
       name: "updateCar",
       label: "Edit Selected Cars",
       action: updateCar
     });
   }

  function updateCar(event, focusElement)
  {
    var i, records, model, record,
    view = apex.region("ig_car").widget().interactiveGrid("getCurrentView");

     var vid = "";
     model = view.model;
     records = view.getSelectedRecords();
     if (records.length > 0)
     {
       for (i = 0; i < records.length; i++)
       {
         record = records[i];
         //alert("Under Development " + record[1]);
         vid = vid + record[1] + "||";
         apex.item("P18_CAR").setValue(vid);// This is not needed just to test 
          //the output
     // call next page
         // pass array as sql source or directly on page 
       }
      }
    }
  return config;
 } 

这行得通。将显示一个按钮,并在选择时从交互式网格中获取值。我被卡住的部分是如何调用下一页并将多个值(2列)传递给要显示的页面并在查询中进行更新。

谢谢你能帮我完成这个!

【讨论】:

    猜你喜欢
    • 2020-02-17
    • 2020-04-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-03
    • 2016-02-05
    • 1970-01-01
    • 2017-05-16
    相关资源
    最近更新 更多