jaggybala2
asked on
How to Remove a particular record in a JSP Page (without deleting it from the Database) ...
Hello Experts,
I have a table " company " in my database with fields as shown:
company name address phone number Remove
ABCDEFG 12, XX , YYY. 11111111 remove
QWERTZ 32, FF, GFE. 44444444 remove
and so on............(upto 2000 companies displaying in 50 Pages...i.e. Records per page - 40)
I am able to connect to my 'Postgresql database' and display all the records in my JSP Page.
Now, When i click the ' remove ' button, the JSP page must be reloaded in such a way that the 'Selected Company' is removed from that Page, but not from the database.
Hope you understand the problem. If not, please tell me...I'll post my Coding part...
Expecting your earlier reply,
Regards ,
Jagdeesh
I have a table " company " in my database with fields as shown:
company name address phone number Remove
ABCDEFG 12, XX , YYY. 11111111 remove
QWERTZ 32, FF, GFE. 44444444 remove
and so on............(upto 2000 companies displaying in 50 Pages...i.e. Records per page - 40)
I am able to connect to my 'Postgresql database' and display all the records in my JSP Page.
Now, When i click the ' remove ' button, the JSP page must be reloaded in such a way that the 'Selected Company' is removed from that Page, but not from the database.
Hope you understand the problem. If not, please tell me...I'll post my Coding part...
Expecting your earlier reply,
Regards ,
Jagdeesh
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Similar thing. If the data created in the ActivityList.jsp are stored in a session variable, this can be accessed from within the CompanyList.jsp page and the appropriate items included.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi there.
I'm trying to understand why you want to remove a record from the page and not from the table, but I guess the best way you can do is to put a remove_date field in your Company table and use it as a filter so you only show the ones who have no remove_date. If the problem is that diferente users sees diferent companies in their own wallet, then you should make a wallet table where you hold the user->company relationship and then you show only the user companies and you can remove the company from the user without removing the company from the table.
Anyway I guess you should give me more information, but you should analize your situation becose there are many times that is easier to restrict things on the Database instead of doing it by code, and is much cleaner and easier to deal with.
best regards
Javier
I'm trying to understand why you want to remove a record from the page and not from the table, but I guess the best way you can do is to put a remove_date field in your Company table and use it as a filter so you only show the ones who have no remove_date. If the problem is that diferente users sees diferent companies in their own wallet, then you should make a wallet table where you hold the user->company relationship and then you show only the user companies and you can remove the company from the user without removing the company from the table.
Anyway I guess you should give me more information, but you should analize your situation becose there are many times that is easier to restrict things on the Database instead of doing it by code, and is much cleaner and easier to deal with.
best regards
Javier
ASKER
By the way, at the end of the JSP Page , I have a button named 'EXECUTE ACTIVITIES'...When i click that button, some activities(those activities 'ActivityList.jsp' are included inside the above 'CompanyList.jsp' File) must be inserted into the 'COMPANY TABLE - ACTIVITY FIELD' ...
When i do like what you have suggested, Is it possible ?
Thanx,
Jagdeesh.