Hi Dave, Cory, Lking,

the answer is simple - this is not a bug, but a feature.

You'll need to make sure that you clean out the submitted value (and
eventually the local value, but I don't think that's nessary in your
case) of the component for which you want to have a changed value.

How to do this? You either use component-binding to grab the component
instance directly, if you component-bind the component to a variable
with name myComponent, then you can say:

myComponent.setSubmittedValue(null);

and the submitted-value will be gone...

(for local value:

myComponent.setValue(null);
myComponent.setLocalValueSet(false); )

Alternatively, you can use the findComponent method to retrieve the
desired component instance, but generally, component-binding is just a
tad easier to use cause you don't have to care about component-ids.

If you don't know how to put component-binding on a component - this
is how it works:

<h:inputTextArea binding="#{myBean.myComponent}"/>

You'll need to provide getters and setters for it.

Generally, the underlying behaviour makes a lot of sense - think about
it - how should JSF know that you want to get rid of the user-entry
into the text-area? The user-entry might be important to keep, maybe
more important than the change that you did in the managed-bean!

regards,

Martin

On 8/17/06, Lking <[EMAIL PROTECTED]> wrote:
I'm having this same issue. How do you guys manage to solve it?

thanks

On 6/30/06, Showers, Cory R <[EMAIL PROTECTED] > wrote:
> Yeah I notice the same thing.  Its really bugging me and I'm glad Mr.
> Dieterle has brought it to the myfaces group.
>
> -----Original Message-----
> From: Dieterle, David W
> Sent: Friday, June 30, 2006 8:52 AM
> To: MyFaces Discussion
> Subject: Bug in the tomahawk inputTextarea UI component???
>
> Has anyone noticed a bug in the t:inputTextarea UI component? I have the
> value attribute of the control tied to an attribute in a managed backing
> bean. When the user selects a different option in a t:selectOneMenu UI
> component, on the same page, the method specified in the
> valueChangeListener attribute is called that changes the attribute used
> by the t:inputTextarea UI component. Even though the attribute in the
> managed backing bean changed, the t:inputTextarea UI component does not
> display the new value when the page refreshes.
>
> Any ideas or has anyone noticed a similar behavior?
>
> One other thing, if I add the displayValueOnly="true" attribute to the
> t:inputTextarea UI component then the page is rendered with a span tag,
> rather than a textarea tag, and the new value of the attribute in the
> managed backing bean is displayed.
>
>         Thanks,
>           Dave
>
>
>




--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to