• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help !! Problem with Model -2 Framework

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. I have a class that is implemented as a ResultSet metadata
and am trying to display thousands of records from an address
search with first line of the address(add1) on a JSP view.
2.the user is then expected to select one address out the whole lot and submit back to the controller servlet and via bean
populate the add1,add2,add3,add4 fields on the same JSP view
from which the search was made
Please , what are the ways of implementing this ,since
my controller has a doPost(),that discourages using href on the
address displayed.
Besides , how do i display such large volume of addresses and
populate the respected textboxes with the selected record.
Please , i need your ideas thanks.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK,
Thousands of rows are unreasonable for any GUI. Break it up into seperate pages of say 10, 20, or 100 items a page. Allow navigation from page to page. JSP Tags has a pager tag-lib that does this for you with an excellant example.
Next, I would recommend using javascript to do the post

Notice this will also simplify the servlet or jsp that recieves the posted data.

------------------
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
[This message has been edited by Carl Trusiak (edited October 26, 2001).]
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much CARL for your prompt response. I think its
worth the while to give you a break down of my implementation.
1.At the moment,each of my JSP views has an hidden field whose
value attribute is populated by a JavaScript function on each
page .So,if a user presses a button the Javascript function
populate the value of the hidden field with the URL the button
forwards to.
2. the controller servlet now checks all the JSPs since the
hidden field has same name on all the screens(JSP),using:
request.getParameter("nameOfHiddenField")//in controller
{
//forwards to value of Hidden field
}
3.At the moment am running a query through SQLClass in my JSP
and my logic in the JSP moves the pointer in the results returned by the address search.
So for next say 100 addresses display i have to re-run the same query but moving the pointer till i get to the end of the result all this logic are in the address displaying JSP.
I am sure this is not okay for performance.
4.I appreciate the suitability of TagLib , but the project
deadline may not warrant researching into TagLib, i want to get
the entire logic in place using pure JSP before going for
TagLib.
Questions:
a. How do i avoid re-running a query for each batch of display.
b. How do i incorporate the script you gave to populate the
address textfields 1-4 with the selected address.
Thanks pals, Source codes are very welcomed .Cheers.
 
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic