users@woodstock.java.net

Re: calling refresh() on a dynamically created TextField doesn't work

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Wed, 30 Jan 2008 18:12:34 -0500

This sounds like an issue regarding when the table's DataProvider is
initialized? In order for button actions or Ajax functionality to be
invoked, the table must iterate over each row of data and call the
decode method of each child component. (In this case, the decode method
of the button and/or text field would be invoked.) If the DataProvider
has since changed or has not been initialized during an Ajax request,
the table cannot iterate over the same rows of data and actions cannot
be decoded properly. People often stumble over the JSF lifecycle, but
you can read more below.

https://woodstock.dev.java.net/issues/show_bug.cgi?id=1044

The full explanation is also provided in the TLD doc for tableRowGroup
under the "Life cycle" section.

http://webdev2.sun.com/woodstock-tlddocs/

Dan

autozoom wrote:
> One more info:
> in the same page where the table is created by code, I have a button.
> When the table is empty the button action is correctly called, but once I
> had a row group to the table (by code) the button action is not called
> anymore.
> This is a "normal" action, not an Ajax one.
>
>
> autozoom wrote:
>
>> yes I use ajax on components created by tag libs and everything is fine.
>> I will try to package a test project and send it to you soon
>>
>> thanks
>>
>>
>> Dmitry Kushner wrote:
>>
>>>
>>>
>>>
>>>
>>>
>>> I do not believe that is the case. Do you have any Ajax fuinctionality
>>> working for components created by JSP tags? Please try that first. If
>>> tag-based components' Ajax refresh() works fine, please send us all the
>>> code you use to create a textField component ( preferably in the
>>> simplified case, not within a table) and I will try to take a look at
>>> it. Would be great if you could send us a simple archived Netbeans
>>> project that exhibits the problem.
>>>
>>> Thanks!
>>>
>>>
>>>
>>> autozoom wrote:
>>>
>>> More in general, I suspect that Ajax functionalities and Dynafaces
>>> hooking
>>> has problems if components are created by code.
>>> Is this correct?
>>>
>>> Mauro
>>>
>>>
>>> autozoom wrote:
>>>
>>>
>>> hello,
>>> I am creating a TextField by code to be placed in a table facelet.
>>> This textfield's text is bound to a bean attribute. This works fine.
>>> But when I call the component's refresh() method by javascript, nothing
>>> happens (no errors but the attribute getter doesn't get called).
>>> Is this supported?
>>>
>>> thanks
>>> Mauro
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>>
>>>
>>>
>>>
>>
>
>