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 6627725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:02:52+00:00 2026-05-25T22:02:52+00:00

I am using jquery/jsp/java ejb3.0/sql server. The User interface requirement (a jsp page) is

  • 0

I am using jquery/jsp/java ejb3.0/sql server.

The User interface requirement (a jsp page) is a grid of checkboxes, ~10 rows high and up to about ~30 rows wide (this varies), it represents a linker table for a many-to-many table relationship.

The checkboxes will be populated from the database (if row present in linker table, then checkbox is checked).

The user can then check/uncheck whichever, as many times as possible. On submit any changes should be saved to db.
The changes will consist of deleting a row if unchecked(and if checked/row present before), and inserting a row if checked (and unchecked/no row present before).

My problem is, what is the best way to implement this ? Using ajax to update database using checkbox onchange event is not appropriate. I want it to be a submit form event.

  • 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-05-25T22:02:52+00:00Added an answer on May 25, 2026 at 10:02 pm

    I’d try and decomplexify the situation by taking a step back and introducing a simple bean to represent the “metadata” – i.e. the 300-or-so true/false values.

    Actually, when dealing with that many fields, you’d probably use a mother-bean containing child beans which hold conceptually-related fields together. e.g.:

    public class MotherBean {
        private UserSettingBean userSettingBean;
        private UserRelationshipBean userRelationshipBean;
        private UserPreferencesBean userPreferencesBean;
        ...
    }
    

    So your “web tier” becomes a straightforward CRUD controller for the MotherBean; the sort of thing that gets done every day. You could even use something like Spring Roo to build up the scaffolding for that.

    Then, when you pass that bean down into your lower layer(s) (you may or may not have a traditional “service” or “business logic” layer in this design), you have a DAO that translates the relationship metadata into the actual many-to-many relationships. Given the number of fields we’re talking about, I’d again suggest to delegate out this work into sub-DAOs (for want of a better term) that deal with related links.

    Obviously, the “get” path is the same thing in reverse. You ask the MotherBeanDAO for the metadata related to user 1234, it asks its delegate DAOs for the child beans, wraps them up and the resultant MotherBean gets passed all the way up to the web front end.

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

Sidebar

Related Questions

I am developing a java webapp, using jsp/jquery/ejb/jboss. I have a web-form that enables
I have a dialog window in my JSP page and its implemented using jQuery.
My web side I am using Jsp and jQuery and my server side I
My web side I am using Jsp and jQuery and my server side I
Using jQuery, how do I delete all rows in a table except the first?
Using jQuery's dialog I came across the following quirk (tested in FF3): User selects
I have a spring MVC application using JSP as my view technologies with Jquery
I'm using jQuery in our Java project and 3 AJAX requests to refresh 3
I'm using Java at the core backend and JSP pages as GUI frontend. and
We're building a web app, and it's using jquery ajax and jsp on the

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.