org.odlabs.wiquery.ui.dialog.util
Class DialogUtilsBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.odlabs.wiquery.core.behavior.WiQueryAbstractBehavior
          extended by org.odlabs.wiquery.ui.dialog.util.DialogUtilsBehavior
All Implemented Interfaces:
Serializable, org.apache.wicket.IClusterable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, IWiQueryPlugin

public class DialogUtilsBehavior
extends WiQueryAbstractBehavior

$Id: DialogResourcesBehavior.java Behavior to load all needed resources for the Dialog Contains some utilities method to create very lightweight Dialog

Since:
1.1
Author:
Julien Roche
See Also:
Serialized Form

Nested Class Summary
static class DialogUtilsBehavior.DialogUtilsLanguages
          Enumeration of possibles alternatives languages for the Dailog (Default local : EN)
 
Field Summary
static WiQueryJavaScriptResourceReference WIQUERY_DIALOG_JS
          Constant of wiQuery Dialog resource
 
Constructor Summary
DialogUtilsBehavior()
           
 
Method Summary
 JsStatement errorDialog(String message)
          Method creating an error Dialog
 Locale getLocale()
           
 JsStatement questionDialog(String message)
          Method creating a question Dialog
 void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.html.IHeaderResponse response)
           
 JsStatement simpleDialog(String title, String message)
          Method creating a simple dialog
 JsStatement statement()
          Returns the main JsStatement used to create the plugin.
 WaitDialogStatements waitDialog()
          Method creating a waiting dialog
 JsStatement warningDialog(String message)
          Method creating a warning Dialog
 
Methods inherited from class org.odlabs.wiquery.core.behavior.WiQueryAbstractBehavior
bind, getComponent, onBind
 
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, canCallListenerInterface, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIQUERY_DIALOG_JS

public static final WiQueryJavaScriptResourceReference WIQUERY_DIALOG_JS
Constant of wiQuery Dialog resource

Constructor Detail

DialogUtilsBehavior

public DialogUtilsBehavior()
Method Detail

renderHead

public void renderHead(org.apache.wicket.Component component,
                       org.apache.wicket.markup.html.IHeaderResponse response)
Specified by:
renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
Overrides:
renderHead in class org.apache.wicket.behavior.Behavior

errorDialog

public JsStatement errorDialog(String message)
Method creating an error Dialog

Parameters:
message - Message
Returns:
a JsStatement

getLocale

public Locale getLocale()
Returns:
the used local

questionDialog

public JsStatement questionDialog(String message)
Method creating a question Dialog

Parameters:
message - Message
Returns:
a JsStatement

simpleDialog

public JsStatement simpleDialog(String title,
                                String message)
Method creating a simple dialog

Parameters:
title - Title
message - Message
Returns:
the required JsStatement

statement

public JsStatement statement()
Description copied from interface: IWiQueryPlugin
Returns the main JsStatement used to create the plugin.

Specified by:
statement in interface IWiQueryPlugin
Specified by:
statement in class WiQueryAbstractBehavior
Returns:
The JsStatement corresponding to this component.

waitDialog

public WaitDialogStatements waitDialog()
Method creating a waiting dialog

Returns:
a WaitDialogStatements

warningDialog

public JsStatement warningDialog(String message)
Method creating a warning Dialog

Parameters:
message - Message
Returns:
a JsStatement


Copyright © 2012. All Rights Reserved.