wicket

How to enforce a 5-minute per post rule in a session object in Java?

I'm trying to figure out how to enforce a 5 minute per post/action rule. I'm developing a web application with Wicket in Java and I've got a session class which I was planning on using to keep track of these timers on a per-user basis. I wasn't planning on storing the timestamp in a database. I've got the method below in my session cl...

How to deal with databases for websites written in Java, more specifically Wicket?

Hi there. I'm new to website development using Java but I've got started with Wicket and make a little website. I'd like to expand on what I've already made (a website with a form, labels and links) and implement database connectivity. I've looked at a couple of examples, in example Mystic Paste, and I see that they're using Hibernate ...

Wicket Authorization Using MetaDataKey

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 ...

How can I transfer output that appears on the console and format it so that it appears on a web page?

package collabsoft.backlog_reports.c4; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; //import collabsoft.backlog_reports.c4.Report; public class Report { private Connection con; public Report(){...

Wicket Authorization

Is it possible use a metadata driven component based authorization? Wicket in Action gives an example @AdminOnly private class ModeLink extends Link {.....} Then implement isActionAuthorized() of the Authorization Strategy. But I feel that it is not a good solution to create new classes for every role. Is there a metadata driven wa...

Wicket CheckBox (Model problem)

How can I make wicket to call CheckBox setObject every time form is submitted? new CheckBox("booox", new IModel(){ .. .. .. }); Now it's called only IF value has changed. Please? ...

Wicket: Relative to absolute URL or get base URL

If I have a relative path to a static asset (flash/blah.swf), what is the best way to programmatically convert this to an absolute URL (http://localhost/app/flash/blah.swf)? Or what is the best way to get the base URL of the Wicket application? I've tried using RequestUtils.toAbsolutePath but it doesn't seem to work reliably and is frequ...

Set focus on a component with Apache Wicket?

How do you set focus on a component with Apache Wicket? Searching leads to very little information, mostly on setting the default field. I do not want to set a default field, rather I am looking to set focus when, for example, a specific radio button is selected. ...

Language drop-down selector.

I want to be able to create a drop-down select box based on the languages my website supports. I can't seem to find a component in Wicket that does this out-of-the-box. How can I do this? ...

Customize dreamweaver CS3 form tag inserts

Does anyone know of a Dreamweaver CS3 hack to change what code is inserted when a form element is added? My purpose is to allow make Dreamweaver layout do a little of the work for a Wicket form. Example I use CS3 GUI to create a form element like this: I'm specifying the name, id. I would like to modify Dreamweaver's insert beha...

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

Hi there. 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 s...

Wicket: stateless AJAX behaviors in stateful page without serialization

I have pretty stateful page with plenty of AJAX components. Most of these components have behaviors, which renders JavaScript code for calling AJAX requests to Java code. Because page isn't stateless, each request causes serialization of page. So far so good. But some of these AJAX requests doesn't change page ever, so serialization of ...

How to use the model in wicket?

I try to create an page of the following structure: MainPage { DateSelector {} TabGroup { Tab0 {...} Tab1 {...} Tab2 {...} } } DateSelector is a component (extending Panel) that enables the user to select a timespan (startDate, endDate). TabGroup extending "AjaxTabbedPanel". The tabs shown in the Ta...

What's the easiest way to implement background downloading in Wicket?

I've got a simple Wicket form that lets users select some data and then download a ZIP file (generated on the fly) containing what they asked for. Currently the form button's onSubmit() method looks something like this: public void onSubmit() { IResourceStream stream = /* assemble the data they asked for ... */ ; ResourceStreamR...

How do you manually set a RadioGroup value in wicket?

I'm trying to change the selected radio button in a Wicket RadioGroup during an AjaxEventBehavior but can't figure out how to do so. Specifically when a user types some text in a textbox I want to change the selected radio button to one I specify. How do you do this? Here's what I have so far (it crashes on addComponent): myRadioGrou...

Prevent browser form submission when Wicket AjaxFormValidatingBehaviour validation fails

I have a Page with a Wizard component. The user can navigate the panels of the wizard by using the next and previous buttons which I have performing full (non-ajax) form submissions so that the app is back-button friendly. When the next button is clicked, I would like to attempt ajax form validation (if javascript is enabled). I tried d...

Wicket WAR in Jetty: .html files not on classpath

Hi, I deployed a Wicket-based app's .war file to Jetty 7.0.2. The problem is that Jetty copies the classpath to a temp dir, but only copies *.class, so *.html is not available for the classloader and I get the error: WicketMessage: Markup of type 'html' for component 'cz.dynawest.wicket.chat.ChatPage' not found. Copying the war as an ...

How can I put the markup for a Wicket FormComponentPanel inside of a wicket:fragment?

I am putting a TextField and a DropDownChoice inside a FormComponentPanel which is supposed to use setConvertedInput to TextField's value concatenated with DropDownChoice's value. However, I would like to put the markup for the FormComponentPanel inside a wicket:fragment in the markup file that contains the containing form. Here's an ab...

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

I successfully made an AjaxFallbackDefaultDataTable, but I want to make the contents of the cells links. How do I do this with Apache Wicket? ...

Object equality in context of hibernate / webapp

How do you handle object equality for java objects managed by hibernate? In the 'hibernate in action' book they say that one should favor business keys over surrogate keys. Most of the time, i do not have a business key. Think of addresses mapped to a person. The addresses are keeped in a Set and displayed in a Wicket RefreshingView (wit...