View Javadoc

1   package pl.caltha.forms;
2   
3   import org.objectledge.templating.MergingException;
4   import org.objectledge.templating.TemplateNotFoundException;
5   import org.objectledge.web.mvc.tools.LinkTool;
6   
7   
8   /*** This a Context tool used to generate Form interfaces.
9    *
10   * @author <a href="mailto:zwierzem@ngo.pl">Damian Gajda</a>
11   * @version $Id: FormTool.java,v 1.3 2005/02/08 20:33:22 rafal Exp $
12   */
13  public interface FormTool
14  {
15      /*** Generates form UI.
16       * @param instance form User data which is used to generate the UI.
17       * @param formLink the linkTool to use.
18       * @param skinName name of a FormTool velocity template to use.
19       * @throws MergingException Thrown on any problems when generating UI.
20       * @return generated UI markup.
21       */
22      public String generateUI(Instance instance, LinkTool formLink, String skinName)
23      throws MergingException, TemplateNotFoundException;
24  
25      /*** Generates form UI, uses default Form look.
26       * @param instance form User data which is used to generate the UI.
27       * @param formLink the linkTool to use.
28       * stored in <code>action</code> attribute of the form.
29       * @throws MergingException Thrown on any problems when generating UI.
30       * @return generated UI markup.
31       */
32      public String generateUI(Instance instance, LinkTool formLink)
33      throws MergingException, TemplateNotFoundException;
34  }