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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:40:34+00:00 2026-06-10T00:40:34+00:00

I have a little problem with image relative path and not-mounted page in Wicket.

  • 0

I have a little problem with image relative path and not-mounted page in Wicket.

Take this code inside a generic Page (ex MyPage.java):

final DatePicker<Date> date = new DatePicker<Date>("date",true);
date.setButtonImage("img/calendar.gif");

img directory is stored inside WebContent directory.

The image is not correctly showed unless I mount the page in WebApplication.
Without mounting the page, the relative url has to be considered starting from the java class path.

How Can I build the correct image url from WebContent without mounting the page?

Thanks

  • 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-10T00:40:36+00:00Added an answer on June 10, 2026 at 12:40 am

    If you need the path you can use

    date.setButtonImage(UrlUtils.rewriteToContextRelative("img/calendar.gif", getRequestCycle()));
    

    That’s how ContextImage works. If your DatePicker would accept another component as the image you could use this class directly.

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

Sidebar

Related Questions

I have a little problem. This is my code: stackPanelShapesContainer = new StackPanel(); InitializeStackPanle();
I have a little problem with my website. People use this page to create
I have this kinda little problem using tinymce: When I'm using the insert image/photo,
i have a little problem with my java socket code. I'm writing an android
I have a little problem with my pixellation image processing algorithm. I load the
I've got a little problem. I have multiple relative positioned DIVs in an absolute
I have this little problem and I think I am having it due to
I'm having a problem with a CSS. I have a little image with the
I have a little problem here. On my page I use a asp:repeater to
I have an complex problem, but it could be solved via this little problem.

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.