KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > formview > util > ApplicationFormViewUtil


1 package net.sourceforge.formview.util;
2
3 import net.sourceforge.formview.FormView;
4 import net.sourceforge.formview.FormViewResources;
5 import net.sourceforge.formview.permission.IPermissionsAdapter;
6
7 public class ApplicationFormViewUtil {
8
9     private static FormViewResources resources = null;
10     
11     public static void init(FormViewResources r) {
12         resources = r;
13     }
14     
15     protected static FormViewResources getFormViewResources() {
16         if (resources == null) {
17             throw new IllegalArgumentException JavaDoc("Resources cannot be null.");
18         }
19         return resources;
20     }
21
22     public static FormView getFormView(String JavaDoc formName, String JavaDoc state) {
23         return getFormViewResources().getForm(formName, state);
24     }
25     
26     public static String JavaDoc processHtmlContent(FormView form, String JavaDoc state, IPermissionsAdapter permissionsAdapter, String JavaDoc htmlContent) {
27         return getFormViewResources().processHtmlContent(form, state, permissionsAdapter, htmlContent);
28     }
29 }
30
Popular Tags