BIANEMohamed / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

Change SubGridUrl Action onSubGridRowExpanded of parent grid #1128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )

What steps will reproduce the problem?
1. I have grid parent and one as subgrid
2. When I open the subgrid onSubGridRowExpanded of grid parent i need to pass 
one more parameter at the action
3. how do it?

this code example:

<sjg:grid id="gridtable"
       dataType="json"
       href="%{remoteUrl}" onSubGridRowExpanded="rowExpandedFn"
       gridModel="gridModel"
           key="id" autowidth="true" rownumbers="true">

        <sjg:grid id="subGrid" dataType="json"
            subGridUrl="%{remoteUrlSubGrid}"
            gridModel="gridModelSubGrid"            
            rownumbers="true">
[...]
<script>
$(function() {
 $.subscribe('selezionaRiga', function(event, data) {
    event.originalEvent.proceed= true;
    var additionalparam = $("#additionalparam").val();
    $("#subGrid").jqGrid(
                'setGridParam',
                {
                    url : 'myaction.action?id=9999999'
                    +  '&param1=' + additionalparam 
                                }).trigger("reloadGrid");
    }); 
}); 

but url of action doesn't have param1
...\myAction.action?id=1389&&_search=false&nd=1421765261678&rows=20&page=1&sidx=
&sord=asc&_=1421765261678
What is the expected output? What do you see instead?
...\myAction.action?id=1389&param1=true&_search=false&nd=1421765261678&rows=20&p
age=1&sidx=&sord=asc&_=1421765261678

Which struts2 version?
struts2-jquery-plugin-3.5.1.jar

Which struts2-jquery plugin version?
struts2-jquery-grid-plugin-3.5.1.jar

Please provide any additional information below.

Original issue reported on code.google.com by laura.qu...@gmail.com on 20 Jan 2015 at 2:57

GoogleCodeExporter commented 9 years ago
sorry selezionaRiga => rowExpandedFn

Original comment by laura.qu...@gmail.com on 20 Jan 2015 at 2:59