Failing to remove item from list when drag and dropping

2010-04-16 Thread Johan Haleby
Hi, I have a use case that reads as follows: I need two lists next to each other. When starting up the left list is empty and I add items to it by dragging them from the right list and dropping them on the left. These items should be copied, (i.e. _not_ moved, the right list should be static)

Re: AjaxSubmitLink javadocs

2010-04-16 Thread Xavier López
Thanks for the answer, Jeremy. I just created issue https://issues.apache.org/jira/browse/WICKET-2837. I'm with you on what you state, it was obvious the only possible way to do a submit without JS is to have an html submit mechanism, anyway, I was just being cautious in case I was missing

Detect bookmark access to nonbookmarkablepages

2010-04-16 Thread Xavier López
Hi there, I'm trying to find an elegant way to detect the cases where a user tries to access a nonbookmarkablepage with a bookmark. From the stack trace produced in this case, I see this situation is handled in DefaultPageFactory#newPage(Class pageClass), like this:

Re: Type Inference for Wicket 1.4

2010-04-16 Thread James Carman
And, nothing is stopping you from doing something like this in your own code. I have a class called ComponentUtils where I put stuff like this. I have two methods: public static T extends Serializable IModelT modelOf(T bean); public static T extends Serializable IModelT modelFor(ClassT

Bug in Page refresh?

2010-04-16 Thread Wolfgang Grossinger
We have a DropDownChoice to change the language of a page (the language in mapped through an enum). The handler to change the code is as follows. @Override protected void onSubmit(AjaxRequestTarget target) {

Re: Type Inference for Wicket 1.4

2010-04-16 Thread Erdinc
Or use wicket as I explained on this page :) http://java.dzone.com/articles/faster-development-easywicket From: James Carman jcar...@carmanconsulting.com To: users@wicket.apache.org Sent: Fri, April 16, 2010 2:05:12 PM Subject: Re: Type Inference for Wicket

set focus on a field when opening a ModalWindow

2010-04-16 Thread Bernard
Hello, Sorry to come back with this item, but I can't figure out how to set focus on a form element when opening a ModalWindow (iframe version). I tried to use target.focusComponent() within the calling page, but as components are created inside the called page, I can't have the right

WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
Hello guys! In a page, I have a button. The button starts a thread, just like this, but I get the exception in the bottom. Here is some code: @Override protected void onSubmit(final AjaxRequestTarget target, Form? form) { final FileUpload fileUpload =

Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Cemal Bayramoglu
Component's getString method will try to get the laocalizer from the Application, and the Application instance (singleton for a Wicket web-app) is bound to the thread processing your request, not to the one you have spawned off of it Regards - Cemal jWeekend OO Java Technologies, Wicket

Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Ernesto Reinaldo Barreiro
Do not use make references to components on the thread. Instead create an instance of runnable to which you pass all the information you need and use a kind of context to communicate with the Web layer if you need to pass back information. Best, Ernesto 2010/4/16 Martin Asenov

Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Ernesto Reinaldo Barreiro
If you need an example on how to do this I can point you to a somewhat similar example. Ernesto On Fri, Apr 16, 2010 at 3:15 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Do not use make references to components on the thread. Instead create an instance of runnable to which you

RE: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
I already saw one in javathoughts.com, but I don't see any major differences. Best, Martin -Original Message- From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Sent: Friday, April 16, 2010 4:17 PM To: users@wicket.apache.org Subject: Re: WicketRuntimeException: There is no

RE: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
Should I pass the application's instance to the thread, which I can split in a separate class? Best, Martin -Original Message- From: ce...@jweekend.com [mailto:ce...@jweekend.com] On Behalf Of Cemal Bayramoglu Sent: Friday, April 16, 2010 4:09 PM To: users Subject: Re:

Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Ernesto Reinaldo Barreiro
Why not path the information you need to a runnable? and create a class you use as context to communicate WEB and thread layer... IMHO that will be a cleaner solution. Ernesto 2010/4/16 Martin Asenov mase...@velti.com Should I pass the application's instance to the thread, which I can split

New blog post Components v.s. Pages

2010-04-16 Thread Erwin Bolwidt
Hi, I created a blog posted titled Wicket best practices: Components v.s. Pages http://blog.worldturner.com/worldturner/entry/wicket_best_practices_components_v We've been using wicket at my current location for quite a few projects now and I'm writing a few blog entries on the things that

Repeating form on a page

2010-04-16 Thread David Hamilton
I am new to Wicket (and have had great help from this community so far - thank you). My question here is that I'm trying to setup a simple contact form where a person may have zero or more contacts. My solution is to make the contact info a form within a panel. However, I need to repeat the panel

Re: AjaxSubmitLink javadocs

2010-04-16 Thread Jeremy Thomerson
Every little bit helps - look how long it's been and nobody noticed it and brought it to our attention - but it could have thrown some people off. Thanks for the help! I'll commit a fix this weekend when I get a few free minutes. :) -- Jeremy Thomerson http://www.wickettraining.com On Fri,

Re: Repeating form on a page

2010-04-16 Thread James Carman
The forms are all based on models. So, just make sure you use a different model for each form. I'd look into ListView, perhaps. On Fri, Apr 16, 2010 at 9:48 AM, David Hamilton dhamil...@hermitagelighting.com wrote: I am new to Wicket (and have had great help from this community so far - thank

Re: resources folder / package

2010-04-16 Thread Eyal Golan
thanks Cemal and Apple. i think i got it. Will test it on Sunday. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Apr 16, 2010 at 5:13 AM,

Re: Repeating form on a page

2010-04-16 Thread Xavier López
Hi, I've been through a similar issue recently, also with a 'remove' button to delete elements from the list. I ended up using RefreshingView (that's the one I'd reccomend), and it worked nicely. However I'll expose the various solutions I've gone through, hoping to provide some background on

Re: Bug in Page refresh?

2010-04-16 Thread Xavier López
Hi Wolfgang, If I had to refresh the entire page on language change, I would not do it with an Ajax Request, but with a normal one instead. I do not know how will setResponsePage behave in a serverside Ajax callback. However, if you need to do it with ajax, you should add the language dependent

YuiMenuBarItem getMenuClass menu2

2010-04-16 Thread Steve Lowery
I'm trying to create a YuiMenuBar for my application using the ones in the menu2 packages. It works great, but I want to style one of the YuiMenuBarItems differently. I see there is an overridable getMenuClass() method, but there are 2 issues: 1. The only way to contruct a YuiMenuBarItem is

Re: Detect bookmark access to nonbookmarkablepages

2010-04-16 Thread Igor Vaynberg
use a decorator, wrap the default factory, catch the exception, transform it into something else. although, if your users are bookmarking a non-bookmarkable url you should get a page expired error. page factory is only used for creating bookmarkable pages. -igor On Fri, Apr 16, 2010 at 1:37 AM,

Re: Repeating form on a page

2010-04-16 Thread Igor Vaynberg
this may give you some ideas http://wicketinaction.com/2008/10/building-a-listeditor-form-component/ -igor On Fri, Apr 16, 2010 at 6:48 AM, David Hamilton dhamil...@hermitagelighting.com wrote: I am new to Wicket (and have had great help from this community so far - thank you). My question

Interstitial window prompt then open a new window

2010-04-16 Thread Doug Leeper
We are needing an interstitial window that prompts a user if they want to continue to another site. Additionally, we would like to provide a checkbox if they would not longer like to see this prompt again. I can prompt via a ModalWindow and capture their response...but what I am not sure what

Re: Detect bookmark access to nonbookmarkablepages

2010-04-16 Thread Xavier López
Thanks for the feedback, Igor, nice idea. About the page factory exception, in fact I have nonbookmarkablepages mounted as if they were, just to makeup the url's, like this: mount(new HybridUrlCodingStrategy(/pageA, PageA.class)); So that when the user enters PageA (no default constructor - non

Re: New blog post Components v.s. Pages

2010-04-16 Thread Iain Reddick
Thanks - I think insights from more experienced wicket developers are very welcome at the moment. I agree very much with what you say in the post that it's hard to find information about the best shape for a wicket application to meet your needs. Also the comment re component swapping - I

RE: Interstitial window prompt then open a new window

2010-04-16 Thread Jeffrey Schneller
You may want to look into this. I am using this to send a user to page off our site via a link. Link myLink = new Link(myLink) { @Override public void onClick() { String url = http://your_url;;

Changing style in the same session with setStyle

2010-04-16 Thread Arie Fishler
Hi, I am using setStyle in the Session to set a skin. I am using this setting to retrieve texts from resource files based on the skin. The thing is that a user might go to other pages during the same session. Other pages might have different skins so they are supposed to show other texts for the

RE: Repeating form on a page

2010-04-16 Thread David Hamilton
Thanks for the great response! I will look at RefreshingView, but right now I'm considering yet another possibility. I'm think of using a display-only ListView for existing items with an edit button to populate a modal dialog. I have yet to get to the Modal dialog part so I'll have to report

Re: Repeating form on a page

2010-04-16 Thread Ben Tilford
Would a FormComponentPanel work? http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/FormComponentPanel.html On Fri, Apr 16, 2010 at 4:48 PM, David Hamilton dhamil...@hermitagelighting.com wrote: Thanks for the great response! I will look at RefreshingView, but right now I'm

Re: Type Inference for Wicket 1.4

2010-04-16 Thread Ben Tilford
What happened to the groovy wicket builder project? I know it was on hold until anonymous inner classes were going to be supported which were added in groovy 1.7 irrc. On Fri, Apr 16, 2010 at 7:58 AM, Erdinc kocam...@yahoo.com wrote: Or use wicket as I explained on this page :)

Wicket and JavaFX applet

2010-04-16 Thread Marek Šabo
Hi all, I have problems with running javaFX applet inside wicket page. I call a loading function from ajaxLink (target.appendJavascript(startApplet());) and in html: wicket:head script src=http://dl.javafx.com/1.2/dtfx.js; type=text/javascript/script script

my book updated for Wicket 1.4.x

2010-04-16 Thread Kent Tong
Hi, I've updated my book for Wicket 1.4.x. You may check it out or download the first two chapters at http://agileskills2.org/EWDW - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:

Re: Wicket and JavaFX applet

2010-04-16 Thread Jeremy Thomerson
Use Firebug and add a breakpoint in your JS to see if it is getting executed. If it's not, you may try adding a semi-colon after your startApplet() - because I don't remember if you need it when it's run in an eval. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Apr 16, 2010 at