wicket

Wicket serving images from File System

无人久伴 提交于 2019-12-21 05:31:17
问题 I am pretty new to Wicket and i have some difficulties with using resource references. I am using wicket 1.5.4 and have following problem: I store images on the file system. I have class ImageElement which holds part of the file path relative to configured rootFilePath (i.e dir1/dir2/img1.png). On the page I add Image as follows: new Image("id",ImagesResourceReference.get(), pageParameters) where page parameters includes image path parameter (path="/dir1/dir2/img1.png"). My questions are: Is

Define own feedback messages in Wicket

夙愿已清 提交于 2019-12-21 03:32:45
问题 How do I define my own feedback messages in Wicket? For example: if I give an incorrect username, I want to get an error message like "The user name in incorrect, try to login again." instead of using the default error message. What would an example be like? 回答1: You can display your own error messages using error() and warn() and info() . If you want to show errors dependent on validators or the required flag you can define a properties file with the same name as the class which contains a

Wicket Drag and drop functionality for adding an image

怎甘沉沦 提交于 2019-12-21 01:45:29
问题 I'm making a wicket app that can manage some options for a cashdesk app. One of the options is to change the image of a selected Product . The user(manager) can choose from the already present images in the database (SQL) when this option is selected, or add a new image if the desired image is not present. Don't mention the test names and awesome images (it's still in test-fase) I prefer to see the adding of an image achieved by Drag and Drop html5 demo [dnd-upload] (From the desktop into the

Dynamically add components to ListView in Wicket

大兔子大兔子 提交于 2019-12-20 14:46:23
问题 I want to make a form with "Add" button. After pressing "Add" button new panel adds to the wicket ListView element. How do I do that? I want to be able add unlimited number of rows. EDIT: InteractivePanelPage.html <table> <tr> <td><a href="#" wicket:id="addPanelLink">Add Panel</a></td> </tr> <tr wicket:id="interactiveListView"> <td> <span wicket:id="interactiveItemPanel"></span> </td> </tr> </table> InteractivePanelPage.java // ... imports public class InteractivePanelPage extends WebPage {

Wicket vs Vaadin

妖精的绣舞 提交于 2019-12-20 08:24:24
问题 I am torn between Wicket and Vaadin. I am starting a micro-isv and need to make a choice of web framework. I have narrowed down my choices to Wicket and Vaadin. I have used both frameworks and I love them both. however I need to make a choice. If If I choose Vaadin: I wont have to worry much about the look and feel. It comes with nice themes. I will do all my programming in Java which am very good at and wont have to spend time hacking CSS which am not very good at. And most of the components

Which framework should I choose - Seam, Wicket, JSF or GWT? [closed]

馋奶兔 提交于 2019-12-20 08:07:37
问题 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 . I'm debating whether to use Seam, Wicket, JSF or GWT as the foundation for my presentation layer in a Java project. I narrowed my

session handling for request object in wicket framework

空扰寡人 提交于 2019-12-20 06:39:06
问题 1) i have added an element in request object given below, i need to get/read this in my webpage, how can i do it? <input type="hidden"> wicket:id="submitted" value="false" /> eg: in servlet, use request.getParameter("submitted") from hidden session. 2) in my controller class i want to set the value in session or hidden field, so that i can identify the user if he already processed the request or enetered my block of code. 回答1: 1) use HiddenField 2) use a custom WebSession object: public class

How to use post method in wicket

笑着哭i 提交于 2019-12-20 06:02:41
问题 when I want to redirect in my page to other I use this method exception: throw new RedirectToUrlException("/login/j_security_check?j_username=" + username + "&j_password=" + pass); problem is that this information are visible in browser. How I can send this and use POST method ? 回答1: POST redirects are a somewhat esoteric edge case with most browsers. Wicket's RedirectRequestHandler currently only supports HTTP codes 301 and 302. POST redirect would require 307, which will also show a warning

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

Invalid lambda deserialization

纵饮孤独 提交于 2019-12-20 03:26:30
问题 The Eclipse JDT compiler appears to have a problem whereby, under certain circumstances, Java 8 lamdas are not deserializing correctly and instead throw an IllegalArgumentException . I'm using the most recently distributed maintenance build, as follows: Eclipse SDK Version: Luna SR2 (4.4.2) Build id: M20141210-0900 There are existing bugs / SO entries that report similar issues that have been (at least partially) resolved in Luna SR2 (4.4.2) M20141210-0900 . I have personally verified that