前几天接触到一个ajax应用需要把页面点击后的实体传递到一个及时打开的window里去,想来想去只能把id进行传递,因为涉及到多个window及参数,可以使用url进行辩别.
查了下tapestry的event,可以找到有如下的EventConstants:
static String | ACTION Default client event name, "action", used in most situations. |
static String | ACTIVATE Event triggered when a page is activated (for rendering). |
static String | ADD_ROW Event triggered by AjaxFormLoop to inform the container that a new row has been requested. |
static String | FAILURE Event type for a notification after the form has been submitted, when there are errors in the validation tracker. |
static String | PARSE_CLIENT Event triggered by some form-related cmponents to parse a value provided by the client. |
static String | PASSIVATE Event triggered when a link for a page is generated. |
static String | PREPARE Invoked to let the containing component(s) prepare for the form rendering or the form submission. |
static String | PREPARE_FOR_RENDER Invoked before PREPARE when rendering out the form. |
static String | PREPARE_FOR_SUBMIT Invoked before PREPARE when the form is submitted. |
static String | REMOVE_ROW Event triggered by AjaxFormLoop to inform the container about the row removed on the client side. |
static String | SELECTED Event type triggered by the Submit component when it is the cause of the form submission. |
static String | SUBMIT Event type for a notification after the form has submitted. |
static String | SUCCESS Event type for a notification after the form has submitted, when there are no errors in the validation tracker. |
static String | TO_CLIENT Event triggered by some form-related components to convert a server-side value to a client-side string, as an alternative to a Translator . |
static String | VALIDATE Event triggered by form-related components to validate user input. |
static String | VALIDATE_FORM Event type for a notification to perform validation of submitted data. |
@OnEvent(value="activate")
void activateConfirmEdit(Integer id, boolean reload){
this.reload = reload;
if (reload){
this.id = id.longValue();
}
}
读取了url里的内容,并进行了提取.使页面得到了应有的初始参数,以便进一步处理.