Re: Is it the best way to code a Link depending on a condition

2009-09-18 Thread Joseph Pachod
cmoulliard wrote: (...) I think that this is a general remark that some users make about Wicket. It is very difficult to reuse part of the code. Here is another example : I have a label called id which is used in different page. The way proposes by Wicket to code it is Page Request

Re: Is it the best way to code a Link depending on a condition

2009-09-18 Thread cmoulliard
What I have done to avoid to repeat the creation of the labels is to define and use static method private Label labelTitle; public static Label getLabelTitle(String title) { return new Label(title,new Model( title )); } Joseph Pachod wrote:

AjaxLazyLoadPanel

2009-09-18 Thread Christoph Hochreiner
Hi i've experienced some problems with the AjaxLazyLoadPanel: the task is, to load a dynamic list (1- n) of String | Checkbox like this: String | Checkbox String | Checkbox String | Checkbox this works with excellent with the Listview: i'm using the Wicket Wizard and the list is generated

post a form to external website

2009-09-18 Thread Vadim Tesis
all, i have a form with some input fields. after the user populates the form and hits submit button, i'd like to do some processing on my website and then redirect the user to external website by posting another form with dynamically generated hidden fields. what's the best way to do it

Re: AjaxLazyLoadPanel

2009-09-18 Thread Pedro Santos
i'm using the Wicket Wizard and the list is generated out of previous input, so i have to use the AjaxLazyLoadPanel you can use dynamic models http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DynamicModels is it in principle possible to load this dynamic

Re: Is it the best way to code a Link depending on a condition

2009-09-18 Thread Joseph Pachod
cmoulliard wrote: What I have done to avoid to repeat the creation of the labels is to define and use static method private Label labelTitle; public static Label getLabelTitle(String title) { return new Label(title,new Model( title )); } I personally

Re: post a form to external website

2009-09-18 Thread Martin Grigorov
El vie, 18-09-2009 a las 10:51 +, Vadim Tesis escribió: all, i have a form with some input fields. after the user populates the form and hits submit button, i'd like to do some processing on my website and then redirect the user to external website by posting another form with

Re: defaultFormProcessing is no longer considered when processing multipart form in ajax request

2009-09-18 Thread Vladimir K
Igor, thanks for the fix. I tried to compile against 1.4.2-20090916 and obtained two compilation errors. Now FormComponent does not contain method setPersistent() and Page does not contain method removePersistedFormData(). What API should be used instead? Vladimir K wrote: Igor, could you

Re: Handling Hibernate session (LazyInitializationException)

2009-09-18 Thread Peter Ertl
yes - it run's smoothly together ... Am 18.09.2009 um 07:44 schrieb Michael Mosmann: Am Freitag, den 18.09.2009, 00:35 +0200 schrieb Peter Ertl: as an further improvement use salve to completely remove your headache :-) http://code.google.com/p/salve thank you.. interesting stuff.. do

RE: same data set shows for all users

2009-09-18 Thread Randy
I did not realize the Application instance is not per user. That clears things up. I need the user to have the same data view on several other pages, so decided to subclasses WebSession and placed the db instance there. I suppose this to be a good central location for the individual user.

Defaulting a DropDownChoice

2009-09-18 Thread Tim Delesio
I'm trying to default a DDC (DropDownChoice) using the model I am passing in. The page is getting passed in a LoadableDetachableModel which is of Type Player. The list to back the DDC is a ListPlayer. LoadableDetachableModel playersModel = new LoadableDetachableModel() {

How to access text fields in a data view

2009-09-18 Thread Randy
In the Wicket Examples, there is a data view with editable values (org.apache.wicket.examples.repeater.FormPage). It is not clear to me how to access the updated text field(s) so that changes can be recorded in the actual data item instance for the row. I see how to reference the data item

Re: defaultFormProcessing is no longer considered when processing multipart form in ajax request

2009-09-18 Thread Martin Grigorov
You have to use 1.4.x branch. trunk is for 1.5. form persistence is removed only in trunk El vie, 18-09-2009 a las 05:32 -0700, Vladimir K escribió: Igor, thanks for the fix. I tried to compile against 1.4.2-20090916 and obtained two compilation errors. Now FormComponent does not contain

rpc question

