@Retention(value=RUNTIME) @Target(value=FIELD) public @interface Bind
class MyAction implements Action {
{@literal @}Bind String rendermode;
{@literal @}Bind("myVar") String theVariable;
{@literal @}Bind(scope="session") ShoppingCart cart;
public void handleRequest(ICS ics){
if("live".equals(rendermode){
// do something when rendermode=live
}
}
}
Modifier and Type | Optional Element and Description |
---|---|
Bind.Scope |
scope |
String |
value |
public abstract String value
public abstract Bind.Scope scope
Copyright © 2010-2016 Oracle Corporation. All Rights Reserved.