Hi!
> having read the thread I didn't get why you can not modify the object
> itself.
Now I remember the reason: modifying the object itself with default
values, it will be reflected throughout the whole EntityManager (i.e.,
other users will see a prefilled value that has not been stored!!).
Tha
The hack is awful
Just have a detachable model that holds on first render the defaults
then when a submit is done populate the object (another) that you want
On 07/07/2009, Martin Makundi wrote:
> The hack is cleaner
>
> 2009/7/7 James Carman :
>> On Tue, Jul 7, 2009 at 10:51 AM, Martin Makundi
>> having read the thread I didn't get why you can not modify the object
>> itself.
Actually.. the only GOOD reason I can come up with is that by setting
the default value into RAWINPUT, it will be validated when the form is
submitted.
**
Martin
--
>>> Is there a better way?
>>>>
>>>> **
>>>> Martin
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wi
tional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: u
> In your opinion. Hibernate supports merging (if that's what you're using).
> Why not edit the object in a detached state (not in the session)?
> Then, when you want to update it, you call update()?
If there was only one simple object yes... but there is a whole
collaboration diagram of objects.
write a model that returns your default value in getobject and updates
the object in setobject
-igor
On Tue, Jul 7, 2009 at 6:57 AM, Martin
Makundi wrote:
> Hi!
>
> What is the proper way to prefill a wicket form (not poke the model
> before submit!!!)?
>
> I have used a hack:
>
> Field rawI
On Tue, Jul 7, 2009 at 10:59 AM, Martin Makundi
wrote:
>
> The hack is cleaner
In your opinion. Hibernate supports merging (if that's what you're using).
Why not edit the object in a detached state (not in the session)?
Then, when you want to update it, you call update()? If the edit
never suc
The hack is cleaner
2009/7/7 James Carman :
> On Tue, Jul 7, 2009 at 10:51 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> > Typically to prefill a form you have the backing model object have
>> > sensible defaults. i.e., a form that edits a person is given a
>> > person, a
On Tue, Jul 7, 2009 at 10:51 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:
> > Typically to prefill a form you have the backing model object have
> > sensible defaults. i.e., a form that edits a person is given a
> > person, and the person object has it's gender set to "male" as
> Typically to prefill a form you have the backing model object have
> sensible defaults. i.e., a form that edits a person is given a
> person, and the person object has it's gender set to "male" as a
> default - that is reflected in your form when it is rendered.
The problem is that it is not a
Typically to prefill a form you have the backing model object have
sensible defaults. i.e., a form that edits a person is given a
person, and the person object has it's gender set to "male" as a
default - that is reflected in your form when it is rendered.
otherwise, you could call setModelObject
Hi!
What is the proper way to prefill a wicket form (not poke the model
before submit!!!)?
I have used a hack:
Field rawInputField = FormComponent.class.getDeclaredField("rawInput");
rawInputField.setAccessible(true);
rawInputField.set(component, description);
Is there a bette
13 matches
Mail list logo