Link to home
Start Free TrialLog in
Avatar of saleemkhan
saleemkhan

asked on

How do i sort database columns in Jsp with Functional Keys?

hi all,
          i would like to know how to sort database columns in jsp using funcitonal keys.
Please find my code as below
<%
        customerlist=new CustomerList();
        customers=new Vector();
        customers=customerlist.getCustomerList(supplier_id);
        int indx=0;
   %>
    <%for (Iterator iter = customers.iterator(); iter.hasNext();) {
        customerlist=(CustomerList) iter.next();
         if (customerlist !=null)
            {
              indx++;
    
            
             %>
                <tr>
	       	<td width='5%'   align='center' bgcolor="<%=tdDataColor%>"><font face='Arial' size="1"><%=(customerlist.getOrder_issue_dt() == null? "":customerlist.getOrder_issue_dt())%></font></td>
		<td width='5%'   align='center' bgcolor="<%=tdDataColor%>"><font face='Arial' size="1"><%=(customerlist.getOrder_send_dt() == null? "": customerlist.getOrder_send_dt())%></font></td>
		 <%}%>
                  
		 </tr>
                 
             <% 
            }
        }%>

Open in new window

Avatar of Gibu George
Gibu George
Flag of India image

What do you mean by  funcitonal keys?
Avatar of saleemkhan
saleemkhan

ASKER

Hi,
  I mean when press f1 key ,f2 ..... keys on the key board.

i.e when i press f1 key i should sory the below
<td width='5%'   align='center' bgcolor="<%=tdDataColor%>"><font face='Arial' size="1"><%=(customerlist.getOrder_issue_dt() == null? "":customerlist.getOrder_issue_dt())%></font></td>

if press  f2 key

<td width='5%'   align='center' bgcolor="<%=tdDataColor%>"><font face='Arial' size="1"><%=(customerlist.getOrder_send_dt() == null? "": customerlist.getOrder_send_dt())%></font></td>
       <%}%>
                 


...etc
ASKER CERTIFIED SOLUTION
Avatar of Gibu George
Gibu George
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial