All Questions
Tagged with wicket validation
53 questions
1
vote
2
answers
105
views
Is a link in Wicket IValidator's error message possible?
Is it possible in the Wicket IValidator's error message to include a link to another page in the application?
0
votes
1
answer
128
views
How to do form validation with select2 and Wicked?
I have Select2 in wicket, and I want to add form validation on it. I use atributte required, but it doesnt work. I want that select2 after unsuccessful validation have red background, or at least red ...
-1
votes
2
answers
1k
views
Wicket one form with two submit buttons with the same validation
I use wicket 7.x. I have a form with two submit buttons. The two button do different things on submit event but they have the same field validation. I override the AjaxButton onSubmit in one of them ...
1
vote
1
answer
432
views
Wicket validation message use label
I have some trouble showing the proper validation errors in my wicket form.
The labels are coupled to the input textfields with the 'wicket:for' attribute.
Example in the html file:
<label wicket:...
-1
votes
2
answers
90
views
How do I make a form field in html with the specified pattern (MM/DD/YYYY) that adds a "/" automatically after two integers are typed
I currently have:
<input type="text" wicket:id="singleDateField" pattern="(?:(?:0[1-9]|1[0-2])[\/\\-. ]?(?:0[1-9]|[12][0-9])|(?:(?:0[13-9]|1[0-2])[\/\\-. ]?30)|(?:(?:0[13578]|1[02])[\/\\-. ]?31))[\...
1
vote
1
answer
766
views
Wicket - Update model with ajax without validation
I have a form with several checkboxes of the layout: "[*] Items of type A (count: 2)".
Each such checkbox has a link attached ("count: 2" in the above layout) that displays the number of ...
1
vote
1
answer
1k
views
How to validate a form in a bootstrap modal window in wicket?
I'm searching for a solution to validate a small form in a modal window from bootstrap with wicket.
My dialog class derives from de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal
Why do ...
0
votes
2
answers
558
views
Wicket - monitor all validation errors
is it possible to monitor all form/form-component validation errors in Wicket in one place? Is there some form of listener? I would like to have page, component and message of the error.
Thx for any ...
-1
votes
1
answer
1k
views
Apache Wicket error : Class does neither have a constructor with PageParameter nor a default constructor
My code
package com.remp.xyz;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup....
0
votes
2
answers
732
views
Wicket dropdown validation onchange
I have a dropdown in wicket 1.4 (part of a form) which shows choices for numbers. Now when a number is selected, I change the status of that number to reserved in database using onUpdate method of ...
0
votes
1
answer
542
views
Attach new object to custom validator in Wicket
I have such custom validator:
public class PeriodClosedValidator implements IValidator<Date>{
private Date dateStart;
private Date dateEnd;
public PeriodClosedValidator(Date ...
0
votes
1
answer
1k
views
How to add error message to ValidationError in Wicket
In wicket application I create my own Validator which extends AbstractFormValidator, and I have such code:
StringBuilder errorMessage = new StringBuilder();
...
ValidationError valError = new ...
0
votes
1
answer
1k
views
Wicket DateTimeField dd/MM/yy Date Validation
I have a DateTimeField that I am trying to allow for 2 types of formats based on the user's preferences: MM/dd/yy or dd/MM/yy. When a user clicks DatePicker and selects a date, I am able to display ...
2
votes
1
answer
1k
views
Disabling nested form validation in wicket
How to disable inner form validation with Wicket in following case?
Outer form has some fields with validators, including a TextField. When user has the TextField focused and presses Enter, the outer ...
0
votes
1
answer
443
views
Replacing multiple feedback messages with one message in a Form with a ListView in wicket
I have a webpage which picks up questions from a database and ask users to give an Yes/No questions and sometimes based on the question they have to select a dropdown list or a text to enter.
I need ...
0
votes
1
answer
263
views
Define validation properties outside Panel in Wicket
I need to define Wicket validation messages in .properties file of a page for a reusable panel. I will give an example (code snippets below):
MyPage class contains MyPanel with a fragment MyFragment ...
2
votes
1
answer
451
views
Different set of validators for AjaxFormComponentUpdatingBehavior and form submission
In Wicket, I have written a AjaxFeedbackComponent component that takes a regular form component (such as a TextField) and feedback field and provides validation with instant feedback as the user types....
1
vote
1
answer
210
views
Show correct model value even if error on field
I have a Wicket TextField which displays a calculated value. The value is calculated in the get-method in the model object. I have attached a custom validator to the field.
My problem occurs when ...
2
votes
1
answer
2k
views
@Valid working without spring-mvc?
I'd like to use @Valid annotation to validate my beans in controller method. Unfortunatelly it does not work. I know that in order to make it work I'd have to include spring-mvc into my project and ...
3
votes
1
answer
239
views
WickeTester - IllegalStateException: No CDI context bound to application
I have Wicket Form and ProjectNameValidator class:
@Inject
ProjectDao dao;
public ProjectNameValidator() {
CdiContainer.get().getNonContextualManager().inject(this);
}
the injection ...
1
vote
1
answer
659
views
Apache Wicket: Disabling validators on onCancel within a Wizard
I have a wizard, in which many of the panels provide forms, with their respective validtors. If I click on the cancel button within the wizard, I am unable to run the onCancel logic without the forms ...
1
vote
2
answers
3k
views
Wicket validator doesn't raise error on null field value
How do I get my validator to raise an error on a null value? I can see through my logs that when I try to submit a null field it's calling the validator, but it never raises onError so I cannot ...
0
votes
1
answer
476
views
wicket user validator can't inject Dao Bean - nullpointer exception
I have created JPA entity USER. Then UserDao as interface, UserDaoBean as implementation.
@Stateless
public class UserDaoBean implements UserDao {
@PersistenceContext
private EntityManager em;
...
0
votes
3
answers
1k
views
How to don't validate form with Ajax buttons
I have a problem with validation on form actually sub-form.
In my website I have some kind of table and "Add row" button (BlockingAjaxSubmitLink).
When I try add let say 2 rows, I get validation ...
2
votes
2
answers
1k
views
Wicket - Validator reporting warnings not errors and not blocking form submission
i have a form where i have 5 TextFields that are required and 25 that are optional. I set the required TextFields setRequired(true) and get the Feedback messages i want when this fields are empty.
...
1
vote
1
answer
336
views
Apache Wicket: Injecting dependencies in form validators (using Guice)
(This is basically a follow on this question.)
I need to access the DB service layer in one of my form validators (to make sure the email is not already taken when registering a new user).
I tried ...
0
votes
2
answers
205
views
How to pretty print result of wicket validator
I would like to include reformatting the field content in wicket field validation.
Example time input field:
User input: 1459 -> Validation is ok -> field displays reformatted value: 14:59 (with ...
2
votes
2
answers
575
views
variables in error messages
I have a dropdown box and a TextField. The value of the text field must begin with a unique number depending of the selection. If not an error message will be shown.
Depending on the selection the ...
1
vote
3
answers
4k
views
Wicket: Conditional Validator
I have a form whose inputs are required in certain combinations, and also depending on which submit button was clicked.
E.g. fields A, B, and C, and submit buttons M, N. And valid combinations are
M: ...
2
votes
1
answer
887
views
Wicket ValidationError not using IConverters specified in Application
I'm trying to localize validation error messages with Wicket and ran into this situation. I use custom converters to convert date values to the desired format (see below). However, when using ...
0
votes
2
answers
2k
views
Handle feedback-Messages with a custom validation framework/object in apache wicket
I am using my own validation, but the view of the form (e.g. if a component is invalid) should be highlighted or customized within wicket...
So e.g.
I have my Wicket Form
<form wicket:id="...
1
vote
2
answers
1k
views
Wicket form submit data loss
We have a problem at our login page which has a form using post method, The problem is that sometimes post parameters comes null to server but they are not null. Form validators behave like parameters ...
0
votes
2
answers
1k
views
Validation of java object using javascript
I have following task for my project:
I need to validate a java object, based on rules in a script (for example javascript).
Why in javascript?
Because in javascript I can be flexible and create ...
3
votes
2
answers
2k
views
Jquery - validate multiple fields (grouped fields) where all fields are to be valid
I have been working on getting the validation of multiple fields to work in a generic manner. My form has a parent span which has two textfields, when one or both the textfields fail validation, the ...
2
votes
1
answer
3k
views
Wicket - IValidator not calling validate when TextField is empty
I have a class that implements the IValidator. I add this validator class to my TextField, and the overrided method validate(Invalidatable<T>) is called. However, if the TextFieldis empty, the ...
1
vote
1
answer
1k
views
Wicket textarea with default input
I have a textarea which sometimes will have default text in it and sometimes not depending on values in the database. Right now, I'm using a model in the textareas constructor whose getObject() ...
3
votes
1
answer
104
views
Can my Wicket validation rules be documented to the user in a DRY fashion?
I have a bunch of forms which use Wicket's built-in validation to validate.
A tester has just noted that it would be nice if they could see the validation rules before typing the value in and getting ...
3
votes
3
answers
3k
views
Accessing arbitrary number of fields in a Wicket form validator
I need to validate something about several Wicket input fields of type TextField<BigDecimal> (namely that the sum of percentages is 100). There are one to many such input fields; thing is, I don'...
0
votes
1
answer
2k
views
Apache wicket: how to update form explicitly?
I have an issue with ListView and validation on page.
I have ListView, and underneath it I have TextField, where the user can enter values. I have "publish" and "draft save" buttons on my page. ...
2
votes
1
answer
669
views
Changing the form component ID used in Wicket's feedback messages
I have some forms on my page with a feedback panel. the formcomponents have different validators. I'd like to keep the feedbackmessages of the validators that come with Wicket so I dont have to write ...
3
votes
1
answer
755
views
How to avoid superfluous Wicket log warnings when using field-specific FeedbackLabels?
I'm using "FeedbackLabels" to show component-specific validation messages, based on ideas and code in this blog post: User friendly form validation with Wicket.
Problem is, pages using such ...
0
votes
1
answer
768
views
Check there is one checked checkbox before display confirm dialog Wicket
I intended to give user a chance to confirm their action by adding JavascriptEventConfirmation as the example from this tutorial :
https://cwiki.apache.org/WICKET/getting-user-confirmation.html
...
1
vote
2
answers
2k
views
DatetimeField validator
I've created a custom validator to validate dateTimefield.
My problem is that I can't add it to the
datetimefield variable
The method add(IValidator<? super Date>) in the type FormComponent&...
0
votes
3
answers
4k
views
How can I validate number in wicket 1.5.3?
Ive heard, about NumberTextField, and a parametrized Textfield. But Im looking for something that validate if there is a number on the textbox, and instead of throw an exception it should show error ...
0
votes
1
answer
420
views
Wicket radio group client side validation
I have gender radio group (male female) which I want to validate if no value got picked by the client writing the js itself is not a problem .
How to attach it to wicket component is the problem .
1
vote
1
answer
1k
views
How to remove a validator from a Select?
I have a form where I need to add/remove validators dynamically. Based on a dropdown selection, other form fields may have different validation rules.
For other kinds of inputs, I've used replace(...
1
vote
1
answer
2k
views
Error with validate() in AbstractFormValidator Wicket
I tried to add some validations to DateTextField as follows:
IFormValidator validator = new AbstractFormValidator() {
public FormComponent<?>[] getDependentFormComponents() {
...
3
votes
3
answers
10k
views
Apache wicket: how to update model after validation error
I have form with dateTimeField, and ListView.
ListView looks like that:
final ListView<String> countryView = new ListView<String>("country", model.<List<String>>bind("country"...
0
votes
1
answer
2k
views
Apache wicket validation
I have custom validation added to my page, and this validation is called from business logic layer, after I click "Save" button on UI, which is AjaxSubmitLink.
On my page I have apache wicket ...
3
votes
3
answers
2k
views
Wiquery DatePicker displays time, validation fails
I'm having problems with the Wiquery DatePicker in the following code in a Wicket page (using a CompundPropertyModel, the date property is of type java.util.Date):
DatePicker<Date> datePicker = ...