2009-09-18 Thread Petr Kobalíček
Hi list, is there a simple tutorial about making RPC services in wicket? I mean all integrated with wicket RequestCycle and Sessions, ideally that I can expose web services through some Wicket page like class. I'm porting one application and we have admin interface in qooxdoo toolkit (it

Re: Defaulting a DropDownChoice

2009-09-18 Thread Pedro Santos
The DDC uses the model choises internaly, if you want manage this model, use it on other places, why don't you keep an refecence to by yourself? setResponsePage(new ViewPicksPage(playersModel)); on DDC default model will have only the selected item, provided by choices options you passed On

[OT] Moving to SVN...best practices for project layout?

2009-09-18 Thread Doug Leeper
We have been using CVS for a long time now and want to move to SVN. We have an empty SVN repository created but have questions on how we should set up our multiple projects that all utilize a common project in conjunction with tags, branches, releases. To keep things somewhat consistent

Re: [OT] Moving to SVN...best practices for project layout?

2009-09-18 Thread Carsten Kaiser
If your product projects will have independent release cycles, you definitely should choose option B. Otherwise you will not be able to have separate bug fix branches etc... How would you like to resolve the according artifact of the common project? If you are using a maven repository as well,

Re: rpc question

2009-09-18 Thread Marc Ende
Hi Petr, I think you should use a LoadableDetachableModel. Within the method load() you can execute your call to the webservice or other remote-service. http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels yours marc Am Fri, 18 Sep 2009

Re: How to access text fields in a data view

2009-09-18 Thread T Ames
What the example lacks is the Submit button processing for the entire form. There are probably lots of ways to handle this - ajax and non-ajax. Once you get the submit button you want to use defined, that is where you can access all the items in the repeater by visiting the children of the form

Re: rpc question

2009-09-18 Thread Pedro Santos
ideally that I can expose web services through some Wicket page like class I remember this post with question: How to easily provide simple RESTful Web Services with Wicket? http://blog.brunoborges.com.br/2008/11/restful-web-services-with-wicket.html On Fri, Sep 18, 2009 at 11:20 AM, Petr

Re: rpc question

2009-09-18 Thread Marc Ende
Hi Petr, sorry, I've misunderstood your mail... :) you've meant the other way round. May be you should try to build a restful webservice. It's also possible with wicket if you decide xml as a resultpage. For example: http://java.dzone.com/news/wicket-creating-restful-urls Am Fri, 18 Sep 2009

Re: Bug with firefox when submitting an ajax form inside a modal window

2009-09-18 Thread Sven Meier
Short answer: You have to enclose your modal window in a form component, see modal window javadoc. Long answer: The modal window javascript generates an additional form when opening. When your panel is re-rendered, Firefox drops your form from the markup because in HTML it's not allowed to

Re: Bug with firefox when submitting an ajax form inside a modal window

2009-09-18 Thread fatefree
svenmeier wrote: Short answer: You have to enclose your modal window in a form component, see modal window javadoc. Hmm what exactly does that mean? I tried changing my modalWindow from: div wicket:id=window/div to formdiv wicket:id=window/div/form and form wicket:id=window/form

Re: Is it a bug that Enclosure is not invoking component resolver to resolve its children?

2009-09-18 Thread Igor Vaynberg
you are welcome to provide a patch. -igor On Thu, Sep 17, 2009 at 1:57 PM, Chris Colman chr...@stepaheadsoftware.com wrote: As can be seen by the Enclosure.getChildComponent method below the component resolver expects to find the 'child' within its own parent - i.e. it assumes that its

Re: Update Tree Model on Ajax timer. What's wrong ?

2009-09-18 Thread TahitianGabriel
This wicket-tree seems really nice. Well done! Why isn't it in wicketstuff? It may even replace the headache swing wicket-extension one (in 1.5?)... Regards, Gabriel. svenmeier wrote: advertisement ... you should definitely take a look at http://code.google.com/p/wicket-tree .

Re: Defaulting a DropDownChoice

