hungsama / struts2-jquery

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

Dialog opened with wrong POST arguments. #945

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?

I setup an edit link as follows:

<s:url id="editUrl" action="edit" namespace="/authorizations/fields"> 
  <s:param name="id">1</s:param>
</s:url>
<sj:a openDialog("recordDialog" href="%{#editUrl}">Record 1</sj:a>  

Near the bottom of the page I have a submit link as follows:
<s:url id="createUrl" action="create" namespace="authorizations/fields"/>
<sj:submit value="Create New" openDialog="recordDialog" href="%{#createUrl}"/>

<sj:dialog 
  id="recordDialog" 
  position="[100,100]" 
  width="525" 
  autoOpen="false"
  modal="true"
  resizable="false"
/>

When I click on the anchor link, the dialog opens with the record passing ID=1 
in the POST parameters.  When I close the dialog and click the CREATE button, 
the create action is invoked, but the ID=1 parameters are again sent in the 
POST payload to the server.

What is the expected output? What do you see instead?

The expected output would be that when hitting the CREATE submit button, no ID 
value would be posted to the server during this request.  Instead, I see that 
ID is posted based on whatever was initially posted.

Which struts2 version?
2.3.4

Which struts2-jquery plugin version?
Was using 3.3.3, experienced this problem.  
Updated to 3.5.1 and still persists.

Please provide any additional information below.

Original issue reported on code.google.com by cranc...@gmail.com on 6 Feb 2013 at 10:32

GoogleCodeExporter commented 9 years ago
The anchor link is actually:

<sj:a openDialog="recordDialog" href="%{#editUrl}">Record 1</sj:a>

Sorry for the typo.

Original comment by cranc...@gmail.com on 6 Feb 2013 at 10:33

GoogleCodeExporter commented 9 years ago
I downloaded struts2-jquery-Grid 3.5.1

<s:url id="editUrl" action="editAction" >

When i am trieng to  edit the row row is editable but when i press enter row is 
not being saved and displayed
 <sjg:grid ...
        editurl="%{editurl}"
        editinline="true"

    ... >

Original comment by jem....@gmail.com on 27 Apr 2013 at 10:53