wicket

How do I change link-text in Wicket?

 ̄綄美尐妖づ 提交于 2019-12-23 07:45:34
问题 I created a link with static text. That works fine but now I also want to change the text when you click the link. I got as far as this: add(new Link("doAnything") { @Override public void onClick() { // change the text! // this.modelChanging(); // this.detach(); } }); I hope you can give me some easy advice - I'm really new to this :) Best regards Elias 回答1: The HTML: <html><head></head><body> <wicket:panel> <a href="" wicket:id="link"> <wicket:container wicket:id="label" /> </a> </wicket

Load resources (javascript) in a web application framework (wicket) correctly?

淺唱寂寞╮ 提交于 2019-12-23 04:52:32
问题 I am using Apache Wicket as my webapp framework and I have a following structure: What I need: 1) The javascript file Rules.js should be loaded and readable for my Custom Java Class Process.java. Because in my Process.java I have something like this: private String readFile(String filename) throws IOException { File file = new File("PATH"); //reads the file and returns a string ... } So the first question would be: What path instead of "PATH" should I use, when my resource Rules.js is in the

replace wicket 6.3 jquery

耗尽温柔 提交于 2019-12-23 04:47:35
问题 After migration to wicket 6.3, I encountered an error in console of developertools in chrome on pages that use jquery. it seems that the jquery that wicket 6.3 use built-in, contains some link to rvzr-a.akamaihd.net. Failed to load resource: the server responded with a status of 403 (Forbidden) http://rvzr-a.akamaihd.net/amz/aeyJhZmZpZCI6MTAxOCwic3ViYWZmaWQiOjEwMjIsImh…2h0Ijo3NjgsImxvYWRlcl9jbGllbnRfdGltZXN0YW1wIjoxMzc2MzY2MTU0MTAxfQ%3D%3D.js 回答1: You can provide Wicket with your own version

Wicket create images from file system

梦想与她 提交于 2019-12-23 04:34:31
问题 I am making a project in which user when click on a product a modal window open with the product name. I also want to include the product image on my modal window inside a panel. Images are stored on my server in a directory. I am referring to this link My panel html code look like this http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ ItemOrderPanel.html <div> <li><a wicket:id="link"></a></li> </div> ItemOrderPanel.java final ResourceReference imageResourceReference = new

Wicket Authorization Using MetaDataKey

烈酒焚心 提交于 2019-12-23 03:18:07
问题 I am trying to implement a simple authorization strategy for my Wicket application. I am implemented my own AuthorizationStrategy (extending IAuthorizationStrategy). http://old.nabble.com/Authorization-strategy-help-td18948597.html After reading the above link, I figured it makes more sense to use metadata-driven authorization than one using Annotations. So I have a simple RoleCheck class public class RoleCheck { private String privilege; public RoleCheck(String priv) { this.privilege = priv;

Wicket Authorization Using MetaDataKey

拟墨画扇 提交于 2019-12-23 03:18:05
问题 I am trying to implement a simple authorization strategy for my Wicket application. I am implemented my own AuthorizationStrategy (extending IAuthorizationStrategy). http://old.nabble.com/Authorization-strategy-help-td18948597.html After reading the above link, I figured it makes more sense to use metadata-driven authorization than one using Annotations. So I have a simple RoleCheck class public class RoleCheck { private String privilege; public RoleCheck(String priv) { this.privilege = priv;

Get the HTML output data from a wicket component

旧巷老猫 提交于 2019-12-22 13:51:07
问题 I'm currently writing a web widget , and I would like to fill the content of this widget with some HTML data generated by a wicket component on my server. To do that, the server will output the HTML data via JSONP. So far so good. However I need to get this HTML data. How can I get on the server the HTML output from some wicket component ? 回答1: I dont know if this can be applied to your configuration, but I am using a view lines of code to retrieve rendered html which I wrote some time ago

Refreshing a wicket Panel in browser refresh

岁酱吖の 提交于 2019-12-22 11:33:48
问题 Im working on a pay-role system, and once the user refreshes the browser i need to refresh the statistics available in that page (the stats should be taken from the DB and display). But right now it doesn't work properly, cos in page refresh the java code doesn't get invoked but loads the cached page with the previous data. I tried fixing it adding the below code but it didn't work as well. @Override protected void setHeaders(WebResponse response) { response.setHeader("Cache-Control", "no

Wicket @SpringBean doesn't create serializable proxy

蓝咒 提交于 2019-12-22 10:45:41
问题 @SpringBean PDLocalizerLogic loc; When using above I receive java.io.NotSerializableException. This is because loc is not serializable, but this shouldn't be problem because spring beans are a serializable proxies. I'm using wicket-spring library, and as injector SpringComponentInjector, where wrapInProxies is by default set to true, so I think that proxies should be created, but they aren't. On the page https://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach is written:

Components not reloading on url change in Wicket 1.5(.2)?

痴心易碎 提交于 2019-12-22 10:25:06
问题 I navigate to my application the first time with following URL: .../homepage/?0&user= x In debug mode I see wicket is nicely instantiating my panels and such (obviously). if I change the URL to: .../homepage/?0&user= y then nothing happens, the panels are not re-initialized (for the new user => data of user x is still shown) nor are LoadableDetachable -or other models invoked. However, if I change the URL to: .../homepage/? 1 &user=y then all panels are nicely initialized for user y One step