com.wewebu.ow.server.app
Class OwBaseComboboxRenderer

java.lang.Object
  extended by com.wewebu.ow.server.app.OwBaseComboboxRenderer
All Implemented Interfaces:
OwComboboxRenderer
Direct Known Subclasses:
OwClassicComboboxRenderer, OwExtJSComboboxRenderer

public abstract class OwBaseComboboxRenderer
extends Object
implements OwComboboxRenderer

Combo box renderer component.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.0.0.0

Field Summary
protected  boolean enabled
          enabled flag
protected static org.apache.log4j.Logger LOG
          package logger for the class
protected  OwMainAppContext m_context
          the context
protected  OwString m_description
          description
protected  Map m_events
          the event name to event handling map
protected  OwFieldDefinition m_fieldDefinition
          the field definition
protected  String m_fieldId
          the field id
protected  OwFieldProvider m_fieldProvider
          the field provider
protected  boolean m_ignoreDefaultStylesheets
          ignore default style sheets
protected  OwComboModel m_model
          the model
protected  Set m_styleClasses
          list of style sheet classes
 
Constructor Summary
OwBaseComboboxRenderer()
          Default constructor
 
Method Summary
 void addEvent(String eventName_p, String eventHandler_p)
          Add JavaScript code for the given event name
 void addStyleClass(String styleClass_p)
          Add specified style class.
 void addStyleClass(String styleClass_p, boolean ignoreDefaultStyleClasses_p)
          Add specific style class.
 void addStyleClasses(String[] styleClasses_p)
          Add a list of style classes, to be rendered with this component.
 void addStyleClasses(String[] styleClasses_p, boolean ignoreDefaultStyleClasses_p)
          Add a list of style classes, to be rendered with this component.
 String[] getAllEventsNames()
          Get all event names for this combo
protected  OwMainAppContext getContext()
          Get the context.
protected  String getEventHandler(String eventName_p)
          Get the JavaScript code as a string for specified event.
protected  String renderStyleClasses(Set defaultStyleClasses_p)
          Render the style classes
 void setContext(OwMainAppContext context_p)
          Set the context.
 void setEnabled(boolean enabled_p)
          Set the enabled status of this combobox.
 void setFieldDefinition(OwFieldDefinition fieldDefinition_p)
          Set the field definition.
 void setFieldDescription(OwString description_p)
          Set the description of the rendered field.
 void setFieldId(String fieldId_p)
          Set the id of the rendered field.
 void setFieldProvider(OwFieldProvider fieldProvider_p)
          Set the field provider.
 void setModel(OwComboModel model_p)
          Set the combo model items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.wewebu.ow.server.app.OwComboboxRenderer
renderCombo
 

Field Detail

m_context

protected OwMainAppContext m_context
the context


m_model

protected OwComboModel m_model
the model


m_fieldId

protected String m_fieldId
the field id


m_fieldDefinition

protected OwFieldDefinition m_fieldDefinition
the field definition


m_fieldProvider

protected OwFieldProvider m_fieldProvider
the field provider


m_ignoreDefaultStylesheets

protected boolean m_ignoreDefaultStylesheets
ignore default style sheets


enabled

protected boolean enabled
enabled flag


m_description

protected OwString m_description
description


m_events

protected Map m_events
the event name to event handling map


LOG

protected static final org.apache.log4j.Logger LOG
package logger for the class


m_styleClasses

protected Set m_styleClasses
list of style sheet classes

Constructor Detail

OwBaseComboboxRenderer

public OwBaseComboboxRenderer()
Default constructor

Method Detail

setEnabled

public void setEnabled(boolean enabled_p)
Description copied from interface: OwComboboxRenderer
Set the enabled status of this combobox.

Specified by:
setEnabled in interface OwComboboxRenderer

renderStyleClasses

protected String renderStyleClasses(Set defaultStyleClasses_p)
Render the style classes

Parameters:
defaultStyleClasses_p - - classes that will be always rendered.
Returns:
a string with all rendered classes.

getContext

protected OwMainAppContext getContext()
Get the context.

