0

While using the Strust2Jquery(3.7.1) plugin, I am ran into a brick wall with this. Would you gurus please share your wisdom with me.

I would like to have a dialog (sj:dialog modal) display. It contains 3 tabs, each of the tabs has a grid that retrieves data from the server.

this is what I currently have:

                    <div id="myStatusTab">
                        <s:hidden id="myUniqueValue" name="myUniqueValue" value="%{myUniqueValue}" />
                        <s:hidden id="myOtherUniqueValue" name="myOtherUniqueValue" value="%{myOtherUniqueValue}" />

                        <s:url id="getDataStatuses" action="getDataStatuses?myOtherUniqueValue=%{myOtherUniqueValue}&myUniqueValue=%{myUniqueValue}" namespace="/" />
                        <s:url id="updateAddDataStatuses" action="updateData?myOtherUniqueValue=%{myOtherUniqueValue}&myUniqueValue=%{myUniqueValue}" namespace="/" />

                        <sjg:grid id="myGridStatuses" 
                            caption=" Status of Current" 
                            dataType="json"
                            autoencode="false" 
                            href="%{getDataStatuses}" 
                            editurl="%{updateAddDataStatuses}"
                            gridModel="myDataStructure"
                            rownumbers="true"
                            multiselect="false"
                            navigator="true"
                            navigatorEdit="false"
                            navigatorAdd="false"
                            navigatorDelete="false"
                            navigatorSearch="false"
                            navigatorView="false"
                            navigatorRefresh="true"
                            rowNum="-1"
                            groupText="['<b>{0} </b>']"
                            groupField="['statusParent']"
                            groupColumnShow="[false]"
                            navigatorEditOptions="{height:500, width:300}"
                            editinline="true"
                            viewrecords="false"
                            pager="true"
                            hidegrid="false"
                            footerrow="false"
                            indicator="gridinfo"
                            >
                            ...

                            //contains needed columns and proper closing tags

                        </div>
                        <div id="myTestDatesTab" >
                        ...
                        </div>
                    </sjg:grid>

I have multiple records that would call on this sj:dialog passing it myUniqueData and myVeryUniqueData.

My question is What would the hyperlink need to look like to get this done?

I have tried from my jsp:

    $("#dtrDialog").attr("src","getDataStatuses?myOtherUniqueValue="+myOtherUniqueValuegNumber+"&myUniqueValue="+myUniqueValue);
    $("#dtrDialog").dialog('open');

but the call to the db does not occur. any questions/input/suggestions would be very much appreciated.

  • Well...I want to thank @Karthick for posting their solution. I modified it some and was finally able to get this working. ` $("#dgJobsDetailMain").jqGrid('setGridParam',{url:'/context/action_name?param1='+value1+"&param2="+value2}).trigger("reloadGrid"); ` – Tom Tomaston May 20 '16 at 19:25
  • I still wish there were a better way to pass parameters from the grid to the action class and back that was a bit simpler. Also, using JQuery (as in above sample) to modify the url does not pass the url values back to the jsp on the response. JUST FYI. – Tom Tomaston May 26 '16 at 21:15

0 Answers0