Issue 401 in struts2-jquery: sjg:grid onBeforeTopics does not work in 2.5

54 views
Skip to first unread message

struts2...@googlecode.com

unread,
Jan 17, 2011, 4:21:33 PM1/17/11
to struts2...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 401 by shroffda...@gmail.com: sjg:grid onBeforeTopics does not
work in 2.5
http://code.google.com/p/struts2-jquery/issues/detail?id=401

(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?
1. <s:url id="gridBasicUrlId" action="gridBasic" />
<sjg:grid id="gridBasicId" caption="Basic jQuery Grid"
dataType="json" href="%{gridBasicUrlId}" gridModel="gridModel"
rowList="10,15,20" rowNum="15" width="700"
viewrecords="true" pager="true" sortable="false" navigator="false"
>

<sjg:gridColumn name="username" index="username" title="Username"
key="true"
width="8" resizable="false" align="left" sortable="false"
/>
<sjg:gridColumn name="firstName" index="firstName" title="First Name"
width="12" resizable="false" align="left" sortable="false"
/>
<sjg:gridColumn name="lastName" index="lastName" title="Last Name"
width="12" resizable="false" align="left" sortable="false"
/>
<sjg:gridColumn name="emailId" index="emailId" title="Email"
width="20" resizable="false" align="left" sortable="false"
/>
<sjg:gridColumn name="managerName" index="managerName" title="Manager"
width="12" resizable="false" align="left" sortable="false"
/>
<sjg:gridColumn name="projectCode" index="projectCode" title="Project Code"
width="10" resizable="false" align="left" sortable="false"
/>

</sjg:grid>

2. Please see snapshot. The Pagination is shown on extreme right. I have
been facing this issue since previous versions also, and we had fixed this
ourselves. The pagination is shown on extreme right and total number of
records is not shown at all.

3. please see snapshot attached.

Which struts2 version?
struts2-core-2.2.1.jar

Which struts2-jquery plugin version?
struts2-jquery-grid-plugin-2.5.0.jar
struts2-jquery-plugin-2.5.0.jar


Attachments:
BasicJqueryGrid.png 18.6 KB

struts2...@googlecode.com

unread,
Jan 17, 2011, 4:31:45 PM1/17/11
to struts2...@googlegroups.com

Comment #1 on issue 401 by shroffda...@gmail.com: sjg:grid onBeforeTopics

but whenevr i try, the output is as shown in snapshot... however if i just
add navigator=true, then i get perfect output as in second snapshot.

the showcase when deployed on my local tomcat works perfectly in either
case..

Attachments:
BasicJqueryGrid2.png 28.0 KB

struts2...@googlecode.com

unread,
Jan 18, 2011, 5:35:07 AM1/18/11
to struts2...@googlegroups.com

Comment #2 on issue 401 by shroffda...@gmail.com: sjg:grid onBeforeTopics

the fix that we had done to make this work... i.e. Page 1 of __ and Total
Pages to be shown in middle of grid bar was to add two topics like this
<script type="text/javascript">

//To resolve grid issues. Called onbeforeload
$.subscribe('beforeGridLoad', function(event,element) {
setGridId("gridBasicId");

});
//To resolve grid issues. Called oncompleteload
$.subscribe('completeGridLoad', function(event,element) {

resolveGridIssues("gridBasicId");
});
</script>

And included sjgrid.js file (attached) which contains the definition of
setGridId and resolveGridIssues. We don't want this sort of patch work to
be done and are hoping that the grid works without such difficulties.


Attachments:
sjGrid.js 2.6 KB

struts2...@googlecode.com

unread,
Jan 18, 2011, 5:40:08 AM1/18/11
to struts2...@googlegroups.com

Comment #3 on issue 401 by shroffda...@gmail.com: sjg:grid onBeforeTopics

however would like to reiterate that the showcase war is working perfectly
in all cases when deployed on my local tomcat. Can you think of any
specific libraries i might be missing which are required for this.

struts2...@googlecode.com

unread,
Jan 18, 2011, 6:10:29 AM1/18/11
to struts2...@googlegroups.com
Updates:
Owner: johgep
Labels: Component-Grid-Plugin

Comment #4 on issue 401 by johgep: sjg:grid onBeforeTopics does not work in
2.5
http://code.google.com/p/struts2-jquery/issues/detail?id=401

can you please give version 2.5.1 a chance maybe it solves your problem.
don't forget to clear your caches after upgrading.

there are only to jars needed the struts2-jquery-grid-plugin-2.5.1.jar and
struts2-jquery-plugin-2.5.0.jar.

please check also your custom styles and scripts.

struts2...@googlecode.com

unread,
Jan 18, 2011, 6:35:42 AM1/18/11
to struts2...@googlegroups.com

Comment #5 on issue 401 by shroffda...@gmail.com: sjg:grid onBeforeTopics

why did not i raise an issue before.
we have been struggling with this for almost 6-8 months :)
struggling in a sense that using the sjgrid.js file and have beforetopic
and aftertopic for every single grid within the application. And believe me
we have loads of them.

"please check also your custom styles and scripts."

This sentenced helped.. i stripped away my custom style xyzapp.css from the
jsp, and it worked like a charm.
Now i have to bottle down to the class which was causing this issue.

Thank you so much.


struts2...@googlecode.com

unread,
Jan 18, 2011, 6:39:44 AM1/18/11
to struts2...@googlegroups.com

Comment #6 on issue 401 by shroffda...@gmail.com: sjg:grid onBeforeTopics

btw i did not have to upgrade. just had to remove my custom xyzapp.css, and
it worked.

struts2...@googlecode.com

unread,
Jan 18, 2011, 7:51:53 AM1/18/11
to struts2...@googlegroups.com
Updates:
Status: Invalid

Comment #7 on issue 401 by johgep: sjg:grid onBeforeTopics does not work in
2.5
http://code.google.com/p/struts2-jquery/issues/detail?id=401

(No comment was entered for this change.)

struts2...@googlecode.com

unread,
Jan 18, 2011, 8:24:19 AM1/18/11
to struts2...@googlegroups.com

Comment #8 on issue 401 by shroffda...@gmail.com: sjg:grid onBeforeTopics

this was the class that was causing the issue,
table {
padding: 0px;
border-spacing: 0px;
border-collapse: collapse;
width: 100%;
}

Of this particularly, width: 100%; is the line that causes the issue.
If i remve it the grid displays as it should. :)

Reply all
Reply to author
Forward
0 new messages