org.ztemplates.actions
Annotation Type ZMatch


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface ZMatch

maps a action pojo to a url See here for details.


Required Element Summary
 String value
          the path matched by this action.
 
Optional Element Summary
 boolean consume
          if true, the action handler will not be assigned to the parent action handler variable.
 String form
          Request parameters are mapped by reflection to the form object of type ZIForm accessible through a bean property with name specified in this property.
 String[] parameters
          parameter names that are mapped to this action.
 ZMatch.Protocol requiresProtocol
          if set to a protocol creating urls will honor this, also there will be redirects if url is called from another protocol
 

Element Detail

value

public abstract String value
the path matched by this action. See here for details.

Returns:

parameters

public abstract String[] parameters
parameter names that are mapped to this action.

Returns:
Default:
{}

requiresProtocol

public abstract ZMatch.Protocol requiresProtocol
if set to a protocol creating urls will honor this, also there will be redirects if url is called from another protocol

Returns:
Default:
org.ztemplates.actions.ZMatch.Protocol.DEFAULT

form

public abstract String form
Request parameters are mapped by reflection to the form object of type ZIForm accessible through a bean property with name specified in this property. Example: form="xxx" needs a getter getXxx() in the action-pojo returning a instance of type ZIForm.

Alternatively implement ZIFormAction in your action-pojo and leave this value blank.

You could also do both, implement ZIFormAction and set form="form"

Implementing ZIFormAction is NOT required but good style.

Returns:
Default:
""

consume

public abstract boolean consume
if true, the action handler will not be assigned to the parent action handler variable. Intended to be used for transient events, like toggling the state of tree nodes.

Default:
false


Copyright © 2011. All Rights Reserved.