【问题标题】:Passing Row Data from Oro Crm/ Platform Data Grid to a Controller将行数据从 Oro Crm/平台数据网格传递到控制器
【发布时间】:2018-06-23 05:10:36
【问题描述】:

我创建了一个数据网格并使用oro/data_grids.yml 配置显示数据

datagrids:
app-demo-grid:
    source:
        type: orm
        query:
            select:
                - po.itemId
                - po.itemName
                - po.itemDescription

            from:
                - { table: DemoBundle:PurchaseOrder, alias: po }
    columns:
        itemId:
            label: Item ID
            frontend_type: integer
        itemName:
            label: Item Name
            frontend_type: string

    actions:
        send:
            type: navigate
            label: Send to Url
            link: send_link
            icon: send
            rowAction: true

问题:从网格操作向控制器传递参数 - 发送不起作用。我的请求中没有更多参数。

【问题讨论】:

    标签: symfony orocrm


    【解决方案1】:

    您应该配置属性“send_link”。

    app-demo-grid:
        source:
            type: orm
            query:
                select:
                    - po.itemId
                    - po.itemName
                    - po.itemDescription
    
                from:
                    - { table: DemoBundle:PurchaseOrder, alias: po }
        columns:
            itemId:
                label: Item ID
                frontend_type: integer
            itemName:
                label: Item Name
                frontend_type: string
        properties:
            send_link:
                type:   url
                route:  your_route_for_send_link_action
                params:
                    id: itemId
        actions:
            send:
                type: navigate
                label: Send to Url
                link: send_link
                icon: send
                rowAction: true
    

    有关属性配置的更多信息,请查看documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-13
      • 2015-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-09
      相关资源
      最近更新 更多