Fwd: Feedback Messages prevent DropDownChoice updating Textfields

2014-02-11 Thread Daniela L
Hi, I am trying to implement a Feedback for every Form Component and a catch all Feedback Panel in wicket 6.12.0. Everything works fine except for the case when a user causes a error which is shown in the Feedback Panel of the Component, e.g. the Textfield firstName is left empty. After that the

Submitting values for null associations

2014-02-11 Thread ChambreNoire
Hi, I have a form which can flip between edit and view modes. Its fields share a common CompoundPropertyModel which in turn points to an AbstractEntityModel similar to that described in the 'Wicket in Action' blog. My problem is with associations that happen to be null. If I have a User entity

Re: Submitting values for null associations

2014-02-11 Thread francois meillet
The entity User needs to have a Job's instance when you construct your model. François On Tue, Feb 11, 2014 at 2:56 PM, ChambreNoire a...@tentelemed.com wrote: Hi, I have a form which can flip between edit and view modes. Its fields share a common CompoundPropertyModel which in turn

Re: How to implement an auto-save behavior

2014-02-11 Thread Boris Goldowsky
Thank you Martin, that works like a charm. Boris On Feb 10, 2014, at 2:27 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, To submit a form all you need to provide to the object you pass to Wicket.Ajax.ajax() is the 'f' attribute: Wicket.Ajax.post({ u: 'url/to/AjaxFormSubmitBehavior',

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
Yes I'm aware of this but the problem is I'm reusing the same AbstractEntityModel (effectively a LoadableDetachableModel that loads from the db) for the edit mode and the User instance in the db has no Job instance (yet). I could always re-build a Model using the unproxied User instance when I

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
I forgot to mention, the reason I don't systematically make a new Job instance is that when saving the form hibernate creates a new Job instance which is effectively empty if no Job details have been input. Chambre -- View this message in context:

Re: Submitting values for null associations

2014-02-11 Thread francois meillet
As Hibernate save a new Job instance when you save the User if the relation is empty why don't you load the job (with an eager fetching strategy) when you load the user ? François On Tue, Feb 11, 2014 at 3:22 PM, ChambreNoire a...@tentelemed.com wrote: I forgot to mention, the reason I don't

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
Why would that make any difference? A null Job is still a null Job. Unless I'm missing something... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Submitting-values-for-null-associations-tp4664365p4664371.html Sent from the Users forum mailing list archive at

Re: Submitting values for null associations

2014-02-11 Thread francois meillet
You use cascade=all on the job relation. When job is created, it should have at least one non-empty property. Job's instance is null because it doesn't have any non empty property. François On Tue, Feb 11, 2014 at 3:59 PM, ChambreNoire a...@tentelemed.com wrote: Why would that make any

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
I'm afraid I still don't see it. I think I'm just going to have to use a nested model at the form level and rebuild it whenever I toggle viewing/editing mode. So I'd build a new Model() from the unproxied User when switching to edit mode and build a new AbstractEntityModelUser(user.id, User.class)

How get wiki Framework Documentation for offline reading

2014-02-11 Thread Farrukh SATTOROV
Hi everyone!, Can i download wicket wiki framework documentation for offline reading. Thanks. https://cwiki.apache.org/confluence/display/WICKET/Index

How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-11 Thread Bruce Lombardi
To make this easier to understand, let's say that I have a list of state abbreviations for example AL, AK, AZ, AR etcetera (the actual example has two letter abbreviations also, but much longer names). I need a DropDownChoice that shows the abbreviations for selection (e.g., AK) but will show the

Re: How get wiki Framework Documentation for offline reading

2014-02-11 Thread Martin Grigorov
http://wicket.apache.org/guide/guide/single.pdf Martin Grigorov Wicket Training and Consulting On Tue, Feb 11, 2014 at 6:06 PM, Farrukh SATTOROV fireda...@gmail.comwrote: Hi everyone!, Can i download wicket wiki framework documentation for offline reading. Thanks.

SpringBean and properties file.

2014-02-11 Thread Entropy
I think this is a problem in spring and wicket working together. This is in 1.4.7. In spring: bean id=portalResources class=gov.usdoj.afms.afmsportal.application.AFMSPortalResources init-method=init scope=singleton property name=portalService ref=portalService/

Re: How get wiki Framework Documentation for offline reading

2014-02-11 Thread Farrukh SATTOROV
I have printed this guide as brochure and reading now, but i mean about wiki doc. Thanks anyway On Tue, Feb 11, 2014 at 10:52 PM, Martin Grigorov mgrigo...@apache.orgwrote: http://wicket.apache.org/guide/guide/single.pdf Martin Grigorov Wicket Training and Consulting On Tue, Feb 11, 2014

Re: How get wiki Framework Documentation for offline reading

2014-02-11 Thread Martin Grigorov
The Wiki is not very up-to-date... Martin Grigorov Wicket Training and Consulting On Tue, Feb 11, 2014 at 8:48 PM, Farrukh SATTOROV fireda...@gmail.comwrote: I have printed this guide as brochure and reading now, but i mean about wiki doc. Thanks anyway On Tue, Feb 11, 2014 at 10:52 PM,

Re: SpringBean and properties file.

2014-02-11 Thread Sven Meier
Hi, Wicket uses CGLib proxies, to proxy beans which are not referenced by their interface. This leads to the constructor being fired once for each injection. If you don't want this, declare the type of the @SpringBean member as an interface. Sven On 02/11/2014 08:46 PM, Entropy wrote:

Re: How to make a Wiket DropDownChoice with complex a model return a simple String

2014-02-11 Thread Andrea Del Bene
Hi, I needed something similar in a couple of projects. One solution is to create a custom DropDownChoice which takes also the string model to update. Then you can override onModelChanged to update the string model with the new value that can be extracted with the ChoiceRenderer. To make

Re: Submitting values for null associations

2014-02-11 Thread Marios Skounakis
I'm not sure there is a very clean solution. When switching to edit mode, you could set the User's Job to a new Job instance if it is null. You don't have to reattach/reassign any form components if you simply update the AbstractEntityModel's object. I.e. you either do