Source code: com/voytechs/html/event/HtmlDispatcherBroker.java
1 /*
2 * File: HtmlDispatcherBroker.java
3 * Auth: Mark Bednarczyk
4 * Date: DATE
5 * Id: $Id: HtmlDispatcherBroker.java,v 1.1.1.1 2002/01/23 23:52:46 voytechs Exp $
6 ********************************************
7 * $Log: HtmlDispatcherBroker.java,v $
8 * Revision 1.1.1.1 2002/01/23 23:52:46 voytechs
9 * Initial public release, BETA 1.0 - voytechs
10 *
11 */
12 package com.voytechs.html.event;
13
14 import com.voytechs.html.util.LogFacility;
15
16 import com.voytechs.html.event.*;
17
18 import java.lang.*;
19 import java.util.*;
20
21 /**
22 * Specialized container object for holding dispatcher
23 * listeners. Because of dynamic binding of HTML components and
24 * the dispatcher, addtion of listeners has to be delayed until
25 * the dispatcher bound and initlizated otherwise the binding can't
26 * occur. This object adapts to the HTML component special requirements
27 * such as generating a URL acceptable parameters or HTML Form tags.
28 */
29 public class HtmlDispatcherBroker
30 extends DispatcherBroker {
31
32 /* Internal attributes */
33
34 private String uniqName = null;
35 private HtmlDispatcher dispatcher = null;
36
37 /**
38 *
39 * @param
40 * @exception
41 */
42 public HtmlDispatcherBroker(int componentType) {
43 super(componentType);
44
45 }
46
47 /**
48 * Sets the global dispatcher. Late bindings, adding
49 * delayed listeners, etc. Called after the full component tree is built.
50 * @param dispatcher Informs that binding of the dispatcher is complete and
51 * dispatcher is ready to receive delayed listeners any time now.
52 */
53 public void setDispatcher(HtmlDispatcher dispatcher)
54 throws EventException {
55
56 this.dispatcher = dispatcher;
57 super.setDispatcher(dispatcher);
58
59 }
60
61 /**
62 * Get the uniq name of the component.
63 */
64 public String getElementName() {
65 if(uniqName == null) {
66 try {
67 uniqName = dispatcher.generateUniqName(getEventType(), getId());
68 }
69 catch(EventException ee) {
70 LogFacility.err.println(ee);
71 }
72 }
73 return(uniqName);
74 }
75
76 /**
77 * Test function for HtmlDispatcherBroker
78 * @param args command line arguments
79 */
80 public static void main(String [] args) {
81 }
82
83 } /* END OF: HtmlDispatcherBroker */