« Return to Thread: Questions about DWR with AjaxTags

Questions about DWR with AjaxTags

by austrios :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

 Dear DWR dev team

 

I am using DWR to create a realtime system monitoring view.

 

Thanks to DWR , I have archived some function we need to create an Ajax based web content.

 

But , Recently  I have a trouble  when using ajaxTags with DWR.

 

I want to use AjaxTags to have a tooltip function , AjaxTags callout function

 

The problem is that when i put a HTML anchor tag in a DWRUtil.addRows function

 

it seems that mouse event is not responsive, resuliting in now showing any tooltips

 

while putting a HTML anchor tag in a body is functioning well.

 

I alse have tested server side servlet, and it show correct result i expected.

 

I am not sure what the problem is.

 

Attached file is source code

 

------------------------------------------------------------------------------------------------------------

 

<%@ page contentType="text/html;charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="http://ajaxtags.org/tags/ajax" prefix="ajax" %>
<html>
<head>
<title>Realtime SYSTEM Monitoring </title>
<style type="text/css">
<!--
 .green {
   font-family: "arial";
   font-size: 10pt;
   color: #ffffff;
   background-color: #339933;
   padding:2px 2px 2px 2px;
         }
 .pctg  {
   font-family: "arial";
   font-size: 8pt;
   color: #3300cc;
         }
-->
</style>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/ajaxtags.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/displaytags.css" />
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/prototype.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/scriptaculous/scriptaculous.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_crossframe.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_iframe.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_hide.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/overlibmws/overlibmws_shadow.js"></script>

  <script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax/ajaxtags.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax/ajaxtags_controls.js"></script>
  <script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax/ajaxtags_parser.js"></script>

<script type="text/javascript" src="/Ajax/dwr/interface/Sysinfo_DAOtcp.js"></script>
<script type="text/javascript" src="/Ajax/dwr/engine.js"></script>
<script type="text/javascript" src="/Ajax/dwr/util.js"></script>
<script type="text/javascript">
<!--
  //
  function init(){
 DWRUtil.useLoadingMessage();  //
 // DWRUtil.beginBatch();  //
 show('');   //
 // DWRUtil.endBatch();  //
  }

  function show(pub) {
 Sysinfo_DAOtcp.getSysInfo(pub,
   {
  callback : function(result) {
   DWRUtil.removeAllRows('data_body');
   DWRUtil.addRows('data_body',result,
    [
    function(data) {
        var hoststr = '<font color=blue size=3><div><a href="JavaScript://nop/" class="kocmap01">'
 + data.hostname + '</a></div></font>';
        return hoststr; },

    function(data) {
        var graphcpu;
     var totcpu ;
     totcpu = data.usr + data.sys;
     graphcpu = '<table border="0" cellspacing="1" cellpadding="0"><tr><td>';
     graphcpu += '<img src="img/green15.gif" width="' + data.usr
+ '" height="15">' + '<img src="img/cyon15.gif" width="' + data.sys
+ '" height="15">' + '<img src="img/violet15.gif" width="' + data.wait + '" height=15>';
     graphcpu += '</td><td><span class="pctg">' + totcpu + '%</span></td></tr></table>';

     return graphcpu; },
    function(data) { return data.runq; },
    function(data) { return data.waitq; },
    function(data) { return data.mem; }
       ],
       { escapeHtml:false },
       {
       rowCreator:function(options) {
        var row = document.createElement("tr");
        if(options.rowIndex % 2==1)
          {row.style.background='#FFffDD';}
          return row;
       }
    }
    );
        },
    errorHandler : function(error, exception) {
     window.alert(error.message);
    }
  });
  }

  //-->

  </script>
  </head>
  <body onload="init()">
  <h1> Realtime SYSTEM Monitoring </h1>
  <hr>
  <p>
  <form name="fm">
  <table border="0"
   style="background-color:White;border-color:#CC9966;border-width:1px;">
   <thead>
     <tr style="color:#FFFFCC;background-color:#990000;">
   <th>hostname</th><th>CPU Status</th><th>runQ</th><th>waitQ</th><th>Mem</th>
     </tr>
   </thead>
   <tbody id="data_body"></tbody>
 </table>
 <hr>
 <a href="JavaScript://nop/" class="kocmap"> kocmap01 </a>
 </form>

<ajax:callout
   baseUrl="${contextPath}/Ajax/callout"
   sourceClass="kocmap01"
   parameters="hostname=kocmap01"
/>


 </body>
 </html>
 



austrios@...
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@...

 « Return to Thread: Questions about DWR with AjaxTags