info.magnolia.module.blossom.annotation
Annotation Type DialogFactory


@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface DialogFactory

Declares a class or a method to be used for creating a dialog. The unique id of the dialog is specified in the annotation.

When used on a class it is used in combination with TabFactory, TabValidator and DialogValidator. All methods annotated with TabFactory will be detected and called to contribute tabs to the dialog and methods annotated with TabValidator will be called to perform validation when the dialog is to be saved. The ordering of tabs inside the dialog can be set using the TabValidator annotation.

For example:

 @DialogFactory("page-properties")
 @TabOrder("Content", "Meta")
 public class PagePropertiesDialog {
 @TabFactory("Content")
 public void contentTab(TabBuilder tab) {...}
 @TabFactory("Meta")
 public void metaTab(TabBuilder tab) {...}
 }
 

It can also be used on a method in a template. The method will be called to take care of the full dialog creation. This includes creating tabs and adding validation callbacks. Valid arguments for such a method is DialogBuilder, Dialog and DialogCreationContext.

For example:

 @DialogFactory("page-properties")
 public void pageProperties(DialogBuilder dialog) {...}
 
You can use I18nBasename to specify which resource bundle should be used for localization of the dialogs label and its fields.

Since:
1.0
See Also:
TabFactory, TabValidator, DialogValidator, TabOrder, Template, Dialog, DialogBuilder, DialogCreationContext

Required Element Summary
 String value
          Id of the dialog.
 
Optional Element Summary
 String label
          Label of the dialog.
 

Element Detail

value

public abstract String value
Id of the dialog.

label

public abstract String label
Label of the dialog.

Default:
""


Copyright © 2009-2012 Magnolia International Ltd.. All Rights Reserved.