[Seaside] WASystemConfiguration - rendering a button?

Julian Fitzell jfitzell at gmail.com
Fri Feb 19 20:59:13 UTC 2010


Hi John,

A good question... that's not something we've explicitly supported
before. Off the top of my head, one solution might be to create some
kind of CommandAttribute that you could add to your application's
SystemConfiguration subclass. Then you'd need to add a method to
WAUserConfigurationEditorVisitor that could render a button for that
new attribute type. It would be a bit weird, because I guess the
attribute would ignore any value it received.

Probably the better solution, since this isn't really a
"configuration" thing, would be to extend the admin UI to be pluggable
in some other way to provide admin commands. It could call a method on
the Application/Handler, or look for methods marked with a certain
pragma, or you could even have a configuration attribute that
specified a command class (or a list of command classes) or something
(though that may be irritatingly overkill). I would love to see the
web-based admin console expand to be more useful, and it's possible we
could look at integrating something you did in this direction, but it
won't come from us before 3.0 comes out.

Or, the simplest solution, create an admin component for your
application and register it at a different path. :)

Julian

On Fri, Feb 19, 2010 at 10:13 AM, John Thornborrow <john at pinesoft.co.uk> wrote:
> Hi,
>
> I'm looking to migrate one of our apps to Seaside 3.0 from 2.8. One of
> our configurations has the below code:
>
> GlorpConfiguration>>accept: aVisitor with: html
>    html form: [ html submitButton
>            callback: [ aVisitor application newGlorpSession
> recreateTables ];
>            text: 'Recreate Database Schema' ]
>
> Having looked (briefly) there doesn't seem to be a suitable alternative
> in Seaside3.0
>
> Is there something I have missed?
>
> To summarize: I would like to add a button to my app's configuration
> page, that I can attach a callback to :)
>
> Regards,
> John.
>
>
> Consider your responsibility to the environment - think before you print!
>
> ******************************************************************************************************************************************
> This email is from Pinesoft Limited. Its contents are confidential to the intended recipient(s) at the email address(es) to which it has been addressed. It may not be disclosed to or used by anyone other than the addressee(s), nor may it be copied in anyway. If received in error, please contact the sender, then delete it from your system. Although this email and attachments are believed to be free of virus, or any other defect which might affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Pinesoft for any loss or damage arising in any way from receipt or use thereof. *******************************************************************************************************************************************
>
>
> Pinesoft Limited are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list