Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How To avoid flickering effect to table WITH <s:div updateFreq="2000"/>

 
Ram Mandavkar
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new in Struts 2.0

I tried to use struts 2.0 tag <s:div ( ajax ) to refresh Table contains
I can able fetch data from server after each 2 sec But its gives me flickering effect to table

So any one can tell me how to avoid this flickering effect on table

please go through code

Input:
<s:url id="ajaxTest" value="/TEST/DataRefreshAction.action" />
<s:div id="once" theme="ajax" href="%{ajaxTest}" updateFreq="2000">


Output:
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
request.setAttribute("decorator", "none");
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
<html>
<link href="../jsp/style1.css" rel="stylesheet" type="text/css">
<link href="../jsp/Pages.css" rel="stylesheet" type="text/css"/>
<head>
<title>Transactions</title>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF" >
<table class="repTableLayout">
<s:iterator value="transdata">
<tr>
<td width="8%" class="frontValid11"></td>
<s:iterator value="top" >
<td width="15%" class="frontValid11">
<s:property />
</td>
</s:iterator>
</tr>
</s:iterator>
</table>
</body>
</html>
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is much more likely to be a browser issue (as opposed to Struts)--it's the browser that's doing the redraw.
 
Ram Mandavkar
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:This is much more likely to be a browser issue (as opposed to Struts)--it's the browser that's doing the redraw.


Hi David,

Thanks For replay

But is there any way to avoid this.
or can you suggest me any another way with which i can able to avoid this Flickering.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you misunderstood my response--I meant that this isn't a Struts-specific issue: it's a browser issue, so should be addressed in a browser-related forum. Setting absolute sizes might help in reducing some of the flicker.

It's also unlikely that having a <head> etc. section will produce legal HTML--you can't embed an entire HTML page inside a <div> in the "parent" HTML page.
 
Ram Mandavkar
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:I think you misunderstood my response--I meant that this isn't a Struts-specific issue: it's a browser issue, so should be addressed in a browser-related forum. Setting absolute sizes might help in reducing some of the flicker.

It's also unlikely that having a <head> etc. section will produce legal HTML--you can't embed an entire HTML page inside a <div> in the "parent" HTML page.



Thanks
now i understand.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic