~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/widgets/doc/launchpad-target-widget.txt

  • Committer: Abel Deuring
  • Date: 2011-07-27 16:22:36 UTC
  • mfrom: (13539 devel)
  • mto: This revision was merged to the branch mainline in revision 13587.
  • Revision ID: abel.deuring@canonical.com-20110727162236-m5e4e45257ehq65r
devel merged

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
             id="field.bugtarget.option.product"
315
315
             name="field.bugtarget" type="radio" value="product" />
316
316
    ...
 
317
 
 
318
 
 
319
== Custom prefixes ==
 
320
 
 
321
Setting a prefix on the widget also applies to all the subordinate widgets.
 
322
 
 
323
    >>> widget = LaunchpadTargetWidget(
 
324
    ...     IFrontPageBugAddForm['bugtarget'], empty_request)
 
325
    >>> widget.setPrefix("task")
 
326
    >>> rendered = widget()
 
327
    >>> 'field.bugtarget' in rendered
 
328
    False
 
329
    >>> 'task.bugtarget' in rendered
 
330
    True