Hi,
'setupRender' event is invoked every time page is rendered,
so if you want to initialise persistent properties only once,
you need to have guard that prevents extra initialisations.

For example
    @Persist
    boolean initialized;

    @SetupRender
    public void setupRender()
    {
        initialize();
        // ... more setup code
    }

    public void initialize() {
        if (!initialized) {
            return;
        }
        initialized = true;
        itemsPerPage = 10;
        tableColumns = 3;
    }

On Fri, Oct 26, 2012 at 9:38 PM, Ken in Nashua <kcola...@live.com> wrote:

>
> Folks,
>
> Does anyone know about this kind of thing???
>
> I got properties... and yes I like to initialize my stuff. Question is
> where and will initialization interfere if my properties are persistent.
>
> So far I got these...
>
>     @SetupRender
>     public void setupRender()
>     {
>         itemsPerPage = 10;
>         tableColumns = 3;
>     }
>
> But everytime page cycles thru my persistent properties get clobbered back
> to what this initializes them to. And everything gets whacked back to what
> setupRender says.
>
> Any help is appreciated.
>
> I would like to initialize my properties once so the page cycle can do its
> thing without initialization getting under feet.
> Ken
>

Reply via email to