|
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 |
30
| public GoFormSupportImpl(IMarkupWriter writer, IRequestCycle cycle, IForm form)
|
|
34 |
| { |
|
35 |
30
| super(writer, cycle, form);
|
|
36 |
| } |
|
37 |
| |
|
38 |
18
| protected void writeTag(IMarkupWriter writer, String method, String url)
|
|
39 |
| { |
|
40 |
18
| writer.begin("go");
|
|
41 |
18
| writer.attribute("method", method);
|
|
42 |
18
| writer.attribute("href", url);
|
|
43 |
| } |
|
44 |
| |
|
45 |
18
| protected void writeHiddenFields()
|
|
46 |
| { |
|
47 |
| |
|
48 |
| |
|
49 |
| |
|
50 |
18
| writeHiddenFieldList();
|
|
51 |
| } |
|
52 |
| |
|
53 |
126
| protected void writeHiddenField(IMarkupWriter writer, String name, String id, String value)
|
|
54 |
| { |
|
55 |
126
| writer.beginEmpty("postfield");
|
|
56 |
126
| writer.attribute("name", name);
|
|
57 |
| |
|
58 |
126
| if (HiveMind.isNonBlank(id))
|
|
59 |
0
| writer.attribute("id", id);
|
|
60 |
| |
|
61 |
126
| writer.attribute("value", value);
|
|
62 |
126
| writer.println();
|
|
63 |
| } |
|
64 |
| |
|
65 |
0
| public void addEventHandler(FormEventType type, String functionName)
|
|
66 |
| { |
|
67 |
0
| throw new UnsupportedOperationException(
|
|
68 |
| "addEventHandler() not supported for WML Go component."); |
|
69 |
| } |
|
70 |
| |
|
71 |
0
| protected void emitEventManagerInitialization()
|
|
72 |
| { |
|
73 |
| } |
|
74 |
| } |