wicket

What is the correct way to handle collections of model objects in Wicket?

吃可爱长大的小学妹 提交于 2019-12-11 05:05:40
问题 I am looking for some assistance or guidance on the best way to handle collections of objects in Wicket that won't have a devastating impact on session size. Obviously wrapping an object with any of Wicket's IModel classes is ideal, but what is the best way to do that when working with a collection of objects (e.g. a collection of search results). I have had success using LoadableDetachableModel when working with an individual object, but I appear to be getting a java.io

Best tool to do load testing of wicket framework? [closed]

时光毁灭记忆、已成空白 提交于 2019-12-11 03:53:59
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Can you recommend a simple/best tool for an web application developed using Wicket framework? The challenge is interface id is changed

JAVA Change JSESSIONID cookie

Deadly 提交于 2019-12-11 03:47:50
问题 I'm using JAVA and Wicket on JBOSS 5. I need to change JSESSIONID cookie value to get the same Session used in another client (setting the other client's JSESSIONID). I need that to authenticate the other client that has no keyboard). What is the best way? 回答1: If you really want to hack the JSESSIONID ( which I don't recommend ), you can do the following way: Write a Servlet Filter In that filter write a wrapper for the HttpServletRequest (a new instance of this class must be passed to the

How to process binary stream in Wicket like Servlet?

為{幸葍}努か 提交于 2019-12-11 02:47:13
问题 Using Servlet, I can do the following to process binary stream: public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { InputStream inputStream = req.getInputStream(); byte[] data = IOUtils.toByteArray(inputStream); // ... Result result = process(data); // ... ServletOutputStream op = resp.getOutputStream(); result.writeTo(resp.getOutputStream()); } How I can do this in Wicket? (I have no clue after creating a page extends WebPage class) 回答1

Watch for updated properties in Wicket

ⅰ亾dé卋堺 提交于 2019-12-11 02:39:04
问题 In my current project we need to implement a way for texters to manage the wicket messages/internationalization via upload of property files. Also see this question: Administrating internationalized wicket applications As suggested there, I've implemented a custom IStringResourceLoader and added it at the beginning of the StringResourceLoader list to override any properties already in place: getResourceSettings().getStringResourceLoaders().add(0, new CustomStringResourceLoader()); This

Wicket: reload AjaxLazyLoadPanel automatically

假装没事ソ 提交于 2019-12-11 02:33:18
问题 I have a page with a form. Using the data from the form I get information from a BBDD and I displayed in a panel using Ajax. Now I was trying to use a AjaxLazyLoadPanel, because some of the query in the BBDD are heavy. The problem i have is after the first load of AjaxLazyLoadPanel, i dont know how to reload it with the new content (a new search). Any advice?? Thanks!! 回答1: I have not worked with AjaxLazyLoadPanel, but the generic approach to periodically updating a component is attaching an

Set html element attribute from wicket message

拟墨画扇 提交于 2019-12-11 02:11:43
问题 Is there some way to get a value from wicket message into an html attribute? I need to get wicket:message key="nameQtip into <input type="text" id="firstName" info="Here_I_Want_The_Wicket_Message"/> I'm using the info attribute to pass text to qTip. 回答1: You can achieve this easily with AttributeModifier public class TextFieldInfoPage extends WebPage { public TextFieldInfoPage() { super(); final TextField<String> firstName = new TextField<String>("firstName"); firstName.add(new

Passing info message to a Wicket page while using PageParameters

孤街浪徒 提交于 2019-12-11 01:34:15
问题 Does Wicket somehow allow passing both of the following kinds of params in a PageParameters object? Apparently not? accountId which is shown in the URL ( /account/<ID> ) infoMessage parameter which is not shown in the (bookmarkable) URL I'm currently using IndexedHybridUrlCodingStrategy for the page in question, and simply trying parameters "0" and "infoMessage" gives this exception: WicketMessage: Not all parameters were encoded. Make sure all parameter names are integers in consecutive

Can I redirect to a valid Wicket page when attempting to access a non-existent page?

瘦欲@ 提交于 2019-12-11 01:20:57
问题 Introduction If a user of my Apache Wicket web application (which runs on GAE/J) attempts to visit a non-existent page, for example: http://[MyURL]/admin/PageSubscribeX the web framework logs the following warning: org.apache.wicket.core.util.lang.WicketObjects resolveClass: Could not resolve class [[...].admin.PageSubscribeX] java.lang.ClassNotFoundException: [...].admin.PageSubscribeX at com.google.appengine.runtime.Request.process-78915baf06af5f31(Request.java) at java.lang.Class.forName

How do you set a custom session when unit testing with wicket?

佐手、 提交于 2019-12-11 01:19:58
问题 I'm trying to run some unit tests on a wicket page that only allows access after you've logged in. In my JUnit test I cannot start the page or render it without setting the session. How do you set the session? I'm having problems finding any documentation on how to do this. WicketTester tester = new WicketTester(new MyApp()); ((MyCustomSession)tester.getWicketSession()).setItem(MyFactory.getItem("abc")); //Fails to start below, no session seems to be set tester.startPage(General.class);