I had an issue with (a) since I simply wanted to keep
using my page.
Option (b) undos your modifications, since Seaside backtracks the state.
This could be tested easily. For example:
- In "Kernel Settings" just rename the Kernel from "Pier" to
"Pier2"
- Push the "Save" button. The kernel is modified and the page title changes
from "Pier" to "Pier2"
- Push the back button (actually twice, in this specific example) to quite
the page. Seaside brings back the previous Kernel named "Pier".
This is obviously not what we wanted. Am I missing something here?
I cannot reproduce that. The name of the kernel is certainly not
backtracked by Seaside.
Did you press 'refresh' to see the change? Just hitting the back
button only shows you the page from the browser cache.
The widgets
you wrapped do
work on the complete system though.
You are right. To make this difference explicit, I'm actually making these
widget adaptors available in a separate toolbar, that looks like this:
PRDistribution >> admintoolsPage
admintoolsPage ifNotNil: [^admintoolsPage].
adminComp := PRComponent named: 'widget'.
adminComp
componentClass: PRCommandsWidget;
write: AAsWidgetAdaptorCommand allSubclasses using:
PRCommandsWidget descriptionCommandClasses.
admintoolsPage:= (PRPage named: 'admintools')
addChild: adminComp;
contents: 'Admin tools: +widget+';
yourself.
^admintoolsPage
This assumes that those widget adaptors are additionally excluded from
#commandsPage.
I think the wrappers are conceptually wrong in the way Pier-Setup
creates a default distribution. The wrappers violate the principle of
providing functionality at one place and through one mechanism only.
For example, in my setup I don't see I reason why I would want to be
able to edit the name of the kernel from anywhere.
Maybe there are other setups where that might make sense? That's why I
suggested to package the wrappers separately so that people that want
to use it can load it. And other are not forced to have to deal with a
proliferation of unrelated commands.
Also your
strategy of wrapping the
widgets into commands makes security sort of fragile.
This is an important issue. Could you develop this a little more please?
If anywhere -- on potentially thousands of pages (like in the seaside
book) -- you (accidentally) give the permissions to edit the kernel
name, anybody is able to change it. In the current default setup you
just have to make sure that the system page and its children are
protected.
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch