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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:16:55+00:00 2026-05-24T14:16:55+00:00

I’m developing a web application based on Hibernate, Spring and Wicket. Until now I

  • 0

I’m developing a web application based on Hibernate, Spring and Wicket.

Until now I implemented the business objects and the persistence layer. The transaction is managed by a transaction interceptor of the Spring framework. So each method of the DAO classes is encapsulated in a transaction. Implementing this together with unit test was straight forward.

Now I come to the web application part where I also use Spring for dependency injection. Together with the @SpringBean annotations of the Wicket framework I inject the DAOs in the Wicket components. But as I’m pretty new to Wicket I’m a little bit stuck when using the right model for my business objects when passing them do the Wicket components.

I tried the LoadableDetachableModel but run into some issues. I got one page to created a new or edit an existing business object depending on the input parameters of the page. If there is a id in the parameters then the corresponding business object should be loaded from the database. When there are no parameters then a new business object should be created. The part were a object should be edited runs quite well but when a new object should be created, and I fill out the web form and press save, I get a NullPointerException. After some debugging I found out that LoadableDetachableModel could not return an instance of the business object as the overridden load() method could not load the object form the database as it was not saved there yet and therefore had no id.

So now I’m wondering how to solve this problem. Is the LoadableDetachableModel the right choice? Is it advisable to separate the form into two interdependent forms and each form uses a different model. So only the edit page/form uses the LoadableDetachableModel?

  • 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-24T14:16:56+00:00Added an answer on May 24, 2026 at 2:16 pm

    There’s a good explanation of this and some related issues by Igor Vaynberg at the Wicket In Action blog.

    The last bit on that page deals with this issue, basically by not using a LoadableDetachableModel but implementing the AbstractEntityModel, which allows more complete control.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

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.