Visual sortable (and perhaps pagable) table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dzenanz
    New Member
    • Feb 2008
    • 45

    Visual sortable (and perhaps pagable) table

    I have existing web application:
    -source/binary format: JDK 1.4
    -sun java system application server
    -jstl1.1
    -oracle jdbc 1.4 (ojdbc14)

    Now I need to show results of a stored procedure in DB on single page. What is best (and/or easiest) framework (jsf, struts, displaytag, etc) to use. I just want framework to handle sorting and maybe paging.

    I have tried jsf, but it does not correctly autoconfigure (I get 404 for the newly added page), can you provide any help on that?
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Hopefully you're still looking for this, dzenanz!

    Have a look here for something I know works:
    How To Retrieve @@IDENTITY Value Using JDBC

    The infomation can be modified for your own use, add needed field values and so on.

    Also, JSF is excellent for pagination, and so easy... Simply put:

    (1) you'll need to call the stored procedure mentioned in the link above,
    (2) load a dataTable in your jsf page,
    (3) select the table in design mode of course,
    (4) below your screen,
    (5) find properties button
    (6) Add pagination from there

    You can do this without writing any code:-) Well, you'll need to modify the sql in your bean, but you'll get the point.

    Let us know if hat worked...

    Dököll
    Last edited by Dököll; Dec 21 '08, 10:21 PM. Reason: added remark...

    Comment

    • dzenanz
      New Member
      • Feb 2008
      • 45

      #3
      Ahh, I do not work for that company any more! I can not even remember how I solved that problem...

      But this reply might help someone else with same/similar problem.

      Dženan

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by dzenanz
        Ahh, I do not work for that company any more! I can not even remember how I solved that problem...

        But this reply might help someone else with same/similar problem.

        Dženan
        Paging (efficiently) is SQL engine dependent; I remember PostgreSQL having an 'offset' and 'limit' keyword in the where clause; my Mimer SQL engine doesn't have that feature; I vaguely remember that Oracle also has a feature for that functionality.

        In all other cases you have to skip a bunch of records from the result set and read a fixed amount of records afterwards; an expensive operation.

        kind regards,

        Jos

        Comment

        • dzenanz
          New Member
          • Feb 2008
          • 45

          #5
          I know we had many stored procedures which accepted parameters like page size, page number, sort order etc.
          But not all results are expected to possible be huge, and for those cases framework that does sorting, and perhaps also paging comes in handy.

          Comment

          Working...