-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path161.java
More file actions
621 lines (604 loc) · 24.3 KB
/
Copy path161.java
File metadata and controls
621 lines (604 loc) · 24.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
/*
* Copyright © 2012 jbundle.org. All rights reserved.
*/
package org.jbundle.base.screen.view.html;
/**
* @(#)ScreenField.java 0.00 12-Feb-97 Don Corley
*
* Copyright © 2012 tourgeek.com. All Rights Reserved.
* don@tourgeek.com
*/
import java.io.PrintWriter;
import java.util.ResourceBundle;
import org.jbundle.base.db.Record;
import org.jbundle.base.model.DBConstants;
import org.jbundle.base.model.DBParams;
import org.jbundle.base.model.HtmlConstants;
import org.jbundle.base.model.Utility;
import org.jbundle.base.screen.model.BaseGridScreen;
import org.jbundle.base.screen.model.BasePanel;
import org.jbundle.base.screen.model.BaseScreen;
import org.jbundle.base.screen.model.GridScreen;
import org.jbundle.base.screen.model.ScreenField;
import org.jbundle.base.screen.model.util.DisplayToolbar;
import org.jbundle.base.screen.model.util.HelpToolbar;
import org.jbundle.base.screen.model.util.MaintToolbar;
import org.jbundle.base.screen.model.util.MenuToolbar;
import org.jbundle.base.util.BaseApplication;
import org.jbundle.base.util.MainApplication;
import org.jbundle.model.main.user.db.UserInfoModel;
import org.jbundle.model.screen.ScreenComponent;
import org.jbundle.model.DBException;
import org.jbundle.thin.base.db.Constants;
/**
* This is the base for any data display screen.
*/
public class HBasePanel extends HScreenField
{
/**
* Constructor.
*/
public HBasePanel()
{
super();
}
/**
* Constructor.
* @param model The model object for this view object.
* @param bEditableControl Is this control editable?
*/
public HBasePanel(ScreenField model, boolean bEditableControl)
{
this();
this.init(model, bEditableControl);
}
/**
* Constructor.
* @param model The model object for this view object.
* @param bEditableControl Is this control editable?
*/
public void init(ScreenComponent model, boolean bEditableControl)
{
super.init(model, bEditableControl);
}
/**
* Free.
*/
public void free()
{
super.free();
}
/**
* Output this screen using HTML.
* Display the html headers, etc. then:
* <ol>
* - Parse any parameters passed in and set the field values.
* - Process any command (such as move=Next).
* - Render this screen as Html (by calling printHtmlScreen()).
* </ol>
* @param out The html out stream.
* @exception DBException File exception.
*/
public void printReport(PrintWriter out, ResourceBundle reg)
throws DBException
{
if (reg == null)
reg = ((BaseApplication)this.getTask().getApplication()).getResources(HtmlConstants.HTML_RESOURCE, false);
this.printHtmlHeader(out, reg);
this.printHtmlMenuStart(out, reg);
this.processInputData(out);
((BasePanel)this.getScreenField()).prePrintReport();
this.printScreen(out, reg);
this.printHtmlMenuEnd(out, reg);
this.printHtmlTrailer(out, reg);
this.printHtmlFooter(out, reg);
}
/**
* Process all the submitted params.
* @param out The Html output stream.
* @exception DBException File exception.
*/
public void processInputData(PrintWriter out)
throws DBException
{
String strMoveValue = this.getProperty(DBParams.COMMAND); // Display record
if (strMoveValue == null)
strMoveValue = Constants.BLANK;
String strError = this.getTask().getLastError(0);
if ((strError != null) && (strError.length() > 0))
strError = strError + " on " + strMoveValue;
if ((strError != null) && (strError.length() > 0))
{
out.println("<span class=\"error\">Error: " + strError + "</span><br />");
Record record = ((BasePanel)this.getScreenField()).getMainRecord();
if (record != null)
record.setEditMode(Constants.EDIT_NONE); // Make sure this isn't updated on screen free
}
else
{
String strMessage = this.getTask().getStatusText(DBConstants.INFORMATION_MESSAGE);
if (strMessage != null)
if (strMoveValue.length() > 0)
if ((strMessage.length() > 0) && (!(this.getScreenField() instanceof BaseGridScreen))) // TODO localize
out.println("<span class=\"information\">" + strMessage + "</span><br />");
}
}
/**
* Print this screen's content area.
* @param out The out stream.
* @exception DBException File exception.
*/
public void printScreen(PrintWriter out, ResourceBundle reg)
throws DBException
{
String strParamHelp = this.getProperty(DBParams.HELP); // Display record
if (strParamHelp != null)
return; // Don't do this for help screens
this.printHtmlStartForm(out);
int iHtmlOptions = this.getScreenField().getPrintOptions();
if ((iHtmlOptions & HtmlConstants.PRINT_TOOLBAR_BEFORE) != 0)
this.printZmlToolbarData(out, iHtmlOptions);
if ((iHtmlOptions & HtmlConstants.DONT_PRINT_SCREEN) == 0)
this.getScreenField().printData(out, iHtmlOptions); // DO print screen
if ((iHtmlOptions & HtmlConstants.PRINT_TOOLBAR_AFTER) != 0)
this.printZmlToolbarData(out, iHtmlOptions);
this.printHtmlEndForm(out);
}
/**
* display this screen in html input format.
* returns true if default params were found for this form.
* @param out The html out stream.
* @exception DBException File exception.
*/
public void printHtmlStartForm(PrintWriter out)
throws DBException
{
String strAction = "post";
BasePanel modelScreen = (BaseScreen)this.getScreenField();
int iNumCols = modelScreen.getSFieldCount();
int iInputCount = 0;
for (int i = 0; i < iNumCols; i++)
{
ScreenField sField = modelScreen.getSField(i);
if (!sField.isToolbar())
if (sField.getConverter() != null)
if (sField.getConverter().getField() != null)
{
if (DBParams.PASSWORD.equalsIgnoreCase(sField.getConverter().getField().getFieldName()))
iInputCount = 5; // Always post if password is in the URL
iInputCount++;
}
}
if (iInputCount < 5)
strAction = "get";
if (modelScreen instanceof GridScreen)
if (modelScreen.getEditing() == true)
strAction = "post";
out.println("<form action=\"" + modelScreen.getServletPath(null) + "\" method=\"" + strAction + "\">");
this.addHiddenParams(out, this.getHiddenParams());
}
/**
* display this screen in html input format.
* returns true if default params were found for this form.
* @param out The html out stream.
* @exception DBException File exception.
*/
public void printHtmlEndForm(PrintWriter out)
throws DBException
{
out.println("</form>");
}
/**
* display this screen in html input format.
* returns true if default params were found for this form.
* @return The HTML options.
* @exception DBException File exception.
*/
public int getPrintOptions()
throws DBException
{
int iHtmlOptions = HtmlConstants.HTML_DISPLAY;
if (((BasePanel)this.getScreenField()).getEditing())
iHtmlOptions |= HtmlConstants.HTML_INPUT;
iHtmlOptions |= HtmlConstants.HTML_ADD_DESC_COLUMN; // Add a desc row (default)
iHtmlOptions |= HtmlConstants.HTML_IN_TABLE_ROW; // Yes, you are in a table row (default)
iHtmlOptions |= HtmlConstants.PRINT_TOOLBAR_BEFORE;
String strParamForms = this.getProperty(HtmlConstants.FORMS); // Display record
if ((strParamForms == null) || (strParamForms.length() == 0))
{
strParamForms = Constants.BLANK;
if (this.getScreenField().isToolbar())
if ((!(this.getScreenField() instanceof DisplayToolbar)) &&
(!(this.getScreenField() instanceof MaintToolbar)) &&
(!(this.getScreenField() instanceof MenuToolbar)) &&
(!(this.getScreenField() instanceof HelpToolbar)))
strParamForms = HtmlConstants.BOTH;
}
if (strParamForms.length() > 0) if (!strParamForms.equalsIgnoreCase(HtmlConstants.DATA))
iHtmlOptions = (iHtmlOptions & (~HtmlConstants.PRINT_TOOLBAR_BEFORE)) | HtmlConstants.PRINT_TOOLBAR_AFTER;
return iHtmlOptions;
}
/**
* Bottom of HTML form.
* @param out The html out stream.
* @param reg The resources object.
*/
public void printHtmlFooter(PrintWriter out, ResourceBundle reg)
{
String strHTML = reg.getString("htmlFooter");
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = "</body>\n</html>";
out.println(strHTML);
out.flush();
}
/**
* Print the top nav menu.
* @param out The html out stream.
* @param reg The resources object.
* @exception DBException File exception.
*/
public void printHtmlBanner(PrintWriter out, ResourceBundle reg)
throws DBException
{
if (HBasePanel.getFirstToUpper(this.getProperty(DBParams.BANNERS), 'N') == 'Y')
{
String strNav = reg.getString("htmlBanner");
strNav = Utility.replaceResources(strNav, reg, null, null);
this.writeHtmlString(strNav, out);
}
}
/**
* Print the top nav menu.
* @param out The html out stream.
* @param reg The resources object.
* @exception DBException File exception.
*/
public void printHtmlLogo(PrintWriter out, ResourceBundle reg)
throws DBException
{
char chMenubar = HBasePanel.getFirstToUpper(this.getProperty(DBParams.LOGOS), 'H');
if (chMenubar == 'H') if (((BasePanel)this.getScreenField()).isMainMenu())
chMenubar = 'Y';
if (chMenubar == 'Y')
{
String strNav = reg.getString("htmlLogo");
strNav = Utility.replaceResources(strNav, reg, null, null);
String strScreen = ((BasePanel)this.getScreenField()).getScreenURL();
strScreen = Utility.encodeXML(strScreen);
String strUserName = ((MainApplication)this.getTask().getApplication()).getUserName();
if (Utility.isNumeric(strUserName))
strUserName = DBConstants.BLANK;
String strLanguage = this.getTask().getApplication().getLanguage(false);
strNav = Utility.replace(strNav, HtmlConstants.URL_TAG, strScreen);
strNav = Utility.replace(strNav, HtmlConstants.USER_NAME_TAG, strUserName);
strNav = Utility.replace(strNav, "<language/>", strLanguage);
this.writeHtmlString(strNav, out);
}
}
/**
* Print the top nav menu.
* @param out The html out stream.
* @param reg The resources object.
* @exception DBException File exception.
*/
public void printHtmlTrailer(PrintWriter out, ResourceBundle reg)
throws DBException
{
char chMenubar = HBasePanel.getFirstToUpper(this.getProperty(DBParams.TRAILERS), 'H');
if (chMenubar == 'H') if (((BasePanel)this.getScreenField()).isMainMenu())
chMenubar = 'Y';
if (chMenubar == 'Y')
{
String strNav = reg.getString("htmlTrailer");
strNav = Utility.replaceResources(strNav, reg, null, null);
String strScreen = ((BasePanel)this.getScreenField()).getScreenURL();
strScreen = Utility.encodeXML(strScreen);
strNav = Utility.replace(strNav, HtmlConstants.URL_TAG, strScreen);
this.writeHtmlString(strNav, out);
}
}
/**
* Print the top nav menu.
* @param out The html out stream.
* @param reg The resources object.
* @exception DBException File exception.
*/
public void printHtmlMenubar(PrintWriter out, ResourceBundle reg)
throws DBException
{
char chMenubar = HBasePanel.getFirstToUpper(this.getProperty(DBParams.MENUBARS), 'Y');
if (chMenubar == 'Y')
{
String strUserName = this.getProperty(DBParams.USER_NAME);
String strUserID = this.getProperty(DBParams.USER_ID);
if ((strUserName == null) || (DBConstants.ANON_USER_ID.equals(strUserID)) || (Utility.isNumeric(strUserName)))
strUserName = DBConstants.BLANK;
String strNav = reg.getString((strUserName.length() > 0) ? "htmlMenubar" : "htmlMenubarAnon");
strNav = Utility.replaceResources(strNav, reg, null, null);
String strScreen = ((BasePanel)this.getScreenField()).getScreenURL();
strScreen = Utility.encodeXML(strScreen);
String strTitle = this.getProperty("title"); // Menu page
if ((strTitle == null) || (strTitle.length() == 0))
strTitle = ((BasePanel)this.getScreenField()).getTitle();
strNav = Utility.replace(strNav, HtmlConstants.URL_TAG, strScreen);
strNav = Utility.replace(strNav, HtmlConstants.TITLE_TAG, strTitle);
strNav = Utility.replace(strNav, HtmlConstants.USER_NAME_TAG, strUserName);
this.writeHtmlString(strNav, out);
}
}
/**
* Print the top nav menu.
* @param out The html out stream.
* @param reg The resources object.
* @exception DBException File exception.
*/
public void printHtmlMenuStart(PrintWriter out, ResourceBundle reg)
throws DBException
{
this.printHtmlBanner(out, reg);
this.printHtmlLogo(out, reg);
this.printHtmlMenubar(out, reg);
String strHTML = reg.getString("htmlTableStart");
strHTML = Utility.replaceResources(strHTML, reg, null, null);
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = "<table border=\"0\" cellspacing=\"10\" width=\"100%\">\n<tr>";
out.println(strHTML);
this.printHtmlNavMenu(out);
strHTML = reg.getString("htmlContentStart");
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = "<td valign=\"top\">";
out.println(strHTML);
}
/**
* Code to display a Menu.
* @param out The html out stream.
* @param reg The resources object.
* @exception DBException File exception.
*/
public void printHtmlMenuEnd(PrintWriter out, ResourceBundle reg)
throws DBException
{
String strHTML = reg.getString("htmlContentEnd");
strHTML = Utility.replaceResources(strHTML, reg, null, null);
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = "</td>";
out.println(strHTML);
strHTML = null;
char ch = HBasePanel.getFirstToUpper(this.getProperty(DBParams.NAVMENUS), ' ');
if (ch != UserInfoModel.NO_ICONS.charAt(0))
{
if (ch == UserInfoModel.ICONS_ONLY.charAt(0)) /** Icons only */
strHTML = reg.getString("htmlNavIconsOnlyAfterContent");
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = reg.getString("htmlNavAfterContent");
if ((strHTML != null) && (strHTML.length() > 0))
out.println(strHTML);
}
strHTML = reg.getString("htmlTableEnd");
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = "</tr>\n</table>";
out.println(strHTML);
}
/**
* Code to display a Menu.
* @param out The html out stream.
* @exception DBException File exception.
*/
public void printHtmlNavMenu(PrintWriter out)
throws DBException
{
String strHTML = null, strStart = null, strEnd = null;
ResourceBundle reg = ((BaseApplication)this.getTask().getApplication()).getResources(HtmlConstants.HTML_RESOURCE, false);
char ch = HBasePanel.getFirstToUpper(this.getProperty(DBParams.NAVMENUS), ' ');
if (ch != UserInfoModel.NO_ICONS.charAt(0))
{
String strMenu = this.getProperty(DBParams.MENU); // This user's nav menu
if ((strMenu == null) || (strMenu.length() == 0))
strMenu = "NavMenu";
if (ch == UserInfoModel.ICONS_ONLY.charAt(0)) /** Icons only */
{
strStart = reg.getString("htmlNavIconsOnlyStart");
strHTML = reg.getString(strMenu + "IconsOnly");
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = reg.getString("htmlNavMenuIconsOnly");
strEnd = reg.getString("htmlNavIconsOnlyEnd");
}
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = reg.getString(strMenu);
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = reg.getString("htmlNavMenu");
if ((strStart == null) || (strStart.length() == 0))
strStart = reg.getString("htmlNavStart");
if ((strEnd == null) || (strEnd.length() == 0))
strEnd = reg.getString("htmlNavEnd");
}
if ((strHTML == null) || (strHTML.length() == 0) ||
(strStart == null) || (strStart.length() == 0) ||
(strEnd == null) || (strEnd.length() == 0))
{
strStart = Constants.BLANK;
strHTML = Constants.BLANK; // "\t<tr valign=top>\n\t<td>"; // Default menu = no table items
strEnd = Constants.BLANK;
}
out.println(strStart);
out.println(strHTML);
out.println(strEnd);
}
/**
* Form Header.
* @param out The html out stream.
* @param reg The resources object.
*/
public void printHtmlHeader(PrintWriter out, ResourceBundle reg)
{
String strTitle = this.getProperty("title"); // Menu page
if ((strTitle == null) || (strTitle.length() == 0))
strTitle = ((BasePanel)this.getScreenField()).getTitle();
String strHTMLStart = reg.getString("htmlHeaderStart");
String strHTMLEnd = reg.getString("htmlHeaderEnd");
// Note: don't free the reg key (DBServlet will)
this.printHtmlHeader(out, strTitle, strHTMLStart, strHTMLEnd);
}
/**
* Default Form Header.
* @param out The html out stream.
* @param strTitle The screen title.
* @param strHTMLStart The start HTML.
* @param strHTMLEnd The ending HTML.
*/
public void printHtmlHeader(PrintWriter out, String strTitle, String strHTMLStart, String strHTMLEnd)
{
if ((strHTMLStart == null) || (strHTMLStart.length() == 0))
strHTMLStart = "<html>\n" +
"<head>\n" +
"<link rel=\"stylesheet\" type=\"text/css\" href=\"org/jbundle/res/docs/styles/css/style.css\" title=\"basicstyle\">";
out.println(strHTMLStart);
String strStyleParam = this.getProperty("style"); // Menu page
if (strStyleParam != null) if (strStyleParam.length() > 0)
{ // Include style
out.println("<style type=\"text/css\">");
out.println("<!--");
out.println("@import url(\"org/jbundle/res/docs/styles/css/" + strStyleParam + ".css\");");
out.println("-->");
out.println("</style>");
}
String strParamTitle = this.getProperty("title"); // Menu page
if (strParamTitle != null) if (strParamTitle.length() > 0)
strTitle = strParamTitle;
if (strTitle.length() == 0)
strTitle = " ";
if ((strHTMLEnd == null) || (strHTMLEnd.length() == 0))
strHTMLEnd = "<title>" + HtmlConstants.TITLE_TAG + "</title>\n" +
"</head>\n" +
"<body>\n" +
"<h1>" + HtmlConstants.TITLE_TAG + "</h1>";
strHTMLEnd = Utility.replace(strHTMLEnd, HtmlConstants.TITLE_TAG, strTitle);
String strKeywords = this.getHtmlKeywords();
if ((strKeywords != null) && (strKeywords.length() > 0))
strKeywords += ", ";
strHTMLEnd = Utility.replace(strHTMLEnd, "<keywords/>", strKeywords);
String strMenudesc = this.getHtmlMenudesc();
strHTMLEnd = Utility.replace(strHTMLEnd, HtmlConstants.MENU_DESC_TAG, strMenudesc);
out.println(strHTMLEnd);
}
/**
* Display this screen in html input format.
* @return true if default params were found for this form.
* @param out The http output stream.
* @exception DBException File exception.
*/
public boolean printData(PrintWriter out, int iPrintOptions)
{
return false; // Don't print
}
/**
* Output this screen using HTML.
* @exception DBException File exception.
*/
public void printScreenFieldData(ScreenComponent sField, PrintWriter out, int iPrintOptions)
{
((ScreenField)sField).printData(out, iPrintOptions);
}
/**
* Display the start form in input format.
* @param out The out stream.
* @param iPrintOptions The view specific attributes.
*/
public void printDataStartForm(PrintWriter out, int iPrintOptions)
{
if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
{
}
else if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) == HtmlConstants.DETAIL_SCREEN)
{
out.println("<tr>\n<td colspan=\"20\">");
}
else if ((iPrintOptions & HtmlConstants.HEADING_SCREEN) == HtmlConstants.HEADING_SCREEN)
{
out.println("<tr>\n<td colspan=\"20\">");
}
else if ((iPrintOptions & HtmlConstants.FOOTING_SCREEN) == HtmlConstants.FOOTING_SCREEN)
{
out.println("<tr>\n<td colspan=\"20\">");
}
else
out.println("<table border=\"0\">"); // First time
}
/**
* Display the start form in input format.
* @param out The out stream.
* @param iPrintOptions The view specific attributes.
*/
public void printDataEndForm(PrintWriter out, int iPrintOptions)
{
if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
{
}
else if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) == HtmlConstants.DETAIL_SCREEN)
{
out.println("</td>\n</tr>");
}
else if ((iPrintOptions & HtmlConstants.HEADING_SCREEN) == HtmlConstants.HEADING_SCREEN)
{
out.println("</td>\n</tr>");
}
else if ((iPrintOptions & HtmlConstants.FOOTING_SCREEN) == HtmlConstants.FOOTING_SCREEN)
{
out.println("</td>\n</tr>");
}
else
out.println("</table>");
}
/**
* Display the start form in input format.
* @param out The out stream.
* @param iPrintOptions The view specific attributes.
*/
public void printDataStartField(PrintWriter out, int iPrintOptions)
{
if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
{
}
else
out.println("<tr>");
}
/**
* Display the start form in input format.
* @param out The out stream.
* @param iPrintOptions The view specific attributes.
*/
public void printDataEndField(PrintWriter out, int iPrintOptions)
{
if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
{
}
else
out.println("</tr>");
}
/**
* Add this hidden param to the output stream.
* @param out The html output stream.
* @param strParam The parameter.
* @param strValue The param's value.
*/
public void addHiddenParam(PrintWriter out, String strParam, String strValue)
{
out.println("<input type=\"hidden\" name=\"" + strParam + "\" value=\"" + strValue + "\">");
}
/**
* Parse the HTML for variables and print it.
* @param strHTML the html string to output.
* @param out The html out stream.
*/
public void writeHtmlString(String strHTML, PrintWriter out)
{
int iIndex;
if (strHTML == null)
return;
while ((iIndex = strHTML.indexOf(HtmlConstants.TITLE_TAG)) != -1)
{ // ** FIX THIS to look for a <xxx/> and look up the token **
strHTML = strHTML.substring(0, iIndex) + ((BasePanel)this.getScreenField()).getTitle() + strHTML.substring(iIndex + HtmlConstants.TITLE_TAG.length());
}
out.println(strHTML);
}
}