Pergunta

I'm wondering why the doRemoveObject method is not being executed when the button is clicked.

(html button)
  id: 'objectRemoveButton';
  bePush;
  onClick: (html scriptaculous request
      callback: [self doRemoveObject];
      confirm: 'Are you sure you want to delete this?');
  with: 'Remove object'
Foi útil?

Solução

Sounds like you did not include the prototype and/or scriptaculous libraries in the application.

Use the Seaside configure tool (http://localhost:8080/config/MyApplication) to add the 'PTDeploymentLibrary' & 'SUDeploymentLibrary' to your application (replace 'MyApplication' with the name of your application). The libraries setting can be found in the 'General' section of the configuration settings.

Alternatively, you can also programmaticaly add this to your application as follows:

|app |
app := self registerAsApplication: 'MyApplication'.
app addLibrary: PTDeploymentLibrary; addLibrary: SUDeploymentLibrary

Obviously, you can also use the PTDevelopmentLibrary.

ps: If you are developing a new application, consider using jQuery instead of Scriptaculous.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top