wicket

Your experience with Scala+Wicket

倖福魔咒の 提交于 2019-11-29 19:53:13
Could you share your experience of using Scala and Wicket together? Do they fit naturally to each other? Do you get advantage of using Scala (and FP) with Wicket over using Java? Why did (would) you prefer Wicket over Lift? Peter Thomas For those interested in looking at code, I re-implemented the Seam "Hotel Booking" demo in Scala + Wicket here: Browse | SVN - the Java + Wicket version is here: Browse | SVN I used the (not yet final) Scala 2.8 and the NetBeans plugin. Was meaning to blog in detail about it (there's even a Groovy + Wicket implementation in place) but a few high-level

Simple way to use parameterised UI messages in Wicket?

守給你的承諾、 提交于 2019-11-29 18:03:09
问题 Wicket has a flexible internationalisation system that supports parameterising UI messages in many ways. There are examples e.g. in StringResourceModel javadocs, such as this: WeatherStation ws = new WeatherStation(); add(new Label("weatherMessage", new StringResourceModel( "weather.${currentStatus}", this, new Model<String>(ws))); But I want something really simple , and couldn't find a good example of that. Consider this kind of UI message in a .properties file: msg=Value is {0}

Wicket Label not updated / remains invisible

ぃ、小莉子 提交于 2019-11-29 15:33:05
问题 I am trying to implement Breadcrumb Navigation on a WebPage that exchanges a content Panel via ajax. It ends up looking like this: Home >> Page >> Panel Here is my page code: public MyPage() { super(); contentContainer = new WebMarkupContainer("contentContainer"); contentContainer.setOutputMarkupId(true); add(contentContainer); contentContainer.add(content = createContentPanel()); breadCrumbContainer = new WebMarkupContainer("breadcrumbContainer"); breadCrumbContainer.setOutputMarkupId(true);

using AutoCompleteTextField in wicket without String as the generic type

你。 提交于 2019-11-29 14:57:14
问题 This question follows this: handling to onchange event of AutoCompleteTextField in wicket I'm trying to use the AutoCompleteTextField with a custom class as the generic type, and to add an AjaxFormComponentUpdatingBehavior. What I mean is I want to have a AutoCompleteTextField<SomeClass> myAutoComplete = ...; and after that add a AjaxFormComponentUpdatingBehavior: myAutoComplete.add(new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target)

How can I disable serialization in Wicket 1.5?

自闭症网瘾萝莉.ら 提交于 2019-11-29 14:41:20
问题 I want to turn off serialization in my Wicket app and store all page/session information in RAM. My application has a very small number of users (generally 1); I do not need a cluster deployment; and I need to cache some non-serializable data between requests. Is there a way so that Wicket will not automatically attempt to serialize my pages / session? I tried the suggestion to use use HttpSessionDataStore at https://cwiki.apache.org/confluence/display/WICKET/Page+Storage, but it had no

Now with GWT 2, what are the advantages over wicket and likewise?

大城市里の小女人 提交于 2019-11-29 14:05:44
问题 Apart from the argument of Wicket's simplicity (that is, Wicket is a simpler system IMHO) and GWT's responsiveness in the client (GWT's client side state and JavaScript - potentially complex client side code) and GWT's greater potential for scaling, what is the argument for using GWT over Wicket? Personally I've done a lot of Wicket development, but have only had a quick look at GWT a long time ago. 回答1: The advantages are, basically, that GWT is a tool to build javascript-based client, thus,

Wicket 6.2 AbstractDefaultAjaxBehavior getCallbackUrl no longer resolves JS variables

假如想象 提交于 2019-11-29 12:38:24
Recently I have been working on upgrading a big web application that was using wicket 1.4.18 to 6.2. We had a situation where we would create javascript variables to keep track of positioning within a drag and drop list. This is just the wicket side of the code since the js has always worked and has not been changed. ListItem.add(new AbstractDefaultAjaxBehavior() { private static final long serialVersionUID = 1L; @Override public void onComponentTag(ComponentTag tag) { tag.put("ondrop", "var value = $(ui.item[0]).attr('hiddenvalue');" + this.getCallbackScript()); } @Override public final

Starting Wicket web application with OSGi HTTP Service

余生长醉 提交于 2019-11-29 11:53:49
I'm trying to start a Wicket Application using Felix implementation of OSGi HTTP service, for that I just register the service using WicketServlet with applicationClassName parameter: props.put("applicationClassName", MainApplication.class.getName()); service = (HttpService)context.getService(httpReference); service.registerServlet("/", new WicketServlet(), props, null); I have also tried using Felix Whiteboard implementation and registering the web service as a Servlet one: props.put("alias", "/"); props.put("init.applicationClassName", MainApplication.class.getName()); registration = context

Wicket and complex Ajax scenarios

纵饮孤独 提交于 2019-11-29 11:10:25
When a screen has multiple interacting Ajax controls and you want to control the visibility of components to react to these controls (so that you only display what makes sense in any given situation), calling target.addComponent() manually on everything you want to update is getting cumbersome and isn't very maintainable. Eventually the web of onClick and onUpdate callbacks can reach a point where adding a new component to the screen is getting much harder than it's supposed to be. What are the commonly used strategies (or even libraries if such a thing exists) to avoid this build-up of

Separator in a Wicket DropDownChoice

匆匆过客 提交于 2019-11-29 10:51:16
Is there some obvious way to add a separator to the list of options in a Wicket DropDownChoice? In my case I'm populating the selection with two types of domain objects from my datasource. I guess I could go and manually add some kind of dummy domain object to the choice list but it feels pretty ugly. Example: +---------+-+ | Apple |▼| | Orange +-+ | ------- | | Carrot | | Cucumber| +---------+ Current code (without any separator) looks something like: EntityModel model = getModel(); List<? extends Produce> foods = foodService.getAllProduce(); // getAllProduce() returns first all fruits, then