wicket

Using Wicket AbstractAjaxBehavior with jQuery.ajax()

倖福魔咒の 提交于 2019-11-30 09:27:04
I have used the jQuery AJax call to send JSON as documented here in StackOverflow The problem is that I am not receiving any Data on the server . I can see that the call did reach the target ajax behavior -- but in onRequest() method , the RequestCycle dd not contain any parameters My Wicket Code: AbstractAjaxBehavior ajaxSaveBehaviour = new AbstractAjaxBehavior(){ private static final long serialVersionUID = 1L; @SuppressWarnings("unchecked") public void onRequest() { //get parameters final RequestCycle requestCycle = RequestCycle.get(); final PageParameters pageParameters = new

How can I create a Wicket URL that hides its parameters?

梦想的初衷 提交于 2019-11-30 05:13:59
问题 I'm currently creating a set of links with code like this: BookmarkablePageLink<CheeseMain> havarti = new BookmarkablePageLink<CheeseMain>("havarti", CheeseMain.class); havarti.setParameter("Title", "Havarti"); havarti.setParameter("Group", "cheeseName"); add(havarti); The URL that comes out has the format https://mysite.com/;jsessionid=B85EE5CB0349CCA2FE37AF76AB5C30C1?wicket:bookmarkablePage=:com.mycompany.cheese.CheeseMain&Title=Havarti&group=cheeseName . My problem is that I no longer want

How can I make Wicket's “AjaxLink” Stateless?

旧时模样 提交于 2019-11-30 03:42:33
问题 I am building a Wicket web application which is going to have to handle a lot of simultaneous requests. I've setup a test environment and some jmeter scripts to do load testing and I notice I can reduce the CPU and memory footprint of my application if I make most pages Stateless. I've added code to the onBeforeRender() method of the biggest page to show me which of the components are causing my page to be stateful. This is the code I have for detecting that: @Override protected void

wicket @SpringBean can not create bean

夙愿已清 提交于 2019-11-30 03:35:45
问题 I have a project on Eclipse, Wicket, Spring, Hibernate. Every thing works normaly except : when I try public class SortableContactDataProvider extends SortableDataProvider<User> { @SpringBean private Service service; public Iterator<User> iterator(int first, int count) { //SortParam sp = getSort(); return service.findAllUsers().subList(0, 15).iterator(); } ... the service variable is null? In any another places when I use this constuction "service" is not null and working well. Please help me

Why is jsessionid appearing in Wicket URLs when cookies are enabled?

巧了我就是萌 提交于 2019-11-30 02:53:47
问题 I notice that the first time a user visits my site the Wicket-generated URLs contain a jsessionid , rather than relying on the cookie for session information. The cookie does get set successfully, and if the user simply reloads the page, the jsessionid is no longer appended to the URLs. You can test this out here: pixlshare.com. Hovering over any of the image links will show a URL with a jsessionid ; reload the page, and the jsessionids will be removed. From previous experience with the

Is it difficult to make a mainly stateless web application with Wicket?

落花浮王杯 提交于 2019-11-30 00:33:33
I've been working with Wicket for month or two now, making simple web applications with it and getting used to models and so forth. Now I'd like to move forward and see if I can put what I've learned so far to use and create a medium/large web application. However, I haven't spent much time thinking about how to make pages stateless. If I understand correctly, making a stateless page is achieved by making the page bookmarkable and making sure that no stateful components are added to the page. For the website I am making I want to avoid "Page expired" messages, let users be logged in via

For my next project, a web-app, should use scala+wicket or scala+lift?

99封情书 提交于 2019-11-29 23:34:49
Given the various advantages of the Scala language I have decided to write my next web-application in Scala. However, should I be using Wicket or Lift? I am familiar with Wicket, and like it quite a bit, but know very little about Lift. Is learning Lift worth the effort in this context? In order words, how does Lift compare to Wicket? Given that the web-app will be in Scala, could using Lift make my life as a developer easier? If you like Wicket, you should stick with what you know & like. Wicket is a fine web framework and doing Scala & Wicket is very nice because you can use Scala's traits

Wicket: how to redirect to another page?

我们两清 提交于 2019-11-29 22:55:11
How do I redirect to another page using Wicket? IIRC, some exception has to be thrown in the constructor, but I don't remember which one. Thanks in advance. Throwing a RestartResponseAtInterceptPageException will do it, as you noted in your own answer, but that's really part of a system for allowing a redirect with an eventual continuation at the current page (frequently part of an authorization process). If that's not your situation, but you still have to do something that interrupts processing, it might be better to throw a RestartResponseException . The principal usage that I know of for

Increase the lock time for “After 1 minute the Pagemap null is still locked” Exception

风格不统一 提交于 2019-11-29 20:56:20
问题 org.apache.wicket.protocol.http.request.InvalidUrlException: org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is still locked by: Thread[http-8443-3,5,main], giving up trying to get the page for path: 3:timer Where is this 1 minute set? Is a wicket setting, or a tomcat? or ...? How can I modify this? 回答1: Although I agree with Martijn's answer (you shouldn't keep users waiting for more than a minute), the timeout can be set by calling WebApplication

Programmatic use of Spring Security

眉间皱痕 提交于 2019-11-29 20:35:58
I am using Wicket with the Wicket Auth Project for my presentation layer and I have therefore integrated it with Spring Security. This is the method which is called by Wicket for authentication for me: @Override public boolean authenticate(String username, String password) { try { Authentication request = new UsernamePasswordAuthenticationToken( username, password); Authentication result = authenticationManager.authenticate(request); SecurityContextHolder.getContext().setAuthentication(result); } catch (AuthenticationException e) { return false; } return true; } The contents (inside ) of my