wicket

How to convert Ant project to Maven project

江枫思渺然 提交于 2019-11-27 05:39:36
问题 How to convert a Ant project to Maven project? A sample project that would link (a Wicket project) Thanks 回答1: The nice part of using maven is that most standard stuff works automatically once you do things the maven way. For a simple webapp: Create a pom with groupId, artifactId and version (packaging: war) Add the required dependencies to the pom move the java sources to src/main/java, resources to src/main/resources, webapp content to src/main/webapp, test content to src/test/java and src

Anonymous inner classes in C#

风格不统一 提交于 2019-11-27 03:47:13
问题 I'm in the process of writing a C# Wicket implementation in order to deepen my understanding of C# and Wicket. One of the issues we're running into is that Wicket makes heavy use of anonymous inner classes, and C# has no anonymous inner classes. So, for example, in Wicket, you define a Link like this: Link link = new Link("id") { @Override void onClick() { setResponsePage(...); } }; Since Link is an abstract class, it forces the implementor to implement an onClick method. However, in C#,

Wicket: how to render page programmatically and get result as string?

喜欢而已 提交于 2019-11-27 03:26:02
问题 I'm in the process of converting an app to use i18n/l10n on all its pages. I'm very happy with Wicket's support for this, and it's going well so far. The one tricky part I've run into is the following: We have a text file that is used as an HTML template to send email when users perform a certain operation on the site. When the user clicks a particular link, I read in this template manually, do some text substitutions like "Dear $USERNAME" , and send the result as an HTML email to the user.

How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?

大城市里の小女人 提交于 2019-11-27 00:27:33
问题 I've deployed an Apache Wicket web-application that uses Spring and Hibernate to my Tomcat 5.5 instance. When I navigate to the Tomcat Manager interface I see that the web-application I deployed is not running. When I press 'Start' I get the following error message; "FAIL - Application at context path /spaghetti could not be started". My catalina.log contains the following: Apr 15, 2010 1:51:22 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/var/lib

How to use Wicket's DownloadLink with a file generated on the fly?

霸气de小男生 提交于 2019-11-26 22:39:44
DownloadLink is nice and handy for creating a button/link for downloading a file, along these lines: add(new DownloadLink("downloadButton", getReportFile(), "report.pdf")); and <input type="button" wicket:id="downloadButton" value="Download" /> However, I would like to trigger the generation of the file to download only when the button/link is clicked . In other words, upon click, I'd call a method that generates the file (a Pentaho report in our case), puts it in a temp place and returns a File pointing to it. Then I'd tell the DownloadLink to use that File . Question is, is this possible

Youtube embed: Unsafe JavaScript attempt to access frame

試著忘記壹切 提交于 2019-11-26 19:14:02
问题 We have a Wicket app with a page that includes an embedded Youtube video. The video embeds and plays fine, but apparently it causes the rest of the page to not render- it seems that the DOM elements coming after the embed simply don't show up on the page, despite being in the markup. Looking at the error console in Chrome reveals: Unsafe JavaScript attempt to access frame with URL http://example.com/detail/COMMUNICATION/search/com-sonyericsson-hanashi from frame with URL http://www.youtube

delete version number in url

北战南征 提交于 2019-11-26 17:44:47
How can I delete or hide the version number in the URL introduced in Wicket 1.5? Mounting a page doesn't help. http://localhost/MyPage/SubPage?0 Apostolos In Application.init(): mount(new MountedMapperWithoutPageComponentInfo("/subpage", MyPage.class)); with the following Mapper class: public class MountedMapperWithoutPageComponentInfo extends MountedMapper { public MountedMapperWithoutPageComponentInfo(String mountPath, Class<? extends IRequestablePage> pageClass) { super(mountPath, pageClass, new PageParametersEncoder()); } @Override protected void encodePageComponentInfo(Url url,

Scope &#39;session&#39; is not active for the current thread; IllegalStateException: No thread-bound request found

帅比萌擦擦* 提交于 2019-11-26 12:49:54
I have a controller that I'd like to be unique per session. According to the spring documentation there are two details to the implementation: 1. Initial web configuration To support the scoping of beans at the request, session, and global session levels (web-scoped beans), some minor initial configuration is required before you define your beans. I've added the following to my web.xml as shown in the documentation: <listener> <listener-class> org.springframework.web.context.request.RequestContextListener </listener-class> </listener> 2. Scoped beans as dependencies If you want to inject (for

How to use Wicket&#39;s DownloadLink with a file generated on the fly?

瘦欲@ 提交于 2019-11-26 08:26:02
问题 DownloadLink is nice and handy for creating a button/link for downloading a file, along these lines: add(new DownloadLink(\"downloadButton\", getReportFile(), \"report.pdf\")); and <input type=\"button\" wicket:id=\"downloadButton\" value=\"Download\" /> However, I would like to trigger the generation of the file to download only when the button/link is clicked . In other words, upon click, I\'d call a method that generates the file (a Pentaho report in our case), puts it in a temp place and

delete version number in url

感情迁移 提交于 2019-11-26 05:34:17
问题 How can I delete or hide the version number in the URL introduced in Wicket 1.5? Mounting a page doesn\'t help. http://localhost/MyPage/SubPage?0 回答1: In Application.init(): mount(new MountedMapperWithoutPageComponentInfo("/subpage", MyPage.class)); with the following Mapper class: public class MountedMapperWithoutPageComponentInfo extends MountedMapper { public MountedMapperWithoutPageComponentInfo(String mountPath, Class<? extends IRequestablePage> pageClass) { super(mountPath, pageClass,