@QueryParam

Syntax

@QueryParam

@QueryParam("keyString")

Description

Target: A method's parameter (initial method and command method)

Purpose: Tell binder to retrieve this parameter with specified key from HTTP request parameters.

The annotation is applied to initial method's (or command method's) parameter. It declares that the applied parameter should come from HTTP request parameters with specified key.

Since 9.5.0

The value can be omitted if name is the same as the annotated parameter.

@QueryParam String keyString

Example

Http request parameters is appended at URL like:

http://localhost:8080/zkbinddemo/httpparam.zul?param1=abc

public class HttpParamVM {

    String queryParam;

    @Init
    public void init(@QueryParam String param1) {
        queryParam = param1;
    }
}
  • In this example, binder will pass "abc" to param1.