Question: How to change the data in the table dynamically ?

Ads

 
 
 

Share on Google+Share on Google+

sadhu venkata sudhir
How to change the data in the table dynamically ?
0 Answer(s)      4 years and 4 months ago
Posted in : JSP-Servlet

This is my code. I want to add a sort button in the page and if i select any sort option then the data displayed in the table below should get sorted dynamically in this jsp page only.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="com.google.appengine.api.datastore.DatastoreServiceFactory" %> <%@ page import="com.google.appengine.api.datastore.DatastoreService" %> <%@ page import="com.google.appengine.api.datastore.Query" %> <%@ page import="com.google.appengine.api.datastore.Entity" %> <%@ page import="com.google.appengine.api.datastore.FetchOptions" %> <%@ page import="com.google.appengine.api.datastore.Key" %> <%@ page import="java.util.List" %>

<% DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Query q = new Query("employee").addSort("firstname", Query.SortDirection.ASCENDING); List employees = datastore.prepare(q).asList(FetchOptions.Builder.withLimit(100)); for (Entity emp : employees) { String s1 = emp.getProperty("firstname").toString(); String s2= emp.getProperty("lastname").toString(); String s3= emp.getProperty("Email").toString(); String s4= emp.getProperty("Gender").toString(); String s5= emp.getProperty("Professionalexp").toString(); String s6= emp.getProperty("Dateofbirth").toString(); String s7= emp.getProperty("AreaofExpertise").toString(); %> <% } %>
<%= s1 %> <%= s2 %> <%= s3 %> <%= s4 %> <%= s5 %> <%= s6 %> <%= s7 %>

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
Tutorials   
Java Spring Hibernate Struts Training fat image from db fat image from db fat image from db fat image from db unable to get value returned from javascript variable in page How to change image size before adding to mysql using jsp Design a registration.jsp page with input for user registration details Cart Quantity jsp servlet coding issue servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? image pdf marking pdf marking Multiple image upload using JSP Read code from excel sheet and upload into database using JSP Student java about search engine Convert BLOB to PDF and save it to a location how to copy files from remote to local machine using SFTP SSL in java? Like Team viewer Socket and Servert -Jsp how to copy files from remote location to local using java? How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java how to create SOAP based web service in java? how to fetch data from mysql database table and draw a bar chart on that data using in jsp how to create users in LDAP using java? how to authenticate user using TIVOLI api in java? how to create users using IBM Tivoi API in jsp/servelet? Java/J2ee Please explain this code as many packages and classes are unknown to me .! how to download the uploaded folder files using jsp Login Query image is display from path of mysql database please reply the code to store dynamic fields in database? Reloading issue in jsp How to get Button Id ? calling one jap page from another jsp page login login Problem to get connection from DAO class to JDBC Page Loading Time Fix table's column's name row(1st row of the table) so that it does not move up when the table is scrolled up to view more rows below Sending hidden values

Ads

 
Advertisement null

Ads