I don't have a backing bean and I don't want to have one as it doesn't
make sense for such an "add new" text box. The action method is the
proper place, thanks a lot.

-----Original Message-----
From: Andrew Robinson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 22, 2006 2:47 PM
To: MyFaces Discussion
Subject: Re: very simple question regarding h:inputText

Answer: it depends

if you want the value to be cleared even though there are validation
errors or if your submit is immediate, then you can bind your text box
to a varaible on the backing bean. In the actionListener or action of
the submit, clear the submitted value and local value of the
component.

if you want the value to be cleared when a "normal" (non-immediate)
action is run, just clear the value from the backing bean that the
text box is bound to.

On 8/22/06, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi,
>
>
>
> I have an input box and an "Add" button next to it that allows the
user to
> enter new entries of something. After each submit, the text of my
input box
> must be cleared empty. But by default JSF keeps that last submitted
value as
> the value of the component. How do I circumvent that? Any ideas?
>
>
>
> Thanks,
>
> Bolerio
>
>

Reply via email to