Does not look right... but who am I to say. Why do you call
field.setModel(getModel()) at all?

I would leave it out alltogether (= not change model). If you have
other reasons to change the model, then you can override the
FormComponent.internalOnModelChanged:

                  /**
                   * @see
org.apache.wicket.markup.html.form.FormComponent#internalOnModelChanged()
                   */
                  @Override
                  protected void internalOnModelChanged() {
                    onValid(); // Do not clear input
                  }



**
Martin


2009/5/18 Ian MacLarty <[email protected]>:
> Hi Martin,
>
> On Sun, May 17, 2009 at 10:56 PM, Martin Makundi
> <[email protected]> wrote:
>> ... raw input? In my understanding it works by default.
>>
>
> Thanks for the hint.  I got it to work by modifying my onBeforeRender to be:
>
>    @Override
>    protected void onBeforeRender() {
>        if (!field.hasRawInput()) {
>            field.setModel(getModel());
>        }
>        super.onBeforeRender();
>    }
>
> Could you confirm that this is the right fix?
>
> Ian.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to