String visibility = (String)fld.get("visibility"); if (visibility != null && visibility.length() > 0 ) { String required = (String)fld.get("required"); if (required != null && required.length() > 0) { String errString = "Field '" + (String)fld.get("label") + "' is required but invisible"; throw new ServletException(errString); } }
    private void checkValues()		throws ServletException    {    	// Step through every field of every page of every form    	Iterator ki = formDefns.keySet().iterator();    	while (ki.hasNext())    	{    		String idName = (String)ki.next();    		Vector pages = (Vector)formDefns.get(idName);    		for (int i = 0; i < pages.size(); i++)    		{    			Vector page = (Vector)pages.get(i);    			for (int j = 0; j < page.size(); j++)    			{    				HashMap fld = (HashMap)page.get(j);    				String type = (String)fld.get("input-type");    				if (type.equals("dropdown") || type.equals("qualdrop_value"))    				{    					String pairsName = (String)fld.get(PAIR_TYPE_NAME);    					Vector v = (Vector)valuePairs.get(pairsName);    					if (v == null)    					{    						String errString = "Cannot find value pairs for " + pairsName;    						throw new ServletException(errString);    					}    				}    			}    		}    	}    }