Any ideas on refreshing an embeded Seaside component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Any ideas on refreshing an embeded Seaside component

Yanni Chiu
Suppose a Seaside component is added to a Pier page using a PRComponent.
The Seaside component is initialized using values stored in the
PRComponent settings dictionary. If these settings are changed later on,
these changes are not reflected in the corresponding Seaside component
instances until the corresponding session expires, and the Seaside
component is then recreated.

To handle this, I've created a PRRefreshCommand, which does:
        self structure flush
in its #doExecute.

The problems with this approach are:
- the user has to hit refresh, just refreshing the page won't do it
- when no user is logged in, the "refresh" command cannot be presented

Any suggestions? Better approaches? Am I doing something wrong?

--
Yanni

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Any ideas on refreshing an embeded Seaside component

Lukas Renggli
> Suppose a Seaside component is added to a Pier page using a PRComponent. The
> Seaside component is initialized using values stored in the PRComponent
> settings dictionary. If these settings are changed later on, these changes
> are not reflected in the corresponding Seaside component instances until the
> corresponding session expires, and the Seaside component is then recreated.
>
> To handle this, I've created a PRRefreshCommand, which does:
>        self structure flush
> in its #doExecute.

Why is this necessary? At least in my image, the settings
automatically reflect in all instantiated components. If not that
would be a bug.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Any ideas on refreshing an embeded Seaside component

Yanni Chiu
Lukas Renggli wrote:

>> Suppose a Seaside component is added to a Pier page using a PRComponent. The
>> Seaside component is initialized using values stored in the PRComponent
>> settings dictionary. If these settings are changed later on, these changes
>> are not reflected in the corresponding Seaside component instances until the
>> corresponding session expires, and the Seaside component is then recreated.
>>
>> To handle this, I've created a PRRefreshCommand, which does:
>>        self structure flush
>> in its #doExecute.
>
> Why is this necessary? At least in my image, the settings
> automatically reflect in all instantiated components. If not that
> would be a bug.

I forgot to make it clear that the situation is for different login
sessions - i.e. the settings change is made in a designer session, but
in a concurrent guest session, the settings change only appears if I let
the guest session expire, then login again.

My image is about 5 weeks old, but I will be updating soon.

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Any ideas on refreshing an embeded Seaside component

Lukas Renggli
>> Why is this necessary? At least in my image, the settings
>> automatically reflect in all instantiated components. If not that
>> would be a bug.
>
> I forgot to make it clear that the situation is for different login sessions
> - i.e. the settings change is made in a designer session, but in a
> concurrent guest session, the settings change only appears if I let the
> guest session expire, then login again.

Indeed, in other sessions the changes are not reflected immediately.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Any ideas on refreshing an embeded Seaside component

Yanni Chiu
Lukas Renggli wrote:
>> I forgot to make it clear that the situation is for different login sessions
>> - i.e. the settings change is made in a designer session, but in a
>> concurrent guest session, the settings change only appears if I let the
>> guest session expire, then login again.
>
> Indeed, in other sessions the changes are not reflected immediately.

I don't think I need the refresh command anymore, now that I've noticed
that Logout/Login was reusing the session. Going to a URL without the
_s/_k will create a new session, which will then have a new component
using the new settings.

What was worrying was that I did not have a way for a non-logged-in user
to refresh, except to wait for expiry. Then I noticed that even a these
users had a _s/_k in their URLs.

BTW, I do see the changes immediately, in the session where the changes
are made.

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki