Letractively / aost

Automatically exported from code.google.com/p/aost
Other
1 stars 0 forks source link

data grid (table #495

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am new to tellurium. I want click on search result. below is my html sourch. 
Pls let me know how to creat uid for this data grid.

<table id="loginList:users" class="dataTable">
<thead>
<tr><th><script type="text/javascript">

    function oamSetHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        if(typeof form.elements[name]=='undefined')
        {
            var newInput = document.createElement('input');
            newInput.setAttribute('type','hidden');
            newInput.setAttribute('id',name);
            newInput.setAttribute('name',name);
            newInput.setAttribute('value',value);
            form.appendChild(newInput);
        }
        else
        {
            form.elements[name].value=value;
        }

    }

    function oamClearHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        if(typeof form.elements[name]!='undefined')
        {
            form.elements[name].value=null;
        }

    }

    function oamSubmitForm(formName, linkId, target, params)
    {

        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g, '\$:').replace(/:/g,'_');
        if(typeof eval('window.'+clearFn)!='undefined')
        {
            eval('window.'+clearFn+'(formName)');
        }

        var oldTarget = '';
        if((typeof target!='undefined') && target != null)
        {
            oldTarget=document.forms[formName].target;
            document.forms[formName].target=target;
        }
        if((typeof params!='undefined') && params != null)
        {
            for(var i=0; i<params.length; i++)
            {
                oamSetHiddenInput(formName,params[i][0], params[i][1]);
            }

        }

        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);

        if(document.forms[formName].onsubmit)
        {
            var result=document.forms[formName].onsubmit();
            if((typeof result=='undefined')||result)
            {
                document.forms[formName].submit();
            }

        }
        else 
        {
            document.forms[formName].submit();
        }
        if(oldTarget==null) oldTarget='';
        document.forms[formName].target=oldTarget;
        if((typeof params!='undefined') && params != null)
        {
            for(var i=0; i<params.length; i++)
            {
                oamClearHiddenInput(formName,params[i][0], params[i][1]);
            }

        }

        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return false;
    }

</script><a href="#" onclick="return 
oamSubmitForm('loginList','loginList:users:j_id_jsp_1171784956_50');" 
id="loginList:users:j_id_jsp_1171784956_50">
    <span class="usersTable_name">Username</span>
    <img id="loginList:users:j_id_jsp_1171784956_52" src="images/arrow_up.gif" border="0" class="usersTable_name" /></a>
    </th>
    <th><a href="#" onclick="return oamSubmitForm('loginList','loginList:users:j_id_jsp_1171784956_58');" id="loginList:users:j_id_jsp_1171784956_58">
    <span class="usersTable_email">E-mail</span></a>
    </th>
    <th><a href="#" onclick="return oamSubmitForm('loginList','loginList:users:j_id_jsp_1171784956_64');" id="loginList:users:j_id_jsp_1171784956_64">
    <span class="usersTable_enabled">Enabled</span></a></th></tr></thead>

<tbody id="loginList:users:tbody_element">
<tr onmouseout="highlightRow(this, 'TR', 'rowOut');" 
onmouseover="highlightRow(this, 'TR', 'rowOver');"><td><a href="#" 
onclick="if(typeof jsfcljs == 
'function'){jsfcljs(document.forms['loginList'],'loginList:users:0:j_id_jsp_1171
784956_54,loginList:users:0:j_id_jsp_1171784956_54,id,c77e7475-5a8f-44e3-9280-2f
b93e95513e','');}return false"><span 
class="usersTable_name">1289289126830</span></a></td><td><span 
class="usersTable_email"></span></td><td><span 
class="usersTable_enabled">Yes</span></td></tr>
<tr onmouseout="highlightRow(this, 'TR', 'rowOut');" 
onmouseover="highlightRow(this, 'TR', 'rowOver');"><td><a href="#" 
onclick="if(typeof jsfcljs == 
'function'){jsfcljs(document.forms['loginList'],'loginList:users:1:j_id_jsp_1171
784956_54,loginList:users:1:j_id_jsp_1171784956_54,id,b48f2f7c-d7e8-41a0-80cf-dd
1db702a616','');}return false"><span 
class="usersTable_name">Testt</span></a></td><td><span 
class="usersTable_email"></span></td><td><span 
class="usersTable_enabled">Yes</span></td></tr>
<tr onmouseout="highlightRow(this, 'TR', 'rowOut');" 
onmouseover="highlightRow(this, 'TR', 'rowOver');"><td><a href="#" 
onclick="if(typeof jsfcljs == 
'function'){jsfcljs(document.forms['loginList'],'loginList:users:2:j_id_jsp_1171
784956_54,loginList:users:2:j_id_jsp_1171784956_54,id,1c571a6f-46d4-4622-b1c1-af
04ecbaa2db','');}return false"><span 
class="usersTable_name">admin</span></a></td><td><span 
class="usersTable_email"></span></td><td><span 
class="usersTable_enabled">Yes</span></td></tr></tbody></table>

Original issue reported on code.google.com by mak83...@gmail.com on 10 Nov 2010 at 9:14

GoogleCodeExporter commented 9 years ago
Please post your questions to tellurium user group instead

http://groups.google.com/group/tellurium-users

Original comment by John.Jian.Fang@gmail.com on 10 Nov 2010 at 8:54

GoogleCodeExporter commented 9 years ago
See the answer here:

http://groups.google.com/group/tellurium-users/browse_thread/thread/13757509416a
9dfa

Original comment by John.Jian.Fang@gmail.com on 11 Nov 2010 at 3:54