• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic