wicket

Using <wicket:message> tag to produce partially formatted text

谁说胖子不能爱 提交于 2019-12-10 13:29:40
问题 I've read about wicket:message here, but can't seem to make it do everything I'd like. Say I have a HTML page with <wicket:message key="text"/> and a properties file containing text=Blah blah: important point, foo bar . I'm wondering how to make part of the text bold (or apply arbitrary CSS to it), to achieve output like: Blah blah: important point , foo bar Note that none of this is actually dynamic , so I wouldn't want to do anything in Java, if that can be avoided. I've tried nesting tags

How to defeat browser dialog popup when calling Wicket setResponsePage() from modal window?

你说的曾经没有我的故事 提交于 2019-12-10 13:22:06
问题 How to defeat IE and Firefox dialog popup when trying to setResponsePage() from a wicket modalWindow per below. Dialog popup demands an answer to: "This page is asking you to confirm that you want to leave - data you have entered may not be saved." AjaxLink signInContainer = new AjaxLink("signInContainer") { @Override public void onClick(AjaxRequestTarget target) { target.appendJavascript("Wicket.Window.unloadConfirmation = false;"); modalWindow.close(target); setResponsePage(SignInPage.class

How to make weblogic form authentication in wicket

纵然是瞬间 提交于 2019-12-10 11:44:11
问题 I want make weblogic form validation in wicket but I dont know how to create login page. I followed this tutorial where is example in jsp: http://docs.oracle.com/cd/E13222_01/wls/docs100/security/thin_client.html#wp1057581 I create similar form in wicket but I dont know what should I do when I push submit button. There is some action called "j_security_check" but i dont know how should i implement it in java and wicket UPDATE: I am using weblogic 10.something and I cant use newest I try to

Wicket wants to serialize my Panel

妖精的绣舞 提交于 2019-12-10 10:52:38
问题 When I access a specific page of my Wicket application, I get a NotSerializableException: java.io.NotSerializableException: my.package.MyPanel$1 But I can't explain why wicket should try to serialize the Panel . Any idea? I don't know if it helps, but here is the code I use to add the panel: final User profileUser = ...; final IModel<User> loggedInUser = ...; add(new MyPanel("panelid", new Model<MyObject>(new MyObject())) { @Override public boolean isVisible() { return profileUser != null &&

How to set custom HTTP response header in Wicket's Ajax responses?

喜你入骨 提交于 2019-12-10 10:38:01
问题 I need to set a custom HTTP header to all responses from my Wicket application. I'm currently doing it in a custom RequestCycle, where getWebResponse() is overridden along these lines: @Override public WebResponse getWebResponse() { WebResponse response = super.getWebResponse(); response.setHeader("X-custom", "..." ); return response; } This has worked great, until now that I've switched to using AjaxCheckBox (something like this) instead of normal CheckBox for certain configuration options.

How open modal window on page load in wicket 1.5

夙愿已清 提交于 2019-12-10 10:07:05
问题 I was using wicket 1.4.x for some time and solution found here worked pretty well: How to open ModalDialog on PageLoad But when I moved to wicket 1.5 I simply don't know how make a modalwindow popup on page load. A piece of code looks like this: private PlainModalWindow tmpPassChange = new PlainModalWindow( "tmp_pass_change" ); tmpPassChange.add( new OpenWindowOnLoadBehavior() ); tmpPassChange.setInitialHeight( 418 ); tmpPassChange.setResizable( false ); tmpPassChange.setMaskType( ModalWindow

Java/Wicket: Compile Basic Hello World with Resources

戏子无情 提交于 2019-12-09 16:31:02
问题 I am following this example of a Hello World Wicket application https://www.ibm.com/developerworks/web/library/wa-aj-wicket/ In particular I placed HelloWorld.html in my source directory next to HelloWorld.java . My file structure looks like this: $ tree . ├── pom.xml ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ └── example │ │ │ └── wicket │ │ │ ├── HelloWorld.html │ │ │ ├── HelloWorld.java │ │ │ └── HelloWorldApplication.java │ │ ├── resources │ │ └── webapp │ │ └── WEB-INF │ │ └──

GWT vs Apache Wicket

这一生的挚爱 提交于 2019-12-09 09:06:59
问题 Both GWT and Wicket are stateful, java object oriented based. GWT is completely client based with features like javascript optimization, CSS optimization, and I'm pretty new to Apache Wicket. The more I read about Wicket the more similar it feels to GWT. So I guess the question is - What are the differences between GWT and Wicket? Or am I comparing apples to oranges? 回答1: It is pretty much apples to oranges. This wiki entry summarizes some of the similarities and differences, and the start of

Why is my Hibernate Query returning stale data?

淺唱寂寞╮ 提交于 2019-12-09 06:45:50
问题 Quick Version Basically, I'm updating a Hibernate Table and subsequent queries are loading a stale value. Detailed Version Hibernate (3.3.1.GA) and EhCache (2.4.2). Persisted Book object with a List<PageContent> of pages and I'm adding a page to the middle of this book. I'm using Databinder/Wicket, though I do not think that is related. public void createPageContent(Book book, int index) { Databinder.getHibernateSession().lock(book, LockMode.UPGRADE); PageContent page = new PageContent(book);

Jetty 7: configuring JNDI for Start.java

给你一囗甜甜゛ 提交于 2019-12-09 05:39:45
问题 Following Wicket 1.5's lead, I'm converting a project from Jetty 6.1.25 to 7.5.0.v20110901. My existing Start.java contains the following setup, which I use to configure JNDI: EnvConfiguration envConfiguration = new EnvConfiguration(); URL url = new File("src/main/webapp/WEB-INF/jetty-env.xml").toURI().toURL(); envConfiguration.setJettyEnvXml(url); bb.setConfigurations(new Configuration[]{new WebInfConfiguration(), envConfiguration, new org.mortbay.jetty.plus.webapp.Configuration(), new