Changes between Version 14 and Version 15 of S3/S3Summary


Ignore:
Timestamp:
08/05/14 12:20:49 (7 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Summary

    v14 v15  
    101101== Code ==
    102102
     103=== S3Summary ===
     104
     105The '''S3Summary''' meta-method handler is implemented in modules/s3/s3summary.py.
     106
     107By default, S3Summary is assigned to the '''summary''' URL method, for all request methods and formats.
     108
     109If called with a URL query variable "w", the request will be forwarded to the widget at this index position (counting from 0):
     110
     111{{{
     112# URL for the method handler of the second widget
     113/eden/org/organisation/summary?w=1
     114}}}
     115
     116The index position can be inferred from the widget_id (HTML element ID assigned by S3Summary), e.g. "summary-0" indicates index position 0 - so that widgets can send Ajax-requests to their respective back-end method via the summary URL.
     117
     118Without the "w" parameter, the request is executed by S3Summary itself, sequentially invoking all configured widget handlers (full page load).
     119
     120=== Widget Handlers ===
     121
     122S3Summary does not render the widgets itself, but calls the {{{widget()}}} function of the specified method handler, with the signature:
     123
     124{{{
     125widget(r, method=method, widget_id=widget_id, visible=visible, **attr)
     126}}}
     127
     128The parameters '''r''' (S3Request) and '''attr''' (controller attributes) are the same as for {{{apply_method()}}}.
     129
     130The '''widget_id''' contains the HTML element ID that shall be assigned to this widget (contains the widget's index position), and '''visible''' is a boolean indicating whether the widget is initially visible or not.
     131
     132If the specified method does not implement a widget() function, S3Summary will raise an "Unsupported Method" exception (HTTP 405).
    103133== Future Extensions ==
    104134