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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:57:51+00:00 2026-06-10T23:57:51+00:00

I have a form: private Class TestForm extends Form<TestString>{ public TestForm(TestString testString){ super(testForm, new

  • 0

I have a form:

private Class TestForm extends Form<TestString>{

  public TestForm(TestString testString){
    super("testForm", new CompoundPropertyModel<TestString>(testString));
    final TextField<String> test = new TextField<String>("test"));
    add(test);
    ... //submit button
  }

The TestString class contains just one field: test.

Is it possible to get value of string other than by pushing the submit button? With behaviors or something else?

I tried to add AjaxEventBehavior and inside of this behavior called the methods text.getValue() and testString.getTest() but with no success.

  • 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-10T23:57:52+00:00Added an answer on June 10, 2026 at 11:57 pm

    As mentioned you could use AjaxFormComponentUpdatingBehaviour and use an onchange event (or an OnChangeAjaxBehaviour), this does of course mean that any time your onUpdate(AjaxRequestTarget target) function gets called is not necessarily the users final intended input. For example: Let’s say you type ‘test’, your update function will get called 4 times, but only the final call is the final word as the user wishes to submit it.

    One important thing I want to mention for your scenario is that you cannot simply look for an onblur event because (in your example) the only time the user is likely to be blurring off the TextField is if they are trying to click on the submit button, at which point it’s a little to late to worry about AJAX, because it’s being submitted…

    Perhaps if you provide more details about why you need the value of the string without pushing the submit button, then someone can come up with a better idea (of course it could be that the onchange event is just fine for you, in which case great!). If however (taking a wild stab in the dark) you need it to validate the input before the user submits the form, then you can actually do this after submission:

    • http://www.mkyong.com/wicket/create-custom-validator-in-wicket/
    • http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.FormPage
      (actually an example of post submission, but if your TextField has a validator then the form won’t submit).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code of the following form: class Test { private final A t;
I have a Form with some private properties namespace TestApplication { public partial class
in my form I have input text and then dataView: private class RegistrationForm extends
I have this code: public partial class FrmPrincipal : Form { private Image imagen;
I have the following code : public partial class ModificarAlimento : Form { private
I have a simple zend form class Form_Upload extends Zend_Form { private $_networks =
I have a form that looks like this public class ValidationForm { private Person
I have a class Account public class Account { private int id; private String
I have a class like following: public class Trainee { private static int numberOfTrainee
I would like to have the form object like this: public class FormData {

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.