Returns:
- the context.

addStyleClass

public void addStyleClass(String styleClass_p)
Description copied from interface: OwComboboxRenderer
Add specified style class.

Specified by:
addStyleClass in interface OwComboboxRenderer
Parameters:
styleClass_p - - thestyle class.

addStyleClass

public void addStyleClass(String styleClass_p,
                          boolean ignoreDefaultStyleClasses_p)
Description copied from interface: OwComboboxRenderer
Add specific style class. If the parameter ignoreDefaultStyleClasses_p is true the default style classes are not rendered anymore

Specified by:
addStyleClass in interface OwComboboxRenderer
Parameters:
styleClass_p - - the name of the style class
ignoreDefaultStyleClasses_p - - if has true value, the default style classes are not rendered anymore

addStyleClasses

public void addStyleClasses(String[] styleClasses_p)
Description copied from interface: OwComboboxRenderer
Add a list of style classes, to be rendered with this component.

Specified by:
addStyleClasses in interface OwComboboxRenderer
Parameters:
styleClasses_p - - the array of String objects, representing the style classes.

addStyleClasses

public void addStyleClasses(String[] styleClasses_p,
                            boolean ignoreDefaultStyleClasses_p)
Description copied from interface: OwComboboxRenderer
Add a list of style classes, to be rendered with this component.

Specified by:
addStyleClasses in interface OwComboboxRenderer
Parameters:
styleClasses_p - - the array of String objects, representing the style classes.
ignoreDefaultStyleClasses_p - - if has true value, the default style classes are not rendered anymore

addEvent

public void addEvent(String eventName_p,
                     String eventHandler_p)
Description copied from interface: OwComboboxRenderer
Add JavaScript code for the given event name

Specified by:
addEvent in interface OwComboboxRenderer
Parameters:
eventName_p - - the event name
eventHandler_p - - the JavaScript event handler. Please use " for JS string delimiter.

getAllEventsNames

public String[] getAllEventsNames()
Description copied from interface: OwComboboxRenderer
Get all event names for this combo

Specified by:
getAllEventsNames in interface OwComboboxRenderer
Returns:
an array of String objects, representing the event names.

getEventHandler

protected String getEventHandler(String eventName_p)
Get the JavaScript code as a string for specified event.

Parameters:
eventName_p - the event name
Returns:
a String object, representing the JavaScript code associated with this event.

setContext

public void setContext(OwMainAppContext context_p)
Description copied from interface: OwComboboxRenderer
Set the context.

Specified by:
setContext in interface OwComboboxRenderer
Parameters:
context_p - - the OwMainAppContext object.

setModel

public void setModel(OwComboModel model_p)
Description copied from interface: OwComboboxRenderer
Set the combo model items.

Specified by:
setModel in interface OwComboboxRenderer
Parameters:
model_p - - the OwComboModel object.

setFieldDescription

public void setFieldDescription(OwString description_p)
Description copied from interface: OwComboboxRenderer
Set the description of the rendered field.

Specified by:
setFieldDescription in interface OwComboboxRenderer
Parameters:
description_p - - the OwString object representing the description of the rendered combo controls (usually as title HTML attribute values)

setFieldId

public void setFieldId(String fieldId_p)
Description copied from interface: OwComboboxRenderer
Set the id of the rendered field.

Specified by:
setFieldId in interface OwComboboxRenderer
Parameters:
fieldId_p - - the String object representing the ID to be rendered as htmlid value

setFieldDefinition

public void setFieldDefinition(OwFieldDefinition fieldDefinition_p)
Description copied from interface: OwComboboxRenderer
Set the field definition.

Specified by:
setFieldDefinition in interface OwComboboxRenderer
Parameters:
fieldDefinition_p - - the OwFieldDefinition object.

setFieldProvider

public void setFieldProvider(OwFieldProvider fieldProvider_p)
Description copied from interface: OwComboboxRenderer
Set the field provider.

Specified by:
setFieldProvider in interface OwComboboxRenderer
Parameters:
fieldProvider_p - - the OwFieldProvider object.


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.