wicket

Styling text for textarea Wicket

不想你离开。 提交于 2019-12-24 00:07:08
问题 I have got a string which consists of textlines. I would like to input these lines into a textarea with some css styles(eg changing the colour of some lines). How can this be done? 回答1: TinyMCE does do a pretty decent job of rendering CSS and other markup in an editor. To include this easily with Wicket, I suggest the org.wicketstuff.tinymce-parent package. The development/source code is in GitHub and the actual releases are in the public maven repository. You can then use a standard Wicket

How do you make a link inside a PropertyColumn in Wicket?

只愿长相守 提交于 2019-12-23 22:18:24
问题 I successfully made an AjaxFallbackDefaultDataTable, but I want to make the contents of the cells links. How do I do this with Apache Wicket? 回答1: You can use an AbstractColumn instead of a PropertyColumn . This will allow you to add whatever component you like, rather than just the string value of the PropertyModel. columns.add(new AbstractColumn("displayModel", "sortModel") { void populateItem(Item cellItem, String componentId, IModel rowModel) { cellItem.add(new LinkPanel(componentId,

How to avoid superfluous Wicket log warnings when using field-specific FeedbackLabels?

a 夏天 提交于 2019-12-23 19:47:26
问题 I'm using "FeedbackLabels" to show component-specific validation messages, based on ideas and code in this blog post: User friendly form validation with Wicket. Problem is, pages using such FeedbackLabels for validation messages flood the log with superfluous warnings: 2012-05-04 10:43:32,824 ["http-bio-8080"-exec-6] WARN org.apache.wicket.protocol.http.WebSession - Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.

Is Wicket a suitable Web java framework for Single Page Applications? [closed]

房东的猫 提交于 2019-12-23 18:30:56
问题 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 6 years ago . Or there are best options (frameworks) for this kind of application, SPA? I'm interested in use only Scala or Java frameworks for

Wicket.Ajax.Call.failure: Error while parsing response: Object required

旧巷老猫 提交于 2019-12-23 17:30:03
问题 I just spent several hours of my life debugging this problem. I'm documenting it here for others. Question: I'm getting the following error when I try to click on an AjaxLink in Internet Explorer: Wicket: ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Object required It works fine in all other browsers; just IE is busted. 回答1: Check to make sure that your HTML is 100% syntactically correct. Ajax responses are returned to the browser inside a CDATA section, and if the payload

How can I obtain server variables using apache wicket 1.54?

陌路散爱 提交于 2019-12-23 17:28:50
问题 I am trying to get the name and ip of the current server in which my web application is running on. I am not sure how to do this is wicket 1.54. I need to know how to get at my server variables. In wicket 1.4 you could do: HttpServletRequest hsr = getWebRequestCycle().getWebRequest().getHttpServletRequest(); Then you could use hsr to grab headers or attributes. Edit: In wicket 1.54 the equivalent line is: HttpServletRequest hsr = (HttpServletRequest)getRequestCycle().getRequest()

Download a zip file through wicket

南楼画角 提交于 2019-12-23 13:15:08
问题 I am using wicket framework, and I have made a zip file by Java code, I want to have a link to download it, I don't know if it is possible or I should make the zip file by wicket (but not Java) and then have a link to download. 回答1: Take a look at ZipResourceStream. With this class you can generate zip contents of a directory on the fly, and use a org.apache.wicket.markup.html.link.ResourceLink with ResourceStreamResource to link to it. File file = new File(path); IResourceStream resStream =

handling to onchange event of AutoCompleteTextField in wicket

社会主义新天地 提交于 2019-12-23 08:52:58
问题 I'm writing an autocomplete component for a webapp using Java and Wicket. Is there a way to handle the onchange event to run some code when the user selects one of the options of the autocomplete list? I tried doing this in the AutoCompleteTextField: setOutputMarkupId(true); add(new AjaxEventBehavior("onchange") { @Override protected void onEvent(AjaxRequestTarget target) { System.out.println(getInput()); } }); But the getInput method returns null. :( Is there a way to react to the onchange

handling to onchange event of AutoCompleteTextField in wicket

左心房为你撑大大i 提交于 2019-12-23 08:52:43
问题 I'm writing an autocomplete component for a webapp using Java and Wicket. Is there a way to handle the onchange event to run some code when the user selects one of the options of the autocomplete list? I tried doing this in the AutoCompleteTextField: setOutputMarkupId(true); add(new AjaxEventBehavior("onchange") { @Override protected void onEvent(AjaxRequestTarget target) { System.out.println(getInput()); } }); But the getInput method returns null. :( Is there a way to react to the onchange

Wicket - Reusable panels with java inheritance

青春壹個敷衍的年華 提交于 2019-12-23 08:51:57
问题 I have following java classes: I have a two form components which are mapped to Type1Task and Type2Task with a CompoundPropertyModel: Problem: Duplicate Code. I want the D and E Fields to map to a task, not the task types. Is there any way to make this reusable when I hava java inheritance? If yes, can u provide me with tutorials or references? Additional info: The task can contain a timer(thread). If you click on submit button the timer will be started. Thank you! 回答1: You can duplicate the