com.atlassian.jira.web.util
Class CheckboxTagSupport

java.lang.Object
  extended by com.atlassian.jira.web.util.CheckboxTagSupport

public final class CheckboxTagSupport
extends Object

Support for communication between Webwork actions and checkbox tags. Encapsulates two boolean flags for getting and setting pre- and post-action values of the checkbox.

Since:
v4.2

Constructor Summary
CheckboxTagSupport(boolean preAction)
          Constructor accepting pre-action value of the checkbox.
 
Method Summary
 boolean hasChanged()
          Provides information, if the actual value of checkbox was changed.
 boolean postAction()
          Post-action value set from the request.
 void postAction(boolean postAction)
          Post-action value coming from the reqest.
 boolean preAction()
          Getter for pre-action value of the checkbox.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckboxTagSupport

public CheckboxTagSupport(boolean preAction)
Constructor accepting pre-action value of the checkbox. Actions should handle retrieval of this value from appropriate source (e.g. application properties).

Parameters:
preAction -
Method Detail

preAction

public boolean preAction()
Getter for pre-action value of the checkbox. This should be invoked in the action getter to provide value for the checkbox tag via WebWork stack.

Returns:
pre-action checkbox value from JIRA

postAction

public void postAction(boolean postAction)
Post-action value coming from the reqest. This should be invoked in the action setter.

Parameters:
postAction - post-action checkbox value from the request

postAction

public boolean postAction()
Post-action value set from the request. Use it in the business logic in action's #execute methods.

Returns:
post-action checkbox value from the request

hasChanged

public boolean hasChanged()
Provides information, if the actual value of checkbox was changed. Invoked it only after the actual request was run (i.e. postAction(boolean) was invoked).

Returns:
true, if the value of checkbox was changed by the last request.


Copyright © 2002-2013 Atlassian. All Rights Reserved.