com.googlecode.fascinator.portal.guitoolkit
Class GUIFormRenderer

java.lang.Object
  extended by com.googlecode.fascinator.portal.guitoolkit.GUIFormRenderer

public class GUIFormRenderer
extends Object

Render web form elements based on descriptive metadata.

Author:
Greg Pendlebury

Constructor Summary
GUIFormRenderer(JsonSimpleConfig config)
          Constructor.
 
Method Summary
 String ajaxFluidErrorHolder(String prefix)
          Render an error message text container.
 String ajaxFluidLoader(String prefix)
          Render a circular loading animation.
 String ajaxProgressLoader(String prefix)
          Render a horizontal progress loading animation.
 String renderFormElement(String name, String type, String label)
          Render a simple form 'input' element with optional 'label'.
 String renderFormElement(String name, String type, String label, String value)
          Render a simple form 'input' element with optional 'label' and a starting value.
 String renderFormSelect(String name, String label, Map<String,String> values)
          Render a 'select' drop-down element with optional 'label'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUIFormRenderer

public GUIFormRenderer(JsonSimpleConfig config)
Constructor. Access to system configuration is required

Parameters:
config - : System configuration
Method Detail

ajaxFluidErrorHolder

public String ajaxFluidErrorHolder(String prefix)
Render an error message text container.

Parameters:
prefix - : A String to prepend to element IDs
Returns:
String : The html for the element

ajaxFluidLoader

public String ajaxFluidLoader(String prefix)
Render a circular loading animation.

Parameters:
prefix - : A String to prepend to element IDs
Returns:
String : The html for the element

ajaxProgressLoader

public String ajaxProgressLoader(String prefix)
Render a horizontal progress loading animation.

Parameters:
prefix - : A String to prepend to element IDs
Returns:
String : The html for the element

renderFormElement

public String renderFormElement(String name,
                                String type,
                                String label)
Render a simple form 'input' element with optional 'label'.

Parameters:
name - : Value of the 'name' attribute
type - : Value of the 'type' attribute
label - : Label text
Returns:
String : The html for the element

renderFormElement

public String renderFormElement(String name,
                                String type,
                                String label,
                                String value)
Render a simple form 'input' element with optional 'label' and a starting value.

Parameters:
name - : Value of the 'name' attribute
type - : Value of the 'type' attribute
label - : Label text
value - : The starting text for the element value
Returns:
String : The html for the element

renderFormSelect

public String renderFormSelect(String name,
                               String label,
                               Map<String,String> values)
Render a 'select' drop-down element with optional 'label'.

Parameters:
name - : Value of the 'name' attribute
label - : Label text
values - : A Map of values of label for the drop-down.
Returns:
String : The html for the element


Copyright © 2009-2014. All Rights Reserved.