/*
* created on 2004-7-21 by jem.lee * * transformdata is a part of cn.bs.common.transdata * all rights reserved. * copyright (c) 2004. jem.lee */ /* 包路径cn.bs.common.transdata*/ package cn.bs.common.transdata; /*import包内容*/ import java.util.hashmap; import java.util.iterator; /** * <pre> * history * 2004-7-21 21:02:57 created by jem.lee * * 目的 * 作为视图与控制器之间进行数据传递的主要对象, * 它包涵一般的元素对象与table对象 * </pre> */ public class transformdata implements cloneable{ /* * 存放单个元素的hash表 */ private hashmap trselements = new hashmap(); /* * 存放table元素的的hash表 */ private hashmap trstables = new hashmap(); /** * <pre> * 从formdata获得指定元素名称的值 * @param name 元素名称 * @return 元素对应的值 * @throws exception * </pre> */ public string getfieldvalue(string name) throws exception { return(this.getfieldfromname(name).getvalue()); } /** * <pre> * 从formdata获得指定元素域名称 * @param name 元素名称 * @return 元素对应的域 * @throws exception * </pre> */ public transformfield getfieldfromname(string name) throws exception { if (name == null) { throw (new nullpointerexception("输入的域名为空或是null")); } transformfield ret = (transformfield) trselements.get(name); if (ret == null) {... 下一页