Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2017
    Posts
    3
    Rep Power
    0

    Default Dynamically creating empty table record

    I am using spring mvc with spring tag form in jsp page. I would like to see an example of how to create dynamically empty table row. I am trying to add rows as needed. Thanks so much

  2. #2
    asdfg is offline Senior Member
    Join Date
    Nov 2016
    Posts
    163
    Rep Power
    2

    Default Re: Dynamically creating empty table record

    I believe you need to use MySQL to create tables?
    It can be done with/without spring too.
    https://www.youtube.com/watch?v=KRhv4iPgzHE

  3. #3
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    390
    Rep Power
    4

    Default Re: Dynamically creating empty table record

    The creation of a table in html/jsp is per se independent from the data source all long as you have a collection of datasets. I think OP wants to see how to loop over the collection and make a table row for each result (in html/jsp). But since this website does not consider itself a code factory, OP will have to show its own work first.

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,965
    Rep Power
    7

    Default Re: Dynamically creating empty table record

    Quote Originally Posted by benji2505 View Post
    The creation of a table in html/jsp is per se independent from the data source all long as you have a collection of datasets. I think OP wants to see how to loop over the collection and make a table row for each result (in html/jsp). But since this website does not consider itself a code factory, OP will have to show its own work first.
    I think he wants to have a table, possibly populated by a Collection, and where the userinterface has a button to add a new row to enter data for a new record. (Adding a "save" and "cancel" button to persist/cancel)

    @OP: If you look closely, there are a few "I believe" and "I think" answers. This usually means your question is not precise enough. Please elaborate.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  5. #5
    Join Date
    Apr 2017
    Posts
    3
    Rep Power
    0

    Default Re: Dynamically creating empty table record

    The question is to dynamically create empty table row in a form via JSP using Spring tag form and JSTL. Thanks.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    25

    Default Re: Dynamically creating empty table record

    Still not too clear.

    Are you talking in the browser?
    So you have a table (as SurfMan says) that has some data in it, and you want to be able to append a new row?

    If so, then that's quite likely purely Javascript, but again, we'd need the actual requirements to know.

    Of course, you could be talking about a requirement to have a table where there is always a blank row no matter how many rows there are, or something.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,965
    Rep Power
    7

    Default Re: Dynamically creating empty table record

    Remember that the term "table" is an ambiguous term. It can mean an HTML table on screen, but also a table in a database. (It can also mean a piece of furniture where items can be conveniently placed. Or But for arguments sake, we'll cross this one off the list...)
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

Similar Threads

  1. Insert empty, otherwise update the table
    By vector_ever in forum JDBC
    Replies: 4
    Last Post: 04-28-2014, 04:02 PM
  2. Replies: 2
    Last Post: 04-03-2013, 04:33 PM
  3. Not getting 1st record from table.
    By abhi7080 in forum New To Java
    Replies: 5
    Last Post: 01-11-2012, 11:14 AM
  4. Replies: 0
    Last Post: 04-01-2008, 10:43 AM
  5. Replies: 0
    Last Post: 09-28-2007, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •