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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:32:48+00:00 2026-05-23T09:32:48+00:00

I have a Wicket Form. Within this form there are a few input tags.

  • 0

I have a Wicket Form. Within this form there are a few input tags. These input tags are put into div containers. These div containers “make” the style (i.e. they have style classes).
I want to access this style of the div tag, if the validation of the child input fails. I tried to do this with a Behavior, but I cannot access the div tag (which would be the parent of the input tag). Any ideas how I can modify the style of the parent div tag if validation fails?

<div style="myStyle">
    <label>Field1</label> <input type="text"/>
</div>

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-05-23T09:32:49+00:00Added an answer on May 23, 2026 at 9:32 am

    First things first: in Wicket you can only modify the markup of a component. Of course everything on your page is the markup of a component of something or other, at worst your Page class.

    But you definitely don’t want to modify the way your page class generates its output. Which means that you have to make your containing div a component too.

    <div wicket:id="myInputContainer">
        <label>Field1</label> <input wicket:id="myInput" type="text"/>
    </div>
    

    And as there’s no more functionality you need the container do, in the Java code use the WebMarkupContainer class.

    WebMarkupcontainer cont = new WebMarkupContainer( "myInputcontainer" );
    cont.add( new Textfield( "myInput" ) );
    form.add( cont );
    

    And from here it’s easy, you can attach your Behavior to the container and Bob’s your uncle.

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

Sidebar

Related Questions

I have a wicket form which contains many TextField input components. There's a Validator
I occasionally have some long running AJAX requests in my Wicket application. When this
I have a Wicket application and my pages expire very quickly. Why is this,
I have this web application that i have created using Wicket, Guice and JPA.
I have a wicket form containing a FileUploadField and some more text fields. When
I have an unusual requirement for Wicket. I chose Wicket because I will make
I try to make form for user to register using Wicket. I got user
I have a wicket form with multiple components and a button in the bottom
We have a form that lets people input html formatted text and that input
I'm developing a new application in Wicket and have run into a small 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.