wicket

Why doesn't my (spring)HibernateTransactionManager work in wicket?

余生长醉 提交于 2019-12-22 09:59:39
问题 I tried to shorten this to what I think is relevant, I hope it's sufficient and not overwhelming. Please help! I'm converting a small wicket+databinder+hibernate web application to use wicket+spring+hibernate . I have a DAO service class, with a hibernate SessionFactory injected by Spring. I am able to do read-only operations using the session factory (autocommit is on by default). What I want to do is use the HibernateTransactionManager and the @Transactional annotation to do a transactional

Using javascript (bootstrap) in Wicket

自古美人都是妖i 提交于 2019-12-22 09:57:11
问题 First I added the JavaScript in Wicket correctly with a JavaScript resource reference. response.renderJavaScriptReference("http://code.jquery.com/jquery-latest.js"); response.renderJavaScriptReference(new JavaScriptResourceReference(JSAccessor.class,"bootstrap.js")); response.renderJavaScriptReference(new JavaScriptResourceReference(JSAccessor.class,"bootstrap.min.js")); Second I added the bootstrap CSS to wicket with CSS resource reference. response.renderCSSReference(new

Wicket dynamically add components to form

家住魔仙堡 提交于 2019-12-22 08:57:30
问题 I'm having trouble adding components to a form dynamically. What I'm trying to do is: Give the user a drop-down list with items he can choose like name, age, ... When a user presses add: there comes a (label + inputbox) in 1 component wich allows him to put in the value. You might think I could hide those components wich aren't selected but the user is also able to add values to the drop-down list. The problem I have is how to add and remove components (label+ inputbox) without having wicket

Should I put html and java files in the same package (folder) in Apache Wicket?

∥☆過路亽.° 提交于 2019-12-22 08:44:14
问题 I wonder if there is an example which html files and java files are resides in different folders. 回答1: I don't recommend using a separate page directory unless you are quite comfortable with how resource streams work, which I am not. The vast majority of wicket projects I have seen keep class and html files in the source directory. I tried separating them myself but then found that getting my hands on other resources, like images and such, was a hassle; so, I wound up putting those resources

Passing information safely between Wicket and Hibernate in long running conversations

二次信任 提交于 2019-12-22 07:44:38
问题 We are using Wicket with Hibernate in the background. As part of out UI we have quite long running conversations spanning multiple requests before the updated information is written back to the database. To avoid getting hibernate errors with detached objects we are now using value objects to transfer info from the service layer to Wicket. However we now end up with an explosion of almost the same objects : e.g. Answer (mapped entity saved in hibernate) AnswerVO (immutable value object)

What are ResourceReferences in Wicket, and how do they work?

a 夏天 提交于 2019-12-22 05:33:51
问题 I have seen examples containing things like this: mountSharedResource("/images/logo.gif", new ResourceReference(ImageScope.class, "logo.gif").getSharedResourceKey()); mountSharedResource("/resource", Application.class.getName() + "/" + resourceKey); But the Javadoc says this for the constructor: ResourceReference(java.lang.Class<?> scope, java.lang.String name); So when you create a ResourceReference , you give it a class. Why? Usually you would want either global scope or the scope of the

Why does running multiple Wicket applications cause AJAX conflicts?

泄露秘密 提交于 2019-12-22 04:05:41
问题 When I open two Wicket web applications in the same browser, it seems there are AJAX conflicts as I see a full page refresh in place of a partial refresh. This is true even if the applications are on different servers and port numbers. I only use the out-of-the-box JavaScript provided by Wicket ( tabbedPanel , onTimerAutoRefresh ). Perhaps it is something related to the fallback function. When only one web application is open, it works without any problems. I don't have a problem on the

Checking User Agent in Wicket

我是研究僧i 提交于 2019-12-21 17:45:02
问题 I am using wicket 1.5 and I am not able to see in the getClientInfo() method (WebRequest)RequestCycle.get().getRequest() I saw the other place this code WebClientInfo clientInfo = (WebClientInfo)WebRequestCycle.get().getClientInfo(); But I am not able to see any WebRequestCycle in Wicket 1.5. Any ideas how to check the user agent in Wicket 1.5? 回答1: The easiest way is to use WebSession.get().getClientInfo().getUserAgent(); On newer Wicket Versions (6 or newer), you should use: WebClientInfo

Wicket redirect: how to pass on parameters and keeps URLs “pretty”?

故事扮演 提交于 2019-12-21 17:04:24
问题 Consider a Wicket WebPage that redirects to another page (based on some logic omitted from here): public class SomePage extends WebPage { public SomePage(PageParameters parameters) { setResponsePage(AnotherPage.class); setRedirect(true); } } I need to pass on the PageParameters to that other page, and this seems to be the way to do that: setResponsePage(new AnotherPage(parameters)); However, when creating a new Page object like this, I end up at an URL such as /?wicket:interface=:1::::

Vaadin alternative for heavily loaded UI

廉价感情. 提交于 2019-12-21 14:01:46
问题 Currently I am programming the Web Application based on Vaadin. I am quite happy with the learning cycle and the way how easy UI can be designed. In general pluses of Vaadin are: "Native" UI programming for Java users (component hierarchy / event listeners / drag & drop / validation). Out-of-box nice collection of components (tree / table / list / ...). The minuses are: Big and complex HTML output. That slows down the browser response time (also mentioned here and there) and leads to some