Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8731837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:19:47+00:00 2026-06-13T09:19:47+00:00

I am designing an application with Spring MVC3. I have to create a JSP

  • 0

I am designing an application with Spring MVC3. I have to create a JSP page which has a data table and user and can add rows in the JSP data table. I was considering the following two options:

  1. To use JavaScript function to add a row on an "Insert Row" button
  2. To submit the form on "Insert Row" button, go to Controller and return a model attribute with an extra row.

In JavaScript approach, I am able to add rows but these rows are not binding at server side. How can I achieve this using Controller approach?

Please note that I cannot use jQuery or any other JavaScript library.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:19:48+00:00Added an answer on June 13, 2026 at 9:19 am

    I have achieved this using the LazyList. You need to have a lazy list object in your model which will hold the list of objects of the another model class which will represent data in each row. Following is the syntax to declare LazyList in your model class.

    private List<OperationParameters> operationParameterses = LazyList
                .decorate(new ArrayList<OperationParameters>(),
                        FactoryUtils.instantiateFactory(OperationParameters.class));
    

    And the OperationParameters is the simple pojo class whose one object will represent your 1 row.

    Once you have this lazy list in your modelAttribute class then on the jsp you need to create control for each property in your OperationParameters pojo with help of simple html input tag. You can not use spring form taglib to bind those controls to your pojo. You need to give the name of each input tag as per following.

    <input type='text' id='operationParameterses0.inputOutputParamName' name='operationParameterses[0].inputOutputParamName'/>
    

    where in the name and id attribute the ‘0’ represents the index of the list. Now when you submit the form you can get those inserted rows binded to the pojo in the LazyList object.

    Hope this helps you.

    Cheers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm designing my application data model and I have a doubt, whether to use
We have an application that allows the user to add custom columns to our
i am designing application in which i want to allow user to select multiple
I'm designing an application that has two [three including administrators] user types: Buyers and
I am designing an basic ecommerce application, where I have a form to add
I am designing an application, one aspect of which is that it is supposed
I'm designing an application that reads data to the iPod touch/iPhone that is sent
I'm currently designing an application which I will ultimately want to move to Windows
Say you’re designing an application that, by requirement, allows a user the flexibility of
I'm designing a concurrent Java application that reads data from various medical devices available

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.