wicket

How to force Wicket “onchange” AJAX events to be triggered if fields fail validation conditions

99封情书 提交于 2021-02-09 06:54:26
问题 The specific case I've got in mind is as follows: an AjaxFormComponentUpdatingBehavior("onchange") is added to a TextField in a form. The behavior verifies the text for certain conditions (either the model object or the form component model, doesn't matter), based on which it might display a message (or hide it, if it has already been shown). The problem is, there are also validators added to the TextField. One of the possible (and likely) scenarios consists of the user typing in, first, a

Wicket 6 to 8 upgrade: RadioGroup.onSelectionChanged() replacement

微笑、不失礼 提交于 2021-01-28 00:33:35
问题 We have inherited a large code base that uses Wicket 6 where we have a RadioGroup of preferred contact type choices (SMS, e-mail, etc). When a Radio for SMS is selected, a TextField for phone number is made visible, same for e-mail and so on. This has been implemented by adding an AjaxEventBehavior for "onclick" event to each Radio . The onEvent(AjaxRequestTarget) method calls RadioGroup.onSelectionChanged() and updates the visibility of each TextField : radioSms = new Radio<>("sms", ...);

Wicket form “ServletRequest does not contain multipart content”

狂风中的少年 提交于 2021-01-27 14:25:51
问题 I have a wicket form that has a file upload box on it. Sometimes this file upload box is hidden because the user isn't required to attach documentation. I have called setMultiPart(true) on the form object , but I still (but only rarely) get this error: java.lang.IllegalStateException: ServletRequest does not contain multipart content. One possible solution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect multipart forms but there are certain situation where

onchange get current value with radioChoice

南笙酒味 提交于 2020-12-11 01:40:11
问题 Im trying to get the selected value from a radio form with radioChoice onChange but can't really seem to find the solution. The onEvent function gets called, but from here I'm not really sure how to get the value. Code: RadioChoice<String> radioChoice = new RadioChoice<String>("radio", new PropertyModel<String>(this, "selected"),this.radioChoiceList); radioChoice.add(new AjaxFormComponentUpdatingBehavior("change") { @Override protected void onUpdate(AjaxRequestTarget target) { System.out

Wicket vs GWT - Advice needed

风格不统一 提交于 2020-02-24 11:07:27
问题 I am developing a Java EE based web application. We have a very limited time to come up with a alpha version and trying to decide on a web framework to use. It has to be something easy to learn but powerful. Standard JSP/Servlet is not an option here due to the time it takes for the development. Appreciate if anyone could advice. Current options are Wicket and GWT. (JSF is also an option) 回答1: Wicket is component-based and comes with a bunch of standard components (like pagination, auto

Wicket vs GWT - Advice needed

你。 提交于 2020-02-24 11:06:30
问题 I am developing a Java EE based web application. We have a very limited time to come up with a alpha version and trying to decide on a web framework to use. It has to be something easy to learn but powerful. Standard JSP/Servlet is not an option here due to the time it takes for the development. Appreciate if anyone could advice. Current options are Wicket and GWT. (JSF is also an option) 回答1: Wicket is component-based and comes with a bunch of standard components (like pagination, auto

How can I make a Wicket modal window un-draggable?

廉价感情. 提交于 2020-01-25 06:58:08
问题 I am using a Wicket modal window in my application. Is there any way to make it un-draggable? Any information will be very helpful to me. Thank you. 回答1: Unfortunately, there is no support for this, at least out of the box. It is possible to prevent the user from resizing the window, but draggability is not affected by that. Full Javadoc for ModalWindow in version 1.4.7 is here. 回答2: As explained by Lord Torgamus, the standard ModalWindow can not be made un-draggable. As an alternative,

Wicket Session and Jersey REST webservice

不想你离开。 提交于 2020-01-21 17:16:29
问题 Currently I'm developing an REST webservice for an PACS viewer (medical images). This webservice needs to have encrypted/obfuscated parameters to ensure users cant fuzz with the parameters to get data from other patients. In an Wicket panel im setting an Session attribute: wicketSession.setAttribute("study", studyInstanceUID); I want to access this attribute in the Jersey webservice, but the session doesn't contain any attributes in my jersey webservice. It seems like it is not injected or