wicket

Wicket Component hierarchy - getParent()

可紊 提交于 2019-12-12 05:26:58
问题 I did an experiment. First I want to state the html: <form wicket:id="form"> <table> <tr> <td> <table style="border: 1px solid;" cellspacing="0" cellpadding="0"> <tr wicket:id="row"> <td wicket:id="column" style="border: 1px solid #3A6395"> <div wicket:id="div"> <span wicket:id="panel"></span> <span wicket:id="tooltip"><span wicket:id="tooltipPanel"></span></span> </div> </td> </tr> </table> </td> <td>   </td> </tr> </table> </form> <wicket:fragment wicket:id="labelFragment"> <span wicket:id=

Wicket Jetty integration with Start.java from quickstart stopped working

拟墨画扇 提交于 2019-12-12 04:58:58
问题 I just checked out my (working) wicket project to a new development machine and all of a sudden I get this error whenever I try to start jetty. java.lang.NoClassDefFoundError: net/unbewaff/Start Caused by: java.lang.ClassNotFoundException: net.unbewaff.Start at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

How can I update a Wicket DataView with AJAX?

二次信任 提交于 2019-12-12 04:39:26
问题 I need to AJAXfully filter by users list of PsDoctrans which is shown in a Wicket DataView . final TextField txtName= new TextField("user"); final PSDocDP dp = new PSDocDP("username"); DataView<PsDoctrans> dataView = new DataView<PsDoctrans>("unproc", dp) { @Override protected void populateItem(final Item<PsDoctrans> item) ... }; PSDocDP is: public class PSDocDP extends SortableDataProvider<PsDoctrans> {...} final WebMarkupContainer wmc = new WebMarkupContainer("container"); wmc.add(dataView)

Test form response in Wicket

淺唱寂寞╮ 提交于 2019-12-12 03:13:34
问题 I am using Wicket and I want to test whether submitting my form result in a success or "page not found" errors. How could I achieve this? Below is my code: HTML Code <form wicket:id="form" enctype='multipart/form-data'> <div wicket:id="feedback"></div> <input type="file" wicket:id="file"></input> <br></br> <span wicket:id="progress"></span> <input wicket:id="save" type="submit" value="Save"></input> <input wicket:id="cancel" type="submit" value="Cancel"></input> </form> Java Code public class

Wicket and embedded jetty - classNotFoundException

空扰寡人 提交于 2019-12-12 03:11:35
问题 I'm trying to run my (seam and) wicket app on an embedded jetty server. I get the following exception: Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader

Wicket download link

天大地大妈咪最大 提交于 2019-12-12 02:47:38
问题 On the Wicket page I have an image (AbstractDefaultAjaxBehavior.INDICATOR) which is shown on submit and then i start a AjaxSelfUpdatingTimerBehavior to monitor a file. Now I also have a DownloadLink to download the same file. However after download the image which I mentioned above (which is rotating) stops rotating. Is there a solution to this issue? I am new to wicket. Please suggest. public LoggingPage() { Form<Void> form; this.add(form = new Form<Void>("resourceForm") { private static

java.time.LocalDate and Wicket 7 DateTextField

拜拜、爱过 提交于 2019-12-12 02:30:08
问题 I'm trying to connect a Wicket component DateTextField with a property of type java.time.LocalDate . Following the hints in this answer, I've tried to implement a custom CompoundPropertyModel which contains a java.time.Localdate property. I'm using Wicket 7.6 and JDK 8. I'm new to Wicket and Java generics. This is my code: Class LocaldateModel import java.time.*; import java.util.Date; import org.apache.wicket.model.IModel; public class LocalDateModel implements IModel<Date> { private static

How to don't validate form with Ajax buttons

末鹿安然 提交于 2019-12-12 02:29:26
问题 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 error (because row in this table has Required=True parameter) and I can't add another row. I tried use simple AjaxLink but it doesn't have reference to form in onClick method and when I complete some rows and click "Add row" this data get lost. I want to enable validation only after "save" button

wicket unit testing : strange behaviour of startPage(Page page) and startPage(Class<Page> pageClass)

大城市里の小女人 提交于 2019-12-12 02:13:27
问题 I got some strange behaviour of my unit tests. My simple Page looks like: public class RegistrationPage extends BasePage { public RegistrationPage(IModel<Service> model) { isUserLoggedIn(); add(new RegistrationPanel("registration", model)); } public RegistrationPage() { isUserLoggedIn(); } /** * Checks if a user is logged in. * If not, the user will be redirected to the LoginPage. * */ public void isUserLoggedIn() { if (!getSession().isSignedIn()) { // redirectToInterceptPage(new LoginPage())

Wicket multi-tab ajax & page serialization

喜你入骨 提交于 2019-12-12 01:54:09
问题 I have a nasty issue with Wicket and Ajax on VMWare Horizon . What users see is that ajax-links do not work as expected. To be exact: they work, but seem to act on a older version of the page. For example, when I have a counter, it does seems to handle an ajax-update, but the value is never increased. The value is stored in a Model so I figured it has something to do with page serialization. I went on to do a more simpler experiment: on the Wicket-Exmaples (see: http://www.wicket-library.com