Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:08:25+00:00 2026-06-17T19:08:25+00:00

I have a struts2-Jquery grid. It is required that on double clicking a grid

  • 0

I have a struts2-Jquery grid. It is required that on double clicking a grid row
the grid row key should be caputerd and a struts2 action(returning json) to be called which fetches details from database corresponding to key and shows result in jquery dialog.
I implemented in following way but the dialog was not populating because the mapping is not correct .

I then used session to store and read at jsp but it shows same value every time

I need a help to find out how to know

$("#detailDialog").load("<s:url value="my-dialogAction"/>"+"?gridKey="+key);     
should returns success and only then to publish   
$.publish('loadSuccessConfirm');    

Code snippets

———Jquery grid code ———

< sjg:grid id="mytable" ..   
.. ..  
onDblClickRowTopics="popup"  
>  

< sjg:gridColumn .. />   
< sjg:gridColumn .. /> ..  

————-java script—

< script type="text/javascript" >  
$.subscribe('popup', function(event, data) {  
    var key = $("#mytable").jqGrid('getGridParam','selrow');  
    $("#detailDialog").load("<s:url value="my-dialogAction"/>"+"?gridKey="+key);  
    $.publish('loadSuccessConfirm');  

});  

< /script> 

—————-dialog————

< sj:div id="detailDialog" name="detailDialog" >  
< sj:dialog position="center" height="200" width="500" openTopics="loadSuccessConfirm"   name="dialog1"  id="dialog1" autoOpen="false"  >  

    < s:iterator value="#session.comparePorts" status="stat" var="stack">  
        < tr>  
        < td><s:property value="#stack.airPortFrom"/> </td>  
        < td><s:property value="#stack.transportMode"/></td>  
        < td><s:property value="#stack.svc"/></td>    
        < td><s:property value="#stack.calcCostLoad"/></td>  

        < /tr>  
        <  /s:iterator>  

< /sj:dialog>   

< /sj:div>  

Update

I edited script code as below and it publishes after success but still dialog shows stale value and is not getting refreshed

$.subscribe('popup', function(event, data) {
    var key = $("#mepctable").jqGrid('getGridParam','selrow');
    $("#detailDialog").load("<s:url value="my-dialogAction"/>"+"?gridKey="+key,
        function() { alert("success");$.publish('loadSuccessConfirm');});

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:08:26+00:00Added an answer on June 17, 2026 at 7:08 pm

    The <s:property /> tag is evaluated at page render time and it would not be changed.

    May be you should put the dialog content as another jsp/action and use ajax to call that page using the href attribute of <sj:dialog />. And to use listenTopics to make the dialog reload when there’s a double click on the row.

    https://code.google.com/p/struts2-jquery/wiki/DialogTag

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a struts2 action that builds a form and pre-populates the fields with
I have a Struts 2 action returning a JSON result. {columns:[coupon,CM,CM+1,CM+2,CM+3],couponList:[{coupon:3.0,CM:88.2323,CM+1:89.45,CM+2:132.3128125,CM+3:32.82},{coupon:3.5,CM:25,CM+1:3125,CM+2:333,CM+3:5}],Caption:30 Yr Fixed} I
i have a jsp page with struts2 jquery grid. I want to show errors
I have this code here that uses struts2-jquery plugin <h4>Choose A task</h4> <ul> <s:url
I have a Struts2 action in the server side for file downloading. <action name=download
I have the following form in a Struts2 JSP that contains some radio buttons.
I am working on struts2. In my action class I have written some accessors
I have this error when I try to include the tag ( http://code.google.com/p/struts2-jquery/wiki/HeadTag )
I am using struts 2.3.7, struts2-jquery-grid-plugin-3.5.0 and hibernate 3.6. I want to reload the
I have the following code to do a doubleselect using Struts2 and the jquery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.