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

mount page with path to “/”

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:46:51
问题 Im trying to use mountPage in wicket to mount "/" url as my MainPage url. My WebApplication looks like this now: public class WicketApplication extends WebApplication { @Override public Class<HomePage> getHomePage() { return HomePage.class; } @Override public void init() { super.init(); mountPages(); } private void mountPages() { mountPage( "/home", HomePage.class ); mountPage( "/about", AboutCompany.class ); mountPage( "/prices", Prices.class ); mountPage( "/gallery", Gallery.class );

OpenSessionInViewFilter and Wicket and still running into LazyInitializationExceptions

梦想与她 提交于 2019-12-11 08:35:35
问题 I'm using Spring's OpenSessionInViewFilter in combination with Wicket and I kept running into LazyInitializationExceptions, which I couldn't get resolved. I could see in the logging that the hibernate session was closed before the exception was thrown, so I was obviously doing something wrong. 回答1: The OSIVFilter must be above the WicketFilter, or else requests won't reach it. The WicketFilter handles page requests itself, it doesn't delegate to other components, such as another servlet (thus

wicket validate textfield inside listview can't see error message

我是研究僧i 提交于 2019-12-11 08:14:22
问题 I have a listview inside a listview. I have a textfield inside the nested listview. new ListView<ConfigStructure>("subListView", propertyList) { @Override protected void populateItem(ListItem<ConfigStructure> item) { ConfigStructure config = item.getModelObject(); final TextField<String> configValue = new TextField<>("configValue",new PropertyModel(config, "value")); configValue.setRequired(true); configValue.add(new CustomConfigValidator(config)); item.add(configValue); } }); I have a

Wicket And Multi-threaded Business Object

删除回忆录丶 提交于 2019-12-11 06:43:41
问题 So I have somewhat limited experience with serialization, Wicket, and multi thread projects so bear with me. Essentially my web application class is instantiating a POJ (parentObject) which creates a starts a new timer and instantiates several POJs (childObjects) that also have timers in them. These childObjects are stored in a list in the parentObject class. Pages in my wicket application need to access parentObject, so I made it accessible as so: public Object getParentObject { return this

Wicket 6: empty PageParameters when recreating a page after expiration

南楼画角 提交于 2019-12-11 06:27:13
问题 We've encountered a problem with Wicket 6 (namely version 6.22.0). It looks like it is what was fixed here: https://issues.apache.org/jira/browse/WICKET-5068 In a few words: after the page expires, Wicket tries to reconstruct it by calling a constructor with page class and PageParameters as arguments, but PageParameters is (erroneously) empty even though some parameters were sent with the request. After Wicket session timeout - pageParameters are null seems to be relating to the same issue.

Mixing Scala and Java on Wicket

末鹿安然 提交于 2019-12-11 06:17:01
问题 We use Wicket as our front end framework and until now our application is pure Java. However, I would like to start using a bit of Scala on some of our new classes. The old code would stay in Java. After installing the maven-scala-plugin, scala-library, scalatest dependencies and downloading them I had to face the problem that I do not know how to mix Scala with Java in Wicket. Until now I have only seen tutorials about either pure Java or pure Scala projects in Wicket. In the extended class

Wicket: how to get rid of WicketNotSerializableException?

会有一股神秘感。 提交于 2019-12-11 05:37:46
问题 Ok, so here is the code for the page public class ViewDocument extends BasePage{ private List<WeinSyncFileContent> transactions; .... public ViewDocument(){ transactions = ....; .... listContainer.add(listView = new ListView<WeinSyncFileContent>("transactions", transactions){ @Override public void populateItem(final ListItem<WeinSyncFileContent> item) { .... } }); } } The page does get displayed but I get errors: Error serializing object class kz.wein.wicket.pages.documents.ViewDocument and

Wicket with Bootstrap / How to use a font that's provided via webjar?

孤街浪徒 提交于 2019-12-11 05:22:52
问题 In my Wicket (with Bootstrap) application, I have the artifact org.webjars:font-awesome:4.6.3 as a transitive dependency. I want to use this font in for styling my page via the CSS file which is associated to the Page MyBasePage . This is an excerpt from HomePage.css : .banned div::before { font-family: FontAwesome, serif; content: '\f05e '; color: #c00000; } What is the correct way to make the font accessible for client ? The CSS-file HomePage.css is properly embedded via

Wicket Application, Serialization and Java Timers

对着背影说爱祢 提交于 2019-12-11 05:06:53
问题 So I have somewhat limited experience with serialization, Wicket, and multi thread projects so bear with me. Essentially my web application class is instantiating a POJ (parentObject) which creates a starts a new timer and instantiates several childObjects that also have timers in them. These childObjects are stored in a list in the parentObject class. Pages in my wicket application need to access parentObject, so I made it accessible as so: public Object getParentObject { return this