Issue 415 in struts2-jquery: Editable grid not working

46 views
Skip to first unread message

struts2...@googlecode.com

unread,
Jan 30, 2011, 3:07:43 PM1/30/11
to struts2...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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.


struts2...@googlecode.com

unread,
Feb 1, 2011, 6:04:52 AM2/1/11
to struts2...@googlegroups.com

Comment #1 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

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

struts2...@googlecode.com

unread,
Feb 1, 2011, 6:12:59 AM2/1/11
to struts2...@googlegroups.com

Comment #2 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

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

struts2...@googlecode.com

unread,
Feb 1, 2011, 6:17:06 AM2/1/11
to struts2...@googlegroups.com

Comment #3 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

Regards,
Darshan Shroff
shroff...@gmail.com
http://in.linkedin.com/in/darshanshroff

struts2...@googlecode.com

unread,
Feb 1, 2011, 1:43:10 PM2/1/11
to struts2...@googlegroups.com

Comment #4 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

Things do work for me if i have
{{{ cellEdit="true" cellurl="%{gridEditableUrlId}" }}}

instead of

{{{ editinline="true" editurl="%{gridEditableUrlId}" }}}

struts2...@googlecode.com

unread,
Feb 1, 2011, 2:08:50 PM2/1/11
to struts2...@googlegroups.com

Comment #5 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

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.

struts2...@googlecode.com

unread,
Feb 1, 2011, 3:03:19 PM2/1/11
to struts2...@googlegroups.com

Comment #6 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

Do i need any of the following from your showcase
jquery.wysiwyg.js
ckeditor.config.js
extendplugin.js
showcase.js

struts2...@googlecode.com

unread,
Feb 1, 2011, 3:07:24 PM2/1/11
to struts2...@googlegroups.com

Comment #7 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

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

struts2...@googlecode.com

unread,
Feb 1, 2011, 4:59:17 PM2/1/11
to struts2...@googlegroups.com
Updates:
Owner: johgep
Labels: Component-Grid-Plugin

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.

struts2...@googlecode.com

unread,
Feb 2, 2011, 1:56:15 PM2/2/11
to struts2...@googlegroups.com

Comment #9 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

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

struts2...@googlecode.com

unread,
Feb 5, 2011, 8:14:24 AM2/5/11
to struts2...@googlegroups.com

Comment #10 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

Updates on this one would be really appreciated...


struts2...@googlecode.com

unread,
Feb 5, 2011, 9:57:20 AM2/5/11
to struts2...@googlegroups.com

Comment #11 on issue 415 by shroffda...@gmail.com: Editable grid not working
http://code.google.com/p/struts2-jquery/issues/detail?id=415

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.

struts2...@googlecode.com

unread,
Feb 7, 2011, 5:33:15 AM2/7/11
to struts2...@googlegroups.com
Updates:
Status: Started
Labels: Milestone-2.5.2

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

struts2...@googlecode.com

unread,
Feb 8, 2011, 5:06:37 PM2/8/11
to struts2...@googlegroups.com
Updates:
Status: Fixed

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.)

Reply all
Reply to author
Forward
0 new messages