2009-09-18 Thread tdelesio
Thanks for the response. How do I bind the playerModel to the DDC? If I did the below extract the object out of the playerModel it would probably work. Player player = (Player)playerModel.getObject(); final DropDownChoice downChoice = new DropDownChoice(name, new Model(Player), playersModel,

RE: same data set shows for all users

2009-09-18 Thread Craig McIlwee
I wouldn't say it's a bad practice, it just depends on how the objects are intended to be used. If you have mutable data specific to each user that must span several pages and shouldn't be messed with by other users than session is a good place, like you now have for your DB. But if there are

Re: Bug with firefox when submitting an ajax form inside a modal window

2009-09-18 Thread Sven Meier
Hmm what exactly does that mean? form wicket:id=form div wicket:id=window/div /form - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: Bug with firefox when submitting an ajax form inside a modal window

2009-09-18 Thread nino martinez wael
yes he has to make it a form component... 2009/9/18 Sven Meier s...@meiers.net Hmm what exactly does that mean? form wicket:id=form div wicket:id=window/div /form - To unsubscribe, e-mail:

Re: defaultFormProcessing is no longer considered when processing multipart form in ajax request

2009-09-18 Thread Vladimir K
I use 1.4-snapshot from http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.4-SNAPSHOT/ martin-g wrote: You have to use 1.4.x branch. trunk is for 1.5. form persistence is removed only in trunk El vie, 18-09-2009 a las 05:32 -0700, Vladimir K escribió: Igor, thanks for

Re: Update Tree Model on Ajax timer. What's wrong ?

2009-09-18 Thread Sven Meier
This wicket-tree seems really nice. Well done! Thanks - Wicket makes it really easy to build reusable components. Why isn't it in wicketstuff? It may even replace the headache swing wicket-extension one (in 1.5?)... Well, Sourceforge isn't the only place for projects. IMHO some Wicket

Re: Update Tree Model on Ajax timer. What's wrong ?

2009-09-18 Thread TahitianGabriel
Well Wicketstuuf is nice because we can find many wicket components in one place. I was not aware of your wicket-tree until today thanks to this post. I believe that projects in wicketstuff are not dependent to the wicket core/extension projet. Also I've got trouble with tortoiseSVN every time

RE: Is it a bug that Enclosure is not invoking component resolver to resolve its children?

2009-09-18 Thread Chris Colman
you are welcome to provide a patch. -igor I would if I could get it working ;). At what point in the lifecycle of normal parent should the component resolver be invoked to instantiate the children? And... is there a convention for calling the component resolvers? There's obviously a

Re: rpc question

2009-09-18 Thread Petr Kobalíček
Thanks guys, the solution from Pedro (http://blog.brunoborges.com.br/2008/11/restful-web-services-with-wicket.html) is very close I talked about. I think that wicket supports to send JSON instead of XML, so I'm going to play with this. I have another question, maybe very OT, can I connect this

Re: Is it a bug that Enclosure is not invoking component resolver to resolve its children?

2009-09-18 Thread Igor Vaynberg
On Fri, Sep 18, 2009 at 3:02 PM, Chris Colman chr...@stepaheadsoftware.com wrote: you are welcome to provide a patch. -igor I would if I could get it working ;). At what point in the lifecycle of normal parent should the component resolver be invoked to instantiate the children? this

RE: Is it a bug that Enclosure is not invoking component resolver to resolve its children?

2009-09-18 Thread Chris Colman
At what point in the lifecycle of normal parent should the component resolver be invoked to instantiate the children? this happens during render time when wicket is trying to match up markup to a component I'm wondering if Enclosure, with its need to obtain knowledge of its 'child' (which

Re: Is it a bug that Enclosure is not invoking component resolver to resolve its children?

2009-09-18 Thread Igor Vaynberg
to make the component a direct child of enclosure you would have to have an Enclosure component that is explicitly added into the hierarchy, at which point you can simply use a WebMarkupContainer whose visibility is tied to that of the child to replicate the functionality. the whole point of

Re: rpc question

2009-09-18 Thread Eelco Hillenius
While you could use Wicket for this, personally I think you're getting close to viewing Wicket as the golden hammer :-) Why not use Jersey for instance. I just used that myself (in a project where the UI is in Wicket), and especially together with Jackson for JSON -- Pojo serialization this seems

Re: Testing DataView

2009-09-18 Thread shetc
Hi All, I'm also going through the unit testing learning curve. Unfortunately, I didn't really understand the discussion about testing the DataView component. I just implemented my first DataView code, which is more or less a copy of the Wicket

RE: Is it a bug that Enclosure is not invoking component resolver to resolve its children?

2009-09-18 Thread Chris Colman
to make the component a direct child of enclosure you would have to have an Enclosure component that is explicitly added into the hierarchy, at which point you can simply use a WebMarkupContainer whose visibility is tied to that of the child to replicate the functionality. the whole point of