You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by werner <we...@gefi.at> on 2006/08/11 16:38:50 UTC

[CFORMS] setState of invisible repeater rows

Hi

I experience a strange behaviour with a repeater. The repeater is 
invisible at the first display of the form and should be made visible in 
the on-value-changed event of another widget. The strange thing is that 
when the state of the repeater is changed to ACTIVE, only the header of 
the repeater is displayed. The rows stay invisible. When I do the same 
thing with a repeater that is already visible at first display then 
switching the repeater to INVISIBLE and back to ACTIVE works perfect. 
After hacking around for a while I found a workaround: I do not only 
have to set the state of the repeater, but the repeater rows too:

repeater.setState(WidgetState.INVISIBLE);
// make row 1 visible
var row = repeaterLampen.getRow(0); 
row.setState(WidgetState.ACTIVE);

So it looks like the behaviour of the setState method is different, 
depending on wether the repeater was visible, when the form was 
initialized. Is that ok?
BTW I use 2.1.9

Regards
Werner

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [CFORMS] setState of invisible repeater rows

Posted by werner <we...@gefi.at>.
little typo. correct version:

repeater.setState(WidgetState.INVISIBLE);
// make row 1 visible
var row = repeater.getRow(0);
row.setState(WidgetState.ACTIVE)


werner wrote:

> Hi
>
> I experience a strange behaviour with a repeater. The repeater is 
> invisible at the first display of the form and should be made visible 
> in the on-value-changed event of another widget. The strange thing is 
> that when the state of the repeater is changed to ACTIVE, only the 
> header of the repeater is displayed. The rows stay invisible. When I 
> do the same thing with a repeater that is already visible at first 
> display then switching the repeater to INVISIBLE and back to ACTIVE 
> works perfect. After hacking around for a while I found a workaround: 
> I do not only have to set the state of the repeater, but the repeater 
> rows too:
>
> repeater.setState(WidgetState.INVISIBLE);
> // make row 1 visible
> var row = repeaterLampen.getRow(0); row.setState(WidgetState.ACTIVE);
>
> So it looks like the behaviour of the setState method is different, 
> depending on wether the repeater was visible, when the form was 
> initialized. Is that ok?
> BTW I use 2.1.9
>
> Regards
> Werner
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org