Hi Simon,

 

submittedValue is not transient.

Class javax.faces.component.UIInput contains following not transient
definition:

   private Object _submittedValue = null;

   

The submitted value is also saved in method saveState:

   values[4] = _submittedValue;

   

Moreover I don't use component binding but value binding.

Here is the field definition in my jsp:

<t:inputText id="creationDateFrom"
value="#{SearchController.editableSearch.attributes['creationDate'].begi
n}">

 

SearchController has session scope and I use server side state saving.

 

Any further ideas ?

Should submitted value be transient ?

 

Michael

 

From: Simon Lessard [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 28. Juni 2007 22:51
To: MyFaces Discussion
Subject: Re: how to reset submitted values caused by validation errors ?

 

Hello Michael,

It seems a bit strange as the submitted value is transient and should
not be subject to state saving and consequently shouldn't polute
subsequent requests. My first guess would be that you're using binding
attribute with a session bean. Also, are you using client or server side
state saving? 


Regards,

~ Simon

On 6/28/07, Michael Heinen <[EMAIL PROTECTED]> wrote:

Hi,

 

I have a serious conversion/validation problem and don't see any
solution.

 

My form contains an inputField for dates and a dateTime converter.

If an invalid format is entered then the submitted value is not erased
and the page is rerendered with the entered date.

This is working fine so far.

 

Now I execute a kind of cancel button via ajax.

I use an a4j:commandButton with ajaxSingle=true and surrounded this
button by an a4j:region in order to process no input fields on
serverside.

The value that is bound via valueBinding to the inputField is set to
null in the invoked ActionListener.

The problem is now that the old invalid date is rerendered on the page.

 

This happens because the submitted value of the inputField is not null
but still contains the old invalid date.

Therefore the valueBinding is not evaluated in the getter.

 

I can't set the submitted value to null in the converter because invalid
values should be rerendered in case that a normal processing button (not
cancel button) is clicked.

 

Any help is highly appreciated.

Michael

 

Reply via email to