1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
package org.apache.tapestry.wml; |
16 |
|
|
17 |
|
import org.apache.hivemind.HiveMind; |
18 |
|
import org.apache.tapestry.IForm; |
19 |
|
import org.apache.tapestry.IMarkupWriter; |
20 |
|
import org.apache.tapestry.IRequestCycle; |
21 |
|
import org.apache.tapestry.form.FormEventType; |
22 |
|
import org.apache.tapestry.form.FormSupportImpl; |
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
public class GoFormSupportImpl extends FormSupportImpl |
32 |
|
{ |
33 |
|
|
34 |
|
public GoFormSupportImpl(IMarkupWriter writer, IRequestCycle cycle, |
35 |
|
IForm form) |
36 |
|
{ |
37 |
0 |
super(writer, cycle, form); |
38 |
0 |
} |
39 |
|
|
40 |
|
protected void writeTag(IMarkupWriter writer, String method, String url) |
41 |
|
{ |
42 |
0 |
writer.begin("go"); |
43 |
0 |
writer.attribute("method", method); |
44 |
0 |
writer.attribute("href", url); |
45 |
0 |
} |
46 |
|
|
47 |
|
protected void writeHiddenFields() |
48 |
|
{ |
49 |
|
|
50 |
|
|
51 |
|
|
52 |
0 |
writeHiddenFieldList(getHiddenFieldWriter()); |
53 |
0 |
} |
54 |
|
|
55 |
|
protected void writeHiddenField(IMarkupWriter writer, String name, |
56 |
|
String id, String value) |
57 |
|
{ |
58 |
0 |
writer.beginEmpty("postfield"); |
59 |
0 |
writer.attribute("name", name); |
60 |
|
|
61 |
0 |
if (HiveMind.isNonBlank(id)) writer.attribute("id", id); |
62 |
|
|
63 |
0 |
writer.attribute("value", value); |
64 |
0 |
writer.println(); |
65 |
0 |
} |
66 |
|
|
67 |
|
public void addEventHandler(FormEventType type, String functionName) |
68 |
|
{ |
69 |
0 |
throw new UnsupportedOperationException( |
70 |
|
"addEventHandler() not supported for WML Go component."); |
71 |
|
} |
72 |
|
|
73 |
|
protected void emitEventManagerInitialization() |
74 |
|
{ |
75 |
0 |
} |
76 |
|
} |