001: /*
002: * ====================================================================
003: * JAFFA - Java Application Framework For All
004: *
005: * Copyright (C) 2002 JAFFA Development Group
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or (at your option) any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: *
021: * Redistribution and use of this software and associated documentation ("Software"),
022: * with or without modification, are permitted provided that the following conditions are met:
023: * 1. Redistributions of source code must retain copyright statements and notices.
024: * Redistributions must also contain a copy of this document.
025: * 2. Redistributions in binary form must reproduce the above copyright notice,
026: * this list of conditions and the following disclaimer in the documentation
027: * and/or other materials provided with the distribution.
028: * 3. The name "JAFFA" must not be used to endorse or promote products derived from
029: * this Software without prior written permission. For written permission,
030: * please contact mail to: jaffagroup@yahoo.com.
031: * 4. Products derived from this Software may not be called "JAFFA" nor may "JAFFA"
032: * appear in their names without prior written permission.
033: * 5. Due credit should be given to the JAFFA Project (http://jaffa.sourceforge.net).
034: *
035: * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
036: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
037: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
038: * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
039: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
040: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
041: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
042: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
043: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
044: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
045: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
046: * SUCH DAMAGE.
047: * ====================================================================
048: */
049:
050: package org.jaffa.presentation.portlet.widgets.tests;
051:
052: import org.jaffa.presentation.portlet.FormBase;
053: import org.jaffa.presentation.portlet.widgets.model.EditBoxModel;
054: import org.jaffa.presentation.portlet.widgets.controller.EditBoxController;
055:
056: /**
057: *
058: * @author GautamJ
059: * @version
060: */
061: public class LookupClientForm extends FormBase {
062: public static final String NAME = "lookupClientForm";
063:
064: private String m_field1 = null;
065: private EditBoxModel w_field1 = null;
066: private String m_field2 = null;
067: private EditBoxModel w_field2 = null;
068: private String m_field3 = null;
069: private EditBoxModel w_field3 = null;
070: private String m_field4 = null;
071: private EditBoxModel w_field4 = null;
072:
073: public String getField1() {
074: return m_field1;
075: }
076:
077: public void setField1(String field1) {
078: m_field1 = field1;
079: }
080:
081: public EditBoxModel getField1WM() {
082: if (w_field1 == null) {
083: w_field1 = (EditBoxModel) getWidgetCache().getModel(
084: "field1");
085: if (w_field1 == null) {
086: if (getField1() != null)
087: w_field1 = new EditBoxModel(getField1());
088: else
089: w_field1 = new EditBoxModel();
090: getWidgetCache().addModel("field1", w_field1);
091: }
092: }
093: return w_field1;
094: }
095:
096: public void setField1WV(String value) {
097: EditBoxController.updateModel(value, getField1WM());
098: }
099:
100: public String getField2() {
101: return m_field2;
102: }
103:
104: public void setField2(String field2) {
105: m_field2 = field2;
106: }
107:
108: public EditBoxModel getField2WM() {
109: if (w_field2 == null) {
110: w_field2 = (EditBoxModel) getWidgetCache().getModel(
111: "field2");
112: if (w_field2 == null) {
113: if (getField2() != null)
114: w_field2 = new EditBoxModel(getField2());
115: else
116: w_field2 = new EditBoxModel();
117: getWidgetCache().addModel("field2", w_field2);
118: }
119: }
120: return w_field2;
121: }
122:
123: public void setField2WV(String value) {
124: EditBoxController.updateModel(value, getField2WM());
125: }
126:
127: public String getField3() {
128: return m_field3;
129: }
130:
131: public void setField3(String field3) {
132: m_field3 = field3;
133: }
134:
135: public EditBoxModel getField3WM() {
136: if (w_field3 == null) {
137: w_field3 = (EditBoxModel) getWidgetCache().getModel(
138: "field3");
139: if (w_field3 == null) {
140: if (getField3() != null)
141: w_field3 = new EditBoxModel(getField3());
142: else
143: w_field3 = new EditBoxModel();
144: getWidgetCache().addModel("field3", w_field3);
145: }
146: }
147: return w_field3;
148: }
149:
150: public void setField3WV(String value) {
151: EditBoxController.updateModel(value, getField3WM());
152: }
153:
154: public String getField4() {
155: return m_field4;
156: }
157:
158: public void setField4(String field4) {
159: m_field4 = field4;
160: }
161:
162: public EditBoxModel getField4WM() {
163: if (w_field4 == null) {
164: w_field4 = (EditBoxModel) getWidgetCache().getModel(
165: "field4");
166: if (w_field4 == null) {
167: if (getField4() != null)
168: w_field4 = new EditBoxModel(getField4());
169: else
170: w_field4 = new EditBoxModel();
171: getWidgetCache().addModel("field4", w_field4);
172: }
173: }
174: return w_field4;
175: }
176:
177: public void setField4WV(String value) {
178: EditBoxController.updateModel(value, getField4WM());
179: }
180:
181: }
|