KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > form > NodeHandler


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.form;
14
15 import javax.servlet.http.HttpSession JavaDoc;
16
17 import org.w3c.dom.Element JavaDoc;
18
19 import com.tonbeller.wcf.controller.RequestContext;
20
21 /**
22  * Part of a Component that is attached to a DOM Element. A NodeHandler is attached to an element
23  * node at initialization time.
24  * @author av
25  */

26 public interface NodeHandler {
27   
28   /**
29    * initializes the handler
30    * @param context the current request
31    * @param parent the dispatcher of the owner component. NodeHandler may register
32    * RequestListeners with this dispatcher
33    * @param form allows the NodeHandler to send/receive form events (validate/revert)
34    * @param element the element that this handler is responsible for
35    */

36   void initialize(RequestContext context, XmlComponent comp, Element JavaDoc element) throws Exception JavaDoc;
37   void destroy(HttpSession JavaDoc session) throws Exception JavaDoc;
38   
39   /**
40    * renders itself by changing the DOM Element
41    */

42   void render(RequestContext context) throws Exception JavaDoc;
43 }
44
Popular Tags