wicket-1.5

Javascript in Wicket 1.5

倖福魔咒の 提交于 2020-01-14 03:38:11
问题 im looking for the Wicket 1.5 Way of doing the following tasks: Add a external .js File to header of the Page from a Panel. Add a <script>...</script> Tag at Bottom of Page from a Panel Add some Javascript to the onLoad Event of the Body tag There are lots of examples how to do this in Wicket 1.2 and 1.3 but these API are gone. Any good Wicket 1.5 Articles aboutJavascript/Ajax would be great. 回答1: HaBaLeS found it out himself: add(new Behavior(){ private final ResourceReference SOME_JS = new

Components not reloading on url change in Wicket 1.5(.2)?

痴心易碎 提交于 2019-12-22 10:25:06
问题 I navigate to my application the first time with following URL: .../homepage/?0&user= x In debug mode I see wicket is nicely instantiating my panels and such (obviously). if I change the URL to: .../homepage/?0&user= y then nothing happens, the panels are not re-initialized (for the new user => data of user x is still shown) nor are LoadableDetachable -or other models invoked. However, if I change the URL to: .../homepage/? 1 &user=y then all panels are nicely initialized for user y One step

Hot to deploy tomcat/webapps folder form IntellijIDEA

こ雲淡風輕ζ 提交于 2019-12-20 04:22:25
问题 I am testing a web application(Apache Wicket Based) via IntellijIDEA Tomcat integration. There I noticed that the webapp consider its running in bin folder of the tomcat. Also when I called the ServletCotext.getContext("/") it return a null. But when I deploy them same webapp manually in tomcat it works fine. How can solve this in IntellijIDEA? 回答1: Ok. Let's try. 1) Create IntellijIdea project via WebApplication template. Idea should be Ultimate version, not Community edition 2) Go to Run

Scaffolding in Wicket

元气小坏坏 提交于 2019-12-20 02:36:09
问题 is there any working, supported and maintained scaffolding solution for Wicket 1.5? I know of Wicketopia at two different locations sourceforge and github but this is still targeted at wicket 1.4, brings it's own wicket and mails to the mailinglists didn't trigger any response in months. Wicket Rad but this hasn't been updated in 18 Months Wicket CRUD which seems more like a tutorial or proof of concept than a working solution. I can't belive, that there is no solution out there that allows

IE always sending the same jsessionid over time (using Java Wicket)

余生长醉 提交于 2019-12-13 18:57:44
问题 I have an application that I'm hosting on a local environment and am experiencing a very strange problem that occurs only in IE. The other browsers I've tested with (Chrome and Firefox) don't seem to reproduce the problem. I'm using Wicket 1.5.0 snapshot. In the application I've got a dispatch page that validates initial requests and take further action upon validation. In it I've got: setResponsePage(Canvas.class, pageParams); MyCustomSession.get().bind(); and in Canvas page upon calling

wicket 1.5 not found error message

一笑奈何 提交于 2019-12-13 08:36:01
问题 I made a ComponentFeedbackPanel for my inputs where I display message for form components. I have inputs for pass change, where you type your old pass, new pass and repeat new pass: final PasswordTextField oldPass = createOldPassField(); final PasswordTextField newPass = createNewPassField(); final PasswordTextField newPassRepeat = createNewPassRepeatField(); add( oldPass ); add( newPass ); add( newPassRepeat ); final ComponentFeedbackPanel oldPassFeedbackPanel = new ComponentFeedbackPanel

How can I get the responsePage from a RequestCycle in Wicket 1.5?

二次信任 提交于 2019-12-12 15:02:25
问题 In Wicket 1.4 I used my own WebRequestCycle to store the page in the session when it was detached - in order to implement a 'back' link. getRequestCycleListeners().add(new AbstractRequestCycleListener() { @Override public void onDetach(RequestCycle cycle) { squirrelAwayPreviousPage(cycle); } private void squirrelAwayPreviousPage(RequestCycle cycle) { Page responsePage = cycle.getResponse(); if (responsePage != null) ((MySession) getSession()).setPreviousPage(responsePage); } }); Now in Wicket

Wicket: Is it possible to display components of a panel based on page the panel is added to?

。_饼干妹妹 提交于 2019-12-11 08:56:21
问题 I'm pretty new to Wicket, so please excuse me if this is a simple task. I tried to look for examples but came up empty. Here's the scenario. Lets say that I have a customer information panel with 25 data points (name, dob, address, phone, etc). I want to reuse this panel in many different pages on a site. Now lets say I have the following criteria on 3 different pages the panel appears on: Page 1 - All fields are visible and editable Page 2 - Date of Birth, Gender, Customer Name are visible

continueToOriginalDestination does not bring me back to originating page

不问归期 提交于 2019-12-08 07:16:46
问题 I am trying to sign into my application. First I throw the RestartResponseAtInterceptPageException (this is in a WicketPanel on my BasePage): add(new Link<String>("signin") { @Override public void onClick() { throw new RestartResponseAtInterceptPageException(SignIn.class); } }); The SignIn Page class contains a form (an inner private class) for the sign in, with the following submit button: add(new Button("signinButton") { @Override public void onSubmit() { final User user = model.getObject()

How to redirect to another page while keeping the original url?

风流意气都作罢 提交于 2019-12-07 23:51:01
问题 In my Wicket 1.5 web application, I want to redirect to another bookmarkable page, whilst the URL of the originating page should remain . @MountPath(value="page1") public class WebPage1 extends WebPage { public WebPage1() { ... if (!isDisplayable()) { setResponsePage(WebPage2.class); // throw new RestartResponseException(Error404WebPage.class); // throw new RestartResponseAtInterceptPageException(Error404WebPage.class); } } private boolean isDisplayable() { boolean flag = ... ... return flag;