wicket

Wicket atmosphere initialization exception

为君一笑 提交于 2019-12-08 18:06:32
I have the following setup: wicket: 6.1.0 wicket-atmosphere: 0.4 (via Maven) On Application.init() I get a NullPointerException during instantiation of EventBus new EventBus(this); Exception: java.lang.NullPointerException at org.apache.wicket.atmosphere.EventBus.<init>(EventBus.java:105) This is caused because the method public synchronized static BroadcasterFactory getDefault() delivers null (the protected static member "factory" is not initialized). How do I use Wicket/Atmosphere properly? Did I forget something to initialize? I'm starting Wicket as a ServletFilter. <filter> <filter-name

Wicket Authorization Using MetaDataKey

安稳与你 提交于 2019-12-08 15:42:33
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; } public void setPrivilege(String privilege) { this.privilege = privilege; } public String

How to display html text within a Wicket element?

こ雲淡風輕ζ 提交于 2019-12-08 15:11:36
问题 i'm trying to display html i.e. rich text within a wicket element dynamically. An example is like displaying a rich text email within a div tag. how can i get this done with wicket. the wicket Label component doesn't seem to support this. is there a component that does 回答1: Found this in the excellent Manning Wicket in Action: add(new Label("markup", "<h1>Hello!</h1>").setEscapeModelStrings(false)); The call to setEscapeModelStrings tells Wicket not to escape the contents of the provided

How to customized properties folder in wicket

﹥>﹥吖頭↗ 提交于 2019-12-08 11:12:56
问题 in my application I have about about 20 pages, Each page have about 4 properties file for each language. Now all properties have to be in same directory as is *. java file. Is there option to change in ? I want to create new directory properties and here add all properties file. Or is there option to add all localized message in one file ? Problem is that in page a.hmtl properties "name" has value "a" and in another page b.html has the same key another value: "name" value "b" I try to add

Configuring Spring Wicket using Java Conf instead of xml

旧时模样 提交于 2019-12-08 11:08:43
问题 I'use Spring for a short time, but to wicket I am newbie. But I would like to give a try to this framework. I would like to configure this both frameworks togheter. But I would like to avoid usage of xml configuration file. I know that wicket can be configured that way, according to this: http://wicket.apache.org/guide/guide/single.html#helloWorld_2 and this: https://github.com/bitstorm/Wicket-tutorial-examples/tree/master/SpringInjectionExample But for now I am getting only errors: lis 15,

Why doesn't my Wicket Panel rerender after changing the default model?

牧云@^-^@ 提交于 2019-12-08 10:13:56
问题 When the page with the MessagePanel first renders, the message and the approve link render perfectly. When I click the approve link, all the business logic works as desired, the getNextMessage() method returns the appropriate object, but the message panel does not update on the page in the browser. That is, the message body Label does not update. JPAEntityModel extends LoadableDetachableModel. What am I missing? And how do I fix it? public class MessagePanel(String id, IModel<Message>

Why is Jetty hanging when I try to start it in debug mode?

烂漫一生 提交于 2019-12-08 09:50:54
问题 My problem is that when I try to launch Start.java in debug mode, Jetty hangs. Here is my Start.java file, taken from the Wicket quickstart page Server server = new Server(); SocketConnector connector = new SocketConnector(); // Set some timeout options to make debugging easier. connector.setMaxIdleTime(1000 * 60 * 60); ..... try { System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP"); server.start(); System.in.read(); System.out.println(">>> STOPPING EMBEDDED JETTY

Wicket atmosphere initialization exception

依然范特西╮ 提交于 2019-12-08 07:51:36
问题 I have the following setup: wicket: 6.1.0 wicket-atmosphere: 0.4 (via Maven) On Application.init() I get a NullPointerException during instantiation of EventBus new EventBus(this); Exception: java.lang.NullPointerException at org.apache.wicket.atmosphere.EventBus.<init>(EventBus.java:105) This is caused because the method public synchronized static BroadcasterFactory getDefault() delivers null (the protected static member "factory" is not initialized). How do I use Wicket/Atmosphere properly?

Wicket Dynamic Resource Displayed in HTML

╄→尐↘猪︶ㄣ 提交于 2019-12-08 07:39:23
问题 I have a Wicket page which will dynamically display an image. Let's say the image is the current date/time. In HTML, I would have something like <img src="[dynamically generated]"/> Assume I have a utility method which returns to me a byte[] of the current image. public byte[] getCurrImage(); How do I implement this dynamic resource in Wicket (HTML/Java)? I can't mount a shared resource because the image will keep changing all the time. Do I need to save the image somewhere? Thanks 回答1:

Wicket - getting body of markup element

試著忘記壹切 提交于 2019-12-08 07:22:35
问题 Assuming I have markup that looks like this : <span wicket:id="text">Some text that I'd like to read</span> Is it possible to get the content of the body of the tag somewhere, or is it irremediably stripped by wicket? Edit : My intent is to implement some kind of simple CMS. Users need to be able to enter LaTeX formulas, in the form of tex>a^2</tex> that I would then render with a RenderedDynamicImageResource. Other tags need to be interpreted in a similar way. I envisioned to do it in two