001 // Copyright (c) 2001 Hursh Jain (http://www.mollypages.org)
002 // The Molly framework is freely distributable under the terms of an
003 // MIT-style license. For details, see the molly pages web site at:
004 // http://www.mollypages.org/. Use, modify, have fun !
005
006 package fc.web.forms;
007
008 import java.io.*;
009 import javax.servlet.*;
010 import javax.servlet.http.*;
011
012 /**
013 A dependent field.
014
015 @author hursh jain
016 **/
017 public abstract class DependentField extends Field
018 {
019 Dependency dependency;
020
021 public DependentField(String name) {
022 super(name);
023 }
024
025 /**
026 This method should be invoked by all {@link Dependency} implementations
027 in the implementations constructor.
028 */
029 public void addDependency(Dependency d)
030 {
031 this.dependency = d;
032 }
033
034 }