27.01.2015 Views

Best Practices of Plone Development

Best Practices of Plone Development

Best Practices of Plone Development

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.4 Form Controller 1 BEST PRACTICES FOR PLONE DEVELOPMENT<br />

1.4.3 Dispatching / Actions (2)<br />

• Context<br />

– What kind <strong>of</strong> object/context this work on<br />

– eg “Document”, “News Item”<br />

• Button<br />

– What button name was pushed<br />

– Allows “Ok”, “Cancel” buttons<br />

1.4.4 Dispatching / Actions (3)<br />

• Action<br />

– What happens next<br />

• Argument<br />

– Argument for action<br />

1.4.5 Dispatching / Actions (4)<br />

• Actions<br />

– redirect_to: HTTP redirect to argument<br />

∗ eg “http://yahoo.com”<br />

– redirect_to_action: HTTP redirect to action<br />

∗ eg “view”, “edit”<br />

– traverse_to, traverse_to_action: same, but no redirect, just calls<br />

∗ Keeps request object<br />

24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!