You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Torben Makowka <to...@topcom.de> on 2008/04/18 12:04:03 UTC

[Trinidad] Problems with PPR and InputText

Hi all,

i'm currently facing a problem with PPR in a combination with a 
tr:selectOneChoice and a tr:inputText.

The text component is filled with a new value when the choice component 
is changed. This works so far. I want the new value of the textbox to be 
saved to a db in the backing bean. When i click on the submit button, a 
value _not_ entered in the textbox appears _before_ the submit action in 
the backing bean is called (i debugged this with eclipse) and this value 
is also saved to the db in the end. This new value is most often a jsf 
component id (e.g. j_id_jsp_1271545289_86) or even the html component id 
of the submit button(!). I played with binding the textbox to a variable 
in my backing bean and doing a .resetValue() on it but this didn't solve 
the problem.

There seems to be a problem with the new value being transferred to the 
backing bean. The textbox gets filled with old/random values it seems.

Anyone got an idea what's going on here?

Thanks,
Torben

Re: [Trinidad] Problems with PPR and InputText

Posted by Torben Makowka <to...@topcom.de>.
Hi Matthias,

 >>  The text component is filled with a new value when the choice 
component is
 >> changed. This works so far. I want the new value of the textbox to 
be saved
 >> to a db in the backing bean. When i click on the submit button, a value
 >> _not_ entered in the textbox appears _before_ the submit action in the
 >> backing bean is called (i debugged this with eclipse) and this value 
is also
 >> saved to the db in the end. This new value is most often a jsf 
component id
 >> (e.g. j_id_jsp_1271545289_86) or even the html component id of the 
submit
 >> button(!). I played with binding the textbox to a variable in my backing
 >> bean and doing a .resetValue() on it but this didn't solve the problem.
 >
 > so you are saying, that the post back is submitting the idea, instead 
of the
 > text, that is inside the inputText ?
 >
 > can you provide some code, so that I can easily run that on my box?
 >
 > Thx,
 > m

we have found the cause of this strange behaviour, and this might even 
be a bug in trinidad itself. The CoreInputText had the id "source" set 
in the jsp (id="source"). This caused trinidad to fill in the component 
id in the textfield instead of the "real" entered text. This might 
really be a bug in trinidad since the behaviour was gone as soon as we 
changed the component id.

Greets,
Torben

Re: [Trinidad] Problems with PPR and InputText

Posted by Torben Makowka <to...@topcom.de>.
Hi,

> so you are saying, that the post back is submitting the idea, instead of the
> text, that is inside the inputText ?
> 
> can you provide some code, so that I can easily run that on my box?
> 
> Thx,
> m

It seems like that, yes. If i click the submit button, the value of the 
textbox changes to the id before calling the backing action. I'll try to 
simplify the code so that i can send a snipplet.

Thx,
Torben

Re: [Trinidad] Problems with PPR and InputText

Posted by Matthias Wessendorf <ma...@apache.org>.
Hi,

On Fri, Apr 18, 2008 at 12:04 PM, Torben Makowka
<to...@topcom.de> wrote:
> Hi all,
>
>  i'm currently facing a problem with PPR in a combination with a
> tr:selectOneChoice and a tr:inputText.
>
>  The text component is filled with a new value when the choice component is
> changed. This works so far. I want the new value of the textbox to be saved
> to a db in the backing bean. When i click on the submit button, a value
> _not_ entered in the textbox appears _before_ the submit action in the
> backing bean is called (i debugged this with eclipse) and this value is also
> saved to the db in the end. This new value is most often a jsf component id
> (e.g. j_id_jsp_1271545289_86) or even the html component id of the submit
> button(!). I played with binding the textbox to a variable in my backing
> bean and doing a .resetValue() on it but this didn't solve the problem.

so you are saying, that the post back is submitting the idea, instead of the
text, that is inside the inputText ?

can you provide some code, so that I can easily run that on my box?

Thx,
m

>
>  There seems to be a problem with the new value being transferred to the
> backing bean. The textbox gets filled with old/random values it seems.
>
>  Anyone got an idea what's going on here?
>
>  Thanks,
>  Torben
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org