org.kuali.student.common.ui.client.configurable.mvc
Class DefaultWidgetFactory

java.lang.Object
  extended by org.kuali.student.common.ui.client.configurable.mvc.DefaultWidgetFactory
Direct Known Subclasses:
DefaultWidgetFactoryImpl

public abstract class DefaultWidgetFactory
extends Object

Returns a corresponding auto generated widget based on metadata. Not all fields can have their widgets reliably generated (or it may be better to not use the default), in these cases pass the custom widget into FieldDescriptor directly.
Things within the metadata taken into account: access = meta.getWriteAccess();
isMultiLine - uses text area for multiline
isRepeating - if this is true and the metadata has lookupdata generates a picker that can be used to produce a list
isRichText = MetadataInterrogator.hasConstraint(meta, ConstraintIds.RICH_TEXT);
maxLength - affects how long a text field will be
type - affects why kind of widget is generated
lookupMeta - generates a widget that is backed by a search and based on attributes in its lookupMeta
additionalLookups - additional lookups for the generated widget
canEdit
canUnmask
canView
Note that this class can use gwt deferred binding to have its DefaultWidgetFactory implementation overridden with a custom one, though the result is high impact for as most fields rely on this class. Default widget abstract class - see DefaultWidgetFactoryImpl for implementation.

Author:
Kuali Student Team

Constructor Summary
DefaultWidgetFactory()
           
 
Method Summary
static DefaultWidgetFactory getInstance()
           
abstract  com.google.gwt.user.client.ui.Widget getReadOnlyWidget(Metadata meta)
          Gets the read only widget by auto generating based on the metadata passed in
abstract  com.google.gwt.user.client.ui.Widget getWidget(FieldDescriptor field)
          Gets the input widget by auto generating based on the metadata within the FieldDescriptor passed in
abstract  com.google.gwt.user.client.ui.Widget getWidget(LookupParamMetadata meta)
          Generates a widget based on the LookupParamMetadata passed in
abstract  com.google.gwt.user.client.ui.Widget getWidget(Metadata meta)
          Gets the input widget by auto generating based on the metadata passed in
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWidgetFactory

public DefaultWidgetFactory()
Method Detail

getInstance

public static DefaultWidgetFactory getInstance()

getWidget

public abstract com.google.gwt.user.client.ui.Widget getWidget(FieldDescriptor field)
Gets the input widget by auto generating based on the metadata within the FieldDescriptor passed in

Parameters:
meta -
Returns:

getWidget

public abstract com.google.gwt.user.client.ui.Widget getWidget(Metadata meta)
Gets the input widget by auto generating based on the metadata passed in

Parameters:
meta -
Returns:

getReadOnlyWidget

public abstract com.google.gwt.user.client.ui.Widget getReadOnlyWidget(Metadata meta)
Gets the read only widget by auto generating based on the metadata passed in

Parameters:
meta -
Returns:

getWidget

public abstract com.google.gwt.user.client.ui.Widget getWidget(LookupParamMetadata meta)
Generates a widget based on the LookupParamMetadata passed in

Parameters:
meta -
Returns:


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.