New issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415
What steps will reproduce the problem?
1. Code is as below :-
<s:url id="gridBasicUrlId" action="gridBasic" />
<s:url id="gridEditableUrlId" action="gridEditable" />
<sjg:grid id="gridEditableId" caption="jQuery Inline Editing Grid"
dataType="json" href="%{gridBasicUrlId}" gridModel="gridModel"
rowList="5,10,15,20" rowNum="10" width="800"
viewrecords="true" pager="true" sortable="false" navigator="false"
editinline="true" editurl="%{gridEditableUrlId}"
>
<sjg:gridColumn name="username" index="username" title="Username"
key="true"
width="8" resizable="false" align="center" sortable="false"
editable="false"
/>
<sjg:gridColumn name="firstName" index="firstName" title="First Name"
width="10" resizable="false" align="left" sortable="false"
editable="true" edittype="text"
/>
<sjg:gridColumn name="lastName" index="lastName" title="Last Name"
width="10" resizable="false" align="left" sortable="false"
editable="true" edittype="text"
/>
<sjg:gridColumn name="projectCode" index="projectCode" title="Project
Code"
width="10" resizable="false" align="center" sortable="false"
editable="true" edittype="text"
/>
<sjg:gridColumn name="role" index="role" title="Role"
width="8" resizable="false" align="center" sortable="false"
editable="true" edittype="text"
/>
<sjg:gridColumn name="managerName" index="managerName" title="Manager"
width="12" resizable="false" align="center" sortable="false"
editable="true" edittype="text"
/>
<sjg:gridColumn name="emailId" index="emailId" title="Email"
width="20" resizable="false" align="left" sortable="false"
editable="true" edittype="text"
/>
</sjg:grid>
2. The grid is shown correctly on page load.
On click/select of a particular row, the first field 'firstName' is made
available for inline editing
3. now on clicking on any other field of same row, the mouse cursor does
not move to that field.
It stays on the first name column (which is shown inline editable)
4. On clicking tab from keyboard, however the inline editing moves to the
next field 'lastname' and so on.. But on mouse click of a particular field
this behavior is not seen.
5. Just for informaation. on clicking enter, a proper request for editurl
is fired. So that is working well.
What is the expected output? What do you see instead?
On mouse click on a particular field, that field of row should get editable
inline instead of first field always.
Which struts2 version?
2.2.1
Which struts2-jquery plugin version?
2.5.1
Please provide any additional information below.
I can see, that its working in struts2-jquery-showcase-2.5.0 deployed on my
local tomcat. But i cannot understand why its not working in my project.
Let me throw some more light on this.. whats happening is if there are say
6 editable fields in each record, like in the case above.
Then on click of "any" editable cell on a particular record, the cursor
ALWAYS moves to the first editable cell of that row and the cell becomes
editable. "firstName field in the above example i have provided"
Once cursor is on firstName field, and you try clicking on any other cell,
say lastName, the cursor still remains on firstName field.
Only when you 'tab' using the keyboard, would the cursor move to lastName
field, then again 'tab' and it would move to 'projectcode' field and so on.
On changing values and hitting enter, the editurl does get called and new
values get saved in database. So that's good.
I have stripped out all the css, js files from my particular jsp.
It still continues to behave this way. The cursor always moves to first
editable cell irrespective of on which cell you click on the record.
Regards,
Darshan Shroff
shroff...@gmail.com
Again struts2-jquery-showcase-2.5.0 deployed on my local tomcat is running
fine. So i am doing something wrong. I just cant figure out what is it.
Regards,
Darshan Shroff
shroff...@gmail.com
Regards,
Darshan Shroff
shroff...@gmail.com
http://in.linkedin.com/in/darshanshroff
Things do work for me if i have
{{{ cellEdit="true" cellurl="%{gridEditableUrlId}" }}}
instead of
{{{ editinline="true" editurl="%{gridEditableUrlId}" }}}
Kindly resolve this at earliest. This is on urgent priority for us.
If you need information to understand issue in any way. Let me know.
Do i need any of the following from your showcase
jquery.wysiwyg.js
ckeditor.config.js
extendplugin.js
showcase.js
Do i need any of the following from your showcase for this to work :-
jquery.wysiwyg.js
ckeditor.config.js
extendplugin.js
showcase.js
json-lib-2.3-jdk15.jar
sslext-1.2-0.jar
struts2-jquery-richtext-plugin-2.5.0.jar
velocity jars
Comment #8 on issue 415 by johgep: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415
I just try it out in the showcase (grid edit). if i click on a row the
cursor moves to the first column, but when i now click on an other column
like country the cursor moves to this column.
Do you have some edit rules or custom validations?
Can you try to create a reproduceable jsp which is running in one of the
showcases?
no this files are not needed to run an editable grid. in the showcase.js
you can find any topics also the topics for the grid.
I don't have any edit rules or custom validations.
Attached is the grid-edit.jsp, just replace it in the showcase directly.
Thats it.
The issue replicates 100%.
the cursor is always on Address field even when i am clicking on Country or
City.
Hope i can solve this quickly before plugging out for the day.
Attachments:
grid-edit.jsp 1.8 KB
snapshot.png 152 KB
Updates on this one would be really appreciated...
Figured the issue.
Editable grid does not work if 'sortable' attribute is used (true/false) in
sjg:grid.
Its ok to use in sjg:gridColumn, but if 'sortable' attribute is used in
sjg:grid, it does not work.
Kindly fix this. Has been very frustrating over the past 2 weeks.
I can imagine someone trying to figure something like this for themselves.
Comment #12 on issue 415 by johgep: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415
thank you for figuring out the problem.
in next version this should work like expected.
http://code.google.com/p/struts2-jquery/source/detail?r=1318
Comment #13 on issue 415 by johgep: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415
(No comment was entered for this change.)