01: //package statement
02: package com.salmonllc.examples.example19;
03:
04: //The Salmon Open Framework for Internet Applications (SOFIA)
05: //Copyright (C) 1999 - 2002, Salmon LLC
06: //
07: //This program is free software; you can redistribute it and/or
08: //modify it under the terms of the GNU General Public License version 2
09: //as published by the Free Software Foundation;
10: //
11: //This program is distributed in the hope that it will be useful,
12: //but WITHOUT ANY WARRANTY; without even the implied warranty of
13: //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: //GNU General Public License for more details.
15: //
16: //You should have received a copy of the GNU General Public License
17: //along with this program; if not, write to the Free Software
18: //Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: //
20: //For more information please visit http://www.salmonllc.com
21:
22: //Salmon import statements
23: import com.salmonllc.jsp.*;
24: import com.salmonllc.sql.DataStoreException;
25:
26: /**
27: * LookupController: All this controller does is add some blank rows to the datasource so the datatable will have some rows in it.
28: */
29: public class LookupController extends JspController {
30:
31: //DataSources
32: public com.salmonllc.sql.DataStore _datasource1;
33: public com.salmonllc.sql.DataStore _datasource2;
34:
35: public com.salmonllc.html.HtmlLookUpComponent _dataTableLookup4;
36: public com.salmonllc.html.HtmlLookUpComponent _lookup4;
37:
38: /**
39: * Initialize the page. Add some rows to the datasources in the page.
40: */
41: public void initialize() throws DataStoreException {
42: _datasource1.insertRow();
43: _datasource1.gotoFirst();
44:
45: _datasource2.insertRow();
46: _datasource2.insertRow();
47:
48: _lookup4.getEditField().setStyle("text-align:right");
49: _dataTableLookup4.getEditField().setStyle("text-align:right");
50: }
51:
52: }
|