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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:37:25+00:00 2026-05-14T20:37:25+00:00

I have a Wicket Web Page where I create a new Object of class

  • 0

I have a Wicket Web Page where I create a new Object of class A:
A a = new A(User u);

In A I would like to have setter injection, however this is actually not done. I have heard that one must provide an empty constructor but how is it possible to have also a non – empty constructor with setter injection?

  • 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-14T20:37:26+00:00Added an answer on May 14, 2026 at 8:37 pm

    I’m not familiar with Wicket, but I assume that you’ve got various things on your Wicket web page annotated with @Inject, yes?

    So, you have a few options; in order of preference:

    • If you’re @Injecting your User, one option is to annotate the constructor of A with @Inject and then in your page, just @Inject either an A or a Provider<A> into web page.
    • You can @Inject into your web page a MembersInjector<A> (call it aMembersInjector) and then after you create your A object call aMembersInjector.injectMembers(a) to cause all the setter injection to happen.
    • You can @Inject into your web page the Injector and call Injector.injectMembers(a) after you create your A.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Wicket and would like to maintain a web application from inside
I have a Wicket page class that sets the page title depending on the
I have this web application that i have created using Wicket, Guice and JPA.
I have created a web page in wicket and mounted it. The url looks
I occasionally have some long running AJAX requests in my Wicket application. When this
I'm new to wicket and stuck with the following problem: I have a table
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
I have a wicket page , which contains two Spring-managed beans , one is
i have a web site which is created by wicket(java) but in special cases
We have a Wicket app with a page that includes an embedded Youtube video.

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.