KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > patterns > dialoglayout > www > DynamicListTag


1 /*
2  * Copyright (c) 2006 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: DynamicListTag.java,v 1.19 2007/02/01 07:23:08 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21  
22 package org.opensubsystems.patterns.dialoglayout.www;
23
24 import javax.servlet.jsp.JspException JavaDoc;
25
26 import org.opensubsystems.core.www.BlockElementTag;
27 import org.opensubsystems.core.www.TagUtils;
28 import org.opensubsystems.patterns.tabbeddialog.www.TabbedDialogTag;
29
30 /**
31  * Custom tag to generate all HTML code necessary to display dynamic list
32  * control that allows to type an item and then add it to the list, edit the
33  * items already in the list and reorder the items in the list. This means that
34  * in the 1st row it will display the following controls:
35  * edit field + optional checkbox + Add button
36  *
37  * Below it will be displayed multiselect list with buttons Remove, Up, Down
38  * It looks as following:
39  *
40  * [ <edit_field> ] [ Add ]
41  * Added items:
42  * [ ] [ Remove ]
43  * | <multi_select> | [ Up ]
44  * [ ] [ Down ]
45  *
46  * Advanced dynamic list with checkbox looks as following:
47  *
48  * [ <edit_field> ] FlagDesc: [X] [ Add ]
49  * Added items:
50  * [ ] [ Remove ]
51  * | <multi_select> | [ Up ]
52  * [ ] [ Down ]
53  *
54  * The initial content of the list will be specified in the page using standard
55  * options tags. The values of the option tags can contain optional id that is
56  * different from the displayed text and an optional order number of the item.
57  * If the id and order number are specified, they must be specified in the value
58  * parameter of the options tag in the following format: id:order.
59  *
60  * @version $Id: DynamicListTag.java,v 1.19 2007/02/01 07:23:08 bastafidli Exp $
61  * @author Julian Legeny
62  * @code.reviewer Miro Halas
63  * @code.reviewed 1.12 2006/05/01 23:42:38 jlegeny
64  */

65 public class DynamicListTag extends BlockElementTag
66 {
67    // Constants ///////////////////////////////////////////////////////////////
68

69    /**
70     * Default char indicator if checkbox is checked.
71     */

72    public static final String JavaDoc DEFAULT_CHECK_INDICATOR = "*";
73
74    /**
75     * ID for check indicator flag.
76     */

77    public static final String JavaDoc CHECK_INDICATOR_ID = "checkindicator";
78    
79    // Attributes ///////////////////////////////////////////////////////////////
80

81    /**
82     * Generated serial version id for this class.
83     */

84    private static final long serialVersionUID = -3452469590307215632L;
85
86    /**
87     * Does this control have focus when it is displayed on the page or not.
88     * Only one control on a page or tab can be marked as focus at a time.
89     * If multiple controls are marked this way, then the first one on the page
90     * or tab will get the focus.
91     */

92    protected String JavaDoc m_strFocus;
93
94    /**
95     * Flag which will tells us if the buttons are disabled.
96     */

97    protected String JavaDoc m_strDisabled;
98
99    /**
100     * Size of the select list.
101     */

102    protected String JavaDoc m_strSize;
103
104    /**
105     * Flag specifying if there will be checkbox following the edit field control
106     * in the first row.
107     */

108    protected String JavaDoc m_strCheck;
109
110    /**
111     * Label displayed in front of the checkbox control in the first row.
112     */

113    protected String JavaDoc m_strCheckLabel;
114
115    /**
116     * String that will appended to the string in the edit field if the checkbox
117     * was checked when the Add button was pressed. This identifier will be
118     * visible within the multi select control below as part of the added item.
119     */

120    protected String JavaDoc m_strCheckIdentifier;
121
122    /**
123     * Label displayed above the list of existing (added) items.
124     */

125    protected String JavaDoc m_strListLabel;
126    
127    /**
128     * Name of the input hidden parameter that stores data to submit to the
129     * server. The variable will be populated by the custom tag and will contain
130     * all data the control contains when the form is submitted to the server.
131     * The data are have following format:
132     * item_id_1;order_number_1:encode(item_text_1)#...#item_id_N;order_number_N:encode(item_text_N)
133     */

134    protected String JavaDoc m_strBufferName;
135    
136    /**
137     * Name of the input hidden parameter that stores data to submit to the
138     * server. It contains ????? TODO: For Julo: What does the input with this
139     * variable contains? Once you fix this, update the description in tld as well.
140     * TODO: For Julo: This is never used on any page or in the test. How do you
141     * know it works?
142     */

143    protected String JavaDoc m_strRemovedName;
144    
145    /**
146     * Name of the input hidden parameter that stores data to submit to the
147     * server. It contains ????? TODO: For Julo: What does the input with this
148     * variable contains? Once you fix this, update the description in tld as well.
149     * TODO: For Julo: This is never used on any page or in the test. How do you
150     * know it works?
151     */

152    protected String JavaDoc m_strChangedName;
153
154    // Constructors /////////////////////////////////////////////////////////////
155

156    /**
157     * Constructor for custom tag.
158     */

159    public DynamicListTag()
160    {
161       super("clsDynamicList", BlockElementTag.DIV_BLOCK_ELEMENT);
162       
163       m_strSize = "7";
164       m_strDisabled = Boolean.FALSE.toString();
165       m_strCheck = "false";
166       m_strCheckLabel = "";
167       m_strCheckIdentifier = DEFAULT_CHECK_INDICATOR;
168       m_strListLabel = "Added items";
169       m_strBufferName = "";
170       m_strRemovedName = "";
171       m_strChangedName = "";
172    }
173    
174    // Business logic ///////////////////////////////////////////////////////////
175

176    /**
177     * {@inheritDoc}
178     */

179    public int doStartTag(
180    ) throws JspException JavaDoc
181    {
182       StringBuffer JavaDoc sbHtml = new StringBuffer JavaDoc();
183       StringBuffer JavaDoc sbJSBuffer = new StringBuffer JavaDoc();
184       
185       // getCurrentId() is fairly expensive so we call it just once
186
// and then we reuse the results.
187
String JavaDoc strCurrentId = getCurrentId();
188
189       // Construct base id that will be used to generate all internal ids
190
StringBuffer JavaDoc sbIdBuffer = new StringBuffer JavaDoc(strCurrentId);
191       int iIdBufferBaseLength;
192       sbIdBuffer.append(m_strId);
193       iIdBufferBaseLength = sbIdBuffer.length();
194
195       
196       // We want to use the imagebutton tag to generate the buttons since it
197
// supports images and mnemonics and it is easier that to code string
198
// concatenation
199
/*
200 <div class="clsDynamicList">
201    <div class="clsDynamicListButtons">
202       <dialog:imagebutton id="getCurrentId() + m_strId + dladdbutton"
203          cssclass="clsImageTextUniformButton clsImageAddButton"
204          title="Add the newly specified item to the list."
205          onclick="addToDynamicList('dynamiclistinput', 'dynamiclistselect');
206             collectDataFromDynamicList('dynamiclistselect', 'dynamiclistbuffer');">
207                           accesskey="A">Add</dialog:imagebutton>
208       <dialog:imagebutton id="getCurrentId() + m_strId + dlremovebutton"
209          cssclass="clsImageTextUniformButton clsImageRemoveButton"
210          title="Remove the selected items from the list."
211          onclick="deleteFromDynamicList('dynamiclistselect', 'dynamiclistchangedids');
212             collectDataFromDynamicList('dynamiclistselect', 'dynamiclistbuffer');"
213          accesskey="R">Remove</dialog:imagebutton>
214       <dialog:imagebutton id="getCurrentId() + m_strId + dlupbutton"
215          cssclass="clsImageTextUniformButton clsImageMoveOneUpButton"
216          title="Move the selected items in the list up."
217          onclick="moveUpInDynamicList('dynamiclistselect', 'dynamiclistchangedids');
218             collectDataFromDynamicList('dynamiclistselect', 'dynamiclistbuffer');"
219          accesskey="U">Up</dialog:imagebutton>
220       <dialog:imagebutton id="getCurrentId() + m_strId + dldownbutton"
221          class="clsImageTextUniformButton clsImageMoveOneDownButton"
222          title="Move the selected items in the list down."
223          onclick="moveDownInDynamicList('dynamiclistselect', 'dynamiclistchangedids');
224             collectDataFromDynamicList('dynamiclistselect', 'dynamiclistbuffer');"
225          accesskey="D">Down</dialog:imagebutton>
226    </div>
227    <div class="clsDynamicListBody">
228       <div class="clsDynamicListAddRow">
229         <input type="text" id="dynamiclistinput" class="clsDynamicListInput">&nbsp;
230         Correct: <input type="checkbox" id="dynamiclistcheck" class=="clsDynamicListCheck">
231       </div>
232       <div class="clsDynamicListLabelRow">
233          Existing items:
234       </div>
235       <div class="clsDynamicListListRow">
236          <select id="dynamiclistselect" class="clsDynamicListSelect" size="7" multiple>
237             <!-- options are defined within the jsp -->
238          </select>
239       </div>
240       <input type="hidden" value="" id="dynamiclistbuffer" name="THISWILLBESUBMITTED">
241       <input type="hidden" value="" id="dynamiclistcheckidentifier"
242       <input type="hidden" value="" id="dynamiclistremoveids" name="THISWILLBESUBMITTED">
243       <input type="hidden" value="" id="dynamiclistchangedids" name="THISWILLBESUBMITTED">
244    </div>
245 </div>
246 */

247       
248       // Generate the start of the double select left half control
249
sbHtml.append("<");
250       sbHtml.append(m_strType);
251       sbHtml.append(" id=\"");
252       sbHtml.append(strCurrentId);
253       sbHtml.append(m_strId);
254       sbHtml.append("control\"");
255       if ((m_strCssclass != null) && (m_strCssclass.length() > 0))
256       {
257          sbHtml.append(" class=\"");
258          sbHtml.append(m_strCssclass);
259          sbHtml.append("\"");
260       }
261       sbHtml.append(">\n");
262
263       // Generate the dynamic list buttons
264
// Do not put any \n afterthis div
265
sbHtml.append("<div class=\"clsDynamicListButtons\">");
266       // Add button
267
sbIdBuffer.delete(iIdBufferBaseLength, sbIdBuffer.length());
268       sbJSBuffer.delete(0, sbJSBuffer.length());
269       sbJSBuffer.append("addToDynamicList('");
270       sbJSBuffer.append(sbIdBuffer);
271       sbJSBuffer.append("dynamiclistinput', '");
272       sbJSBuffer.append(sbIdBuffer);
273       sbJSBuffer.append("dynamiclistselect', '");
274       sbJSBuffer.append(sbIdBuffer);
275       sbJSBuffer.append("dynamiclistcheckidentifier', '");
276       sbJSBuffer.append(sbIdBuffer);
277       sbJSBuffer.append("dynamiclistcheck');collectDataFromDynamicList('");
278       sbJSBuffer.append(sbIdBuffer);
279       sbJSBuffer.append("dynamiclistselect', '");
280       sbJSBuffer.append(sbIdBuffer);
281       sbJSBuffer.append("dynamiclistbuffer');");
282       
283       sbIdBuffer.append("dladdbutton");
284
285       ImageButtonControlTag add = new ImageButtonControlTag();
286       add.setAccesskey("A");
287       add.setCssclass("clsImageTextUniformButton clsImageAddButton");
288       add.setDisabled(getDisabled());
289       add.setOnclick(sbJSBuffer.toString());
290       add.setId(sbIdBuffer.toString());
291       add.setTitle("Add the newly specified item to the list.");
292       add.setPageContext(pageContext);
293       add.doEndTag(sbHtml, "Add");
294       
295       // Remove button
296
sbIdBuffer.delete(iIdBufferBaseLength, sbIdBuffer.length());
297       sbJSBuffer.delete(0, sbJSBuffer.length());
298       sbJSBuffer.append("deleteFromDynamicList('");
299       sbJSBuffer.append(sbIdBuffer);
300       sbJSBuffer.append("dynamiclistselect', '");
301       sbJSBuffer.append(sbIdBuffer);
302       sbJSBuffer.append("dynamiclistremoveids', '");
303       sbJSBuffer.append(sbIdBuffer);
304       sbJSBuffer.append("dynamiclistchangedids');collectDataFromDynamicList('");
305       sbJSBuffer.append(sbIdBuffer);
306       sbJSBuffer.append("dynamiclistselect', '");
307       sbJSBuffer.append(sbIdBuffer);
308       sbJSBuffer.append("dynamiclistbuffer');");
309       
310       sbIdBuffer.append("dlremovebutton");
311       
312       ImageButtonControlTag remove = new ImageButtonControlTag();
313       remove.setAccesskey("R");
314       remove.setCssclass("clsImageTextUniformButton clsImageRemoveButton");
315       remove.setDisabled(getDisabled());
316       remove.setOnclick(sbJSBuffer.toString());
317       remove.setId(sbIdBuffer.toString());
318       remove.setTitle("Remove the selected items from the list.");
319       remove.setPageContext(pageContext);
320       remove.doEndTag(sbHtml, "Remove");
321       
322       // Up button
323
sbIdBuffer.delete(iIdBufferBaseLength, sbIdBuffer.length());
324       sbJSBuffer.delete(0, sbJSBuffer.length());
325       sbJSBuffer.append("moveUpInDynamicList('");
326       sbJSBuffer.append(sbIdBuffer);
327       sbJSBuffer.append("dynamiclistselect', '");
328       sbJSBuffer.append(sbIdBuffer);
329       sbJSBuffer.append("dynamiclistchangedids');collectDataFromDynamicList('");
330       sbJSBuffer.append(sbIdBuffer);
331       sbJSBuffer.append("dynamiclistselect', '");
332       sbJSBuffer.append(sbIdBuffer);
333       sbJSBuffer.append("dynamiclistbuffer');");
334       
335       sbIdBuffer.append("dlupbutton");
336
337       ImageButtonControlTag up = new ImageButtonControlTag();
338       up.setAccesskey("U");
339       up.setCssclass("clsImageTextUniformButton clsImageMoveOneUpButton");
340       up.setDisabled(getDisabled());
341       up.setOnclick(sbJSBuffer.toString());
342       up.setId(sbIdBuffer.toString());
343       up.setTitle("Move the selected items in the list up.");
344       up.setPageContext(pageContext);
345       up.doEndTag(sbHtml, "Up");
346
347       // Down button
348
sbIdBuffer.delete(iIdBufferBaseLength, sbIdBuffer.length());
349       sbJSBuffer.delete(0, sbJSBuffer.length());
350       sbJSBuffer.append("moveDownInDynamicList('");
351       sbJSBuffer.append(sbIdBuffer);
352       sbJSBuffer.append("dynamiclistselect', '");
353       sbJSBuffer.append(sbIdBuffer);
354       sbJSBuffer.append("dynamiclistchangedids');collectDataFromDynamicList('");
355       sbJSBuffer.append(sbIdBuffer);
356       sbJSBuffer.append("dynamiclistselect', '");
357       sbJSBuffer.append(sbIdBuffer);
358       sbJSBuffer.append("dynamiclistbuffer');");
359       
360       sbIdBuffer.append("dldownbutton");
361
362       ImageButtonControlTag down = new ImageButtonControlTag();
363       down.setAccesskey("D");
364       down.setCssclass("clsImageTextUniformButton clsImageMoveOneDownButton");
365       down.setDisabled(getDisabled());
366       down.setOnclick(sbJSBuffer.toString());
367       down.setId(sbIdBuffer.toString());
368       down.setTitle("Move the selected items in the list down.");
369       down.setPageContext(pageContext);
370       down.doEndTag(sbHtml, "Down");
371       // Do not put any \n before this div
372
sbHtml.append("</div>\n");
373
374       sbIdBuffer.delete(iIdBufferBaseLength, sbIdBuffer.length());
375
376       // generate dynamic list body
377
sbHtml.append("<div class=\"clsDynamicListBody\">\n" +
378                     "<div class=\"clsDynamicListAddRow\">" +
379       // TODO: For Julo: We need to have ability to limit the size of this input
380
"<input type=\"text\" id=\"");
381       sbHtml.append(sbIdBuffer);
382       sbHtml.append("dynamiclistinput\" class=\"clsDynamicListInput\">");
383       if (isCheckboxUsed())
384       {
385          sbHtml.append("&nbsp;");
386          if (getChecklabel().length() > 0)
387          {
388             // write label related to the checkbox
389
sbHtml.append(m_strCheckLabel);
390             sbHtml.append(":");
391          }
392          sbHtml.append("<input type=\"checkbox\" id=\"");
393          sbHtml.append(sbIdBuffer);
394          sbHtml.append("dynamiclistcheck\" class=\"clsDynamicListCheck\">");
395       }
396       sbHtml.append("</div>\n" +
397                     "<div class=\"clsDynamicListLabelRow\">");
398       sbHtml.append(m_strListLabel);
399       sbHtml.append(":</div>\n" +
400                     "<div class=\"clsDynamicListListRow\">\n" +
401                     "<select id=\"");
402       sbHtml.append(sbIdBuffer);
403       sbHtml.append("dynamiclistselect\" class=\"clsDynamicListSelect\" size=\"");
404       sbHtml.append(m_strSize);
405       sbHtml.append("\" multiple>\n");
406       
407       TagUtils.write(pageContext, sbHtml.toString());
408       
409       if (isFocusedControl())
410       {
411          // TODO: For Julo: Did you tested that the focus actually works? The
412
// input control has a different id than the one you are setting here
413
// so how it is possible to set the focus to the dynamic list
414

415          // Cache the content since it should be inserted at a row
416
// boundary and not at a field boundary
417
sbHtml.delete(0, sbHtml.length());
418          sbHtml.append(strCurrentId);
419          sbHtml.append(m_strId);
420    
421          cache(TabbedDialogTag.FOCUSED_CONTROL_ID, sbHtml.toString());
422       }
423
424       // Cache the possible answer char identificator that can be
425
// used also in other tags
426
cache(CHECK_INDICATOR_ID, m_strCheckIdentifier);
427
428       return (EVAL_BODY_INCLUDE);
429    }
430
431    /**
432     * {@inheritDoc}
433     */

434    public int doEndTag(
435    ) throws JspException JavaDoc
436    {
437       StringBuffer JavaDoc sbHtml = new StringBuffer JavaDoc();
438       
439       // getCurrentId() is fairly expensive so we call it just once
440
// and then we reuse the results.
441
String JavaDoc strCurrentId = getCurrentId();
442       StringBuffer JavaDoc sbIdBuffer = new StringBuffer JavaDoc(strCurrentId);
443       sbIdBuffer.append(m_strId);
444
445       // Finish the list box, the options were specified in the page
446
sbHtml.append("</select>\n" +
447                     "</div>\n" +
448                     "<input type=\"hidden\" value=\"\" id=\"");
449       sbHtml.append(sbIdBuffer);
450       sbHtml.append("dynamiclistbuffer\" name=\"");
451       sbHtml.append(m_strBufferName);
452       sbHtml.append("\">\n");
453
454       // Generate hidden attribute needed for this control to work
455
// Check identifier character
456
if (isCheckboxUsed())
457       {
458          // generate this value only in case when checkbow is allowed
459
sbHtml.append("<input type=\"hidden\" id=\"");
460          sbHtml.append(sbIdBuffer);
461          sbHtml.append("dynamiclistcheckidentifier\" name=\"CHECK_IDENTIFIER\" value=\"");
462          sbHtml.append(m_strCheckIdentifier);
463          sbHtml.append("\">\n");
464       }
465
466       // Removed ids
467
sbHtml.append("<input type=\"hidden\" value=\"\" id=\"");
468       sbHtml.append(sbIdBuffer);
469       sbHtml.append("dynamiclistremoveids\" name=\"");
470       if ((m_strRemovedName == null) || (m_strRemovedName.length() == 0))
471       {
472          sbHtml.append(strCurrentId);
473          sbHtml.append(m_strId);
474          sbHtml.append("dynamiclistremoveids");
475       }
476       else
477       {
478          sbHtml.append(m_strRemovedName);
479       }
480       sbHtml.append("\">\n");
481
482       // Changed ids
483
sbHtml.append("<input type=\"hidden\" value=\"\" id=\"");
484       sbHtml.append(sbIdBuffer);
485       sbHtml.append("dynamiclistchangedids\" name=\"");
486       if ((m_strChangedName == null) || (m_strChangedName.length() == 0))
487       {
488          sbHtml.append(strCurrentId);
489          sbHtml.append(m_strId);
490          sbHtml.append("dynamiclistchangedids");
491       }
492       else
493       {
494          sbHtml.append(m_strChangedName);
495       }
496       sbHtml.append("\">\n" +
497                     "</div>" +
498                     "</");
499       sbHtml.append(m_strType);
500       sbHtml.append(">");
501       TagUtils.write(pageContext, sbHtml.toString());
502       
503       return (EVAL_PAGE);
504    }
505    
506    /**
507     * @return String - Does this control have focus when it si displayed on the
508     * page or not.
509     */

510    public String JavaDoc getFocus()
511    {
512       return m_strFocus;
513    }
514    
515    /**
516     * @param strFocus - If this control have focus when it si displayed on the
517     * page say true or 1.
518     */

519    public void setFocus(
520       String JavaDoc strFocus
521    )
522    {
523       m_strFocus = strFocus;
524    }
525    
526    /**
527     * @param bFocus - Does this control have focus when it si displayed on the
528     * page or tab.
529     */

530    public void setFocus(
531       boolean bFocus
532    )
533    {
534       m_strFocus = Boolean.toString(bFocus);
535    }
536
537    /**
538     * @return boolean - true if this control has focus when it is displayed
539     * on a page or tab
540     */

541    public boolean isFocusedControl(
542    )
543    {
544       return ((Boolean.TRUE.toString().equalsIgnoreCase(m_strFocus))
545              || ("1".equals(m_strFocus)));
546    }
547
548    /**
549     * @return String - If this control should be disabled then this attribute
550     * should say true or 1.
551     */

552    public String JavaDoc getDisabled(
553    )
554    {
555       return m_strDisabled;
556    }
557
558    /**
559     * @param strDisabled - If this control should be disabled then this attribute
560     * should say true or 1.
561     */

562    public void setDisabled(
563       String JavaDoc strDisabled
564    )
565    {
566       m_strDisabled = strDisabled;
567    }
568    
569    /**
570     * @param bDisabled - If this control should be disabled then this attribute
571     * should say true or 1.
572     */

573    public void setDisabled(
574       boolean bDisabled
575    )
576    {
577       m_strDisabled = Boolean.toString(bDisabled);
578    }
579
580    /**
581     * @return boolean - true if this control should be disabled
582     */

583    public boolean isDisabledControl(
584    )
585    {
586       return ((Boolean.TRUE.toString().equalsIgnoreCase(m_strDisabled))
587              || ("1".equals(m_strDisabled)));
588    }
589
590    /**
591     * @return String - Size of the control
592     */

593    public String JavaDoc getSize(
594    )
595    {
596       return m_strSize;
597    }
598
599    /**
600     * @param strSize - Size of the control
601     */

602    public void setSize(
603       String JavaDoc strSize
604    )
605    {
606       m_strSize = strSize;
607    }
608    
609    /**
610     * @return String - If this control should shown checkbox then this attribute
611     * should say true or 1.
612     */

613    public String JavaDoc getCheck(
614    )
615    {
616       return m_strCheck;
617    }
618
619    /**
620     * @param strCheck - If this control should shown checkbox then this attribute
621     * should say true or 1.
622     */

623    public void setCheck(
624       String JavaDoc strCheck
625    )
626    {
627       m_strCheck = strCheck;
628    }
629    
630    /**
631     * @param bCheck - If this control should shown checkbox then this attribute
632     * should say true or 1.
633     */

634    public void setCheck(
635       boolean bCheck
636    )
637    {
638       m_strCheck = Boolean.toString(bCheck);
639    }
640
641    /**
642     * @return boolean - true if there will be shown checkbox in the 1st rox
643     */

644    public boolean isCheckboxUsed(
645    )
646    {
647       return ((Boolean.TRUE.toString().equalsIgnoreCase(m_strCheck))
648              || ("1".equals(m_strCheck)));
649    }
650    
651    /**
652     * @return String - label related to the checkbox
653     */

654    public String JavaDoc getChecklabel()
655    {
656       return m_strCheckLabel;
657    }
658    
659    /**
660     * @param strCheckLabel - label related to the checkbox
661     */

662    public void setChecklabel(
663       String JavaDoc strCheckLabel
664    )
665    {
666       m_strCheckLabel = strCheckLabel;
667    }
668    
669    /**
670     * @return String - string identifying if the checkbox was checked
671     */

672    public String JavaDoc getCheckidentifier()
673    {
674       return m_strCheckIdentifier;
675    }
676    
677    /**
678     * @param strCheckIdentifier - string identifying if the checkbox was checked
679     * multi select control bellow.
680     */

681    public void setCheckidentifier(
682       String JavaDoc strCheckIdentifier
683    )
684    {
685       m_strCheckIdentifier = strCheckIdentifier;
686    }
687    
688    /**
689     * @return String - label related to the list of added items
690     */

691    public String JavaDoc getListlabel()
692    {
693       return m_strListLabel;
694    }
695    
696    /**
697     * @param strListLabel - label related to the list of added items
698     */

699    public void setListlabel(
700       String JavaDoc strListLabel
701    )
702    {
703       m_strListLabel = strListLabel;
704    }
705    
706    /**
707     * @return String - name of the input hidden parameter that stores data for
708     * submit
709     */

710    public String JavaDoc getBuffername()
711    {
712       return m_strBufferName;
713    }
714    
715    /**
716     * @param strBufferName - name of the input hidden parameter that stores data
717     * to submit to the server
718     */

719    public void setBuffername(
720       String JavaDoc strBufferName
721    )
722    {
723       m_strBufferName = strBufferName;
724    }
725    
726    /**
727     * @return String - name of the input hidden parameter that stores data for
728     * submit
729     */

730    public String JavaDoc getRemovedname()
731    {
732       return m_strRemovedName;
733    }
734    
735    /**
736     * @param strRemovedName - name of the input hidden parameter that stores
737     * data to submit to the server
738     */

739    public void setRemovedname(
740       String JavaDoc strRemovedName
741    )
742    {
743       m_strRemovedName = strRemovedName;
744    }
745    
746    /**
747     * @return String - name of the input hidden parameter that stores data for
748     * submit
749     */

750    public String JavaDoc getChangedname()
751    {
752       return m_strChangedName;
753    }
754    
755    /**
756     * @param strChangedName - name of the input hidden parameter that stores data
757     * to submit to the server
758     */

759    public void setChangedname(
760       String JavaDoc strChangedName
761    )
762    {
763       m_strChangedName = strChangedName;
764    }
765 }
766
Popular Tags