org.broadleafcommerce.openadmin.client.presenter.entity
Class SubPresenter

java.lang.Object
  extended by org.broadleafcommerce.openadmin.client.presenter.entity.DynamicFormPresenter
      extended by org.broadleafcommerce.openadmin.client.presenter.entity.SubPresenter
All Implemented Interfaces:
SubPresentable

public class SubPresenter
extends DynamicFormPresenter
implements SubPresentable

Author:
jfischer

Field Summary
protected  AbstractDynamicDataSource abstractDynamicDataSource
           
protected  com.smartgwt.client.data.Record associatedRecord
           
protected  String[] availableToTypes
           
protected  Boolean canEdit
           
protected  Boolean disabled
           
protected  SubItemDisplay display
           
protected  String prefix
           
protected  Boolean readOnly
           
protected  com.google.gwt.event.shared.HandlerRegistration removeButtonHandlerRegistration
           
protected  com.google.gwt.event.shared.HandlerRegistration selectionChangedHandlerRegistration
           
protected  Boolean showDisabledState
           
protected  Boolean showId
           
 
Fields inherited from class org.broadleafcommerce.openadmin.client.presenter.entity.DynamicFormPresenter
itemChangedHandlerRegistration, refreshButtonHandlerRegistration, saveButtonHandlerRegistration
 
Constructor Summary
SubPresenter(String prefix, SubItemDisplay display)
          Create a new instance.
SubPresenter(String prefix, SubItemDisplay display, Boolean showDisabledState, Boolean canEdit, Boolean showId)
          Create a new instance.
SubPresenter(String prefix, SubItemDisplay display, String[] availableToTypes)
          Create a new instance.
SubPresenter(String prefix, SubItemDisplay display, String[] availableToTypes, Boolean showDisabledState, Boolean canEdit, Boolean showId)
          Create a new instance.
SubPresenter(SubItemDisplay display)
          Deprecated. use the constructor that specifies the prefix value
SubPresenter(SubItemDisplay display, Boolean showDisabledState, Boolean canEdit, Boolean showId)
          Deprecated. use the constructor that specifies the prefix value
SubPresenter(SubItemDisplay display, String[] availableToTypes)
          Deprecated. use the constructor that specifies the prefix value
SubPresenter(SubItemDisplay display, String[] availableToTypes, Boolean showDisabledState, Boolean canEdit, Boolean showId)
          Deprecated. use the constructor that specifies the prefix value
 
Method Summary
 void bind()
           
 void disable()
           
 void enable()
           
 com.smartgwt.client.widgets.Canvas getDisplay()
           
 String getRelationshipValue(com.smartgwt.client.data.Record associatedRecord, AbstractDynamicDataSource abstractDynamicDataSource)
           
 com.google.gwt.event.shared.HandlerRegistration getRemoveButtonHandlerRegistration()
           
 com.google.gwt.event.shared.HandlerRegistration getSelectionChangedHandlerRegistration()
           
 boolean load(com.smartgwt.client.data.Record associatedRecord, AbstractDynamicDataSource associatedDataSource)
           
 boolean load(com.smartgwt.client.data.Record associatedRecord, AbstractDynamicDataSource abstractDynamicDataSource, com.smartgwt.client.data.DSCallback cb)
           
 void setDataSource(ListGridDataSource dataSource, String[] gridFields, Boolean[] editable)
           
 void setReadOnly(Boolean readOnly)
           
 void setStartState()
           
protected  void updatePresenterReadOnlyStatus()
           
 
Methods inherited from class org.broadleafcommerce.openadmin.client.presenter.entity.DynamicFormPresenter
enableSaveButton, getItemChangedHandlerRegistration, getRefreshButtonHandlerRegistration, getSaveButtonHandlerRegistration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

display

protected SubItemDisplay display

selectionChangedHandlerRegistration

protected com.google.gwt.event.shared.HandlerRegistration selectionChangedHandlerRegistration

removeButtonHandlerRegistration

protected com.google.gwt.event.shared.HandlerRegistration removeButtonHandlerRegistration

associatedRecord

protected com.smartgwt.client.data.Record associatedRecord

abstractDynamicDataSource

protected AbstractDynamicDataSource abstractDynamicDataSource

disabled

protected Boolean disabled

readOnly

protected Boolean readOnly

prefix

protected String prefix

showDisabledState

protected Boolean showDisabledState

canEdit

protected Boolean canEdit

showId

protected Boolean showId

availableToTypes

protected String[] availableToTypes
Constructor Detail

SubPresenter

@Deprecated
public SubPresenter(SubItemDisplay display)
Deprecated. use the constructor that specifies the prefix value

Create a new instance.

Parameters:
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.

SubPresenter

@Deprecated
public SubPresenter(SubItemDisplay display,
                               String[] availableToTypes)
Deprecated. use the constructor that specifies the prefix value

Create a new instance.

Parameters:
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.
availableToTypes - Comma delimited list of polymorphic types that have access to this property.

SubPresenter

@Deprecated
public SubPresenter(SubItemDisplay display,
                               Boolean showDisabledState,
                               Boolean canEdit,
                               Boolean showId)
Deprecated. use the constructor that specifies the prefix value

Create a new instance.

Parameters:
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.
showDisabledState - Whether or not to dim the item when it is disabled.
canEdit - Whether or not the SubPresenter instance can be edited.
showId - Whether or not to show the id for a SubPresenter selected records in its form

SubPresenter

@Deprecated
public SubPresenter(SubItemDisplay display,
                               String[] availableToTypes,
                               Boolean showDisabledState,
                               Boolean canEdit,
                               Boolean showId)
Deprecated. use the constructor that specifies the prefix value

Create a new instance.

Parameters:
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.
availableToTypes - Comma delimited list of polymorphic types that have access to this property.
showDisabledState - Whether or not to dim the item when it is disabled.
canEdit - Whether or not the SubPresenter instance can be edited.
showId - Whether or not to show the id for a SubPresenter selected records in its form

SubPresenter

public SubPresenter(String prefix,
                    SubItemDisplay display)
Create a new instance.

Parameters:
prefix - The list of "." delimited properties from the parent record that lead to this property. For example, if this SubPresenter referenced a property on Sku and the owning record was a Product, the prefix would likely be defaultSku. Can be null or an empty String for properties directly on the parent record.
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.

SubPresenter

public SubPresenter(String prefix,
                    SubItemDisplay display,
                    String[] availableToTypes)
Create a new instance.

Parameters:
prefix - The list of "." delimited properties from the parent record that lead to this property. For example, if this SubPresenter referenced a property on Sku and the owning record was a Product, the prefix would likely be defaultSku. Can be null or an empty String for properties directly on the parent record.
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.
availableToTypes - Comma delimited list of polymorphic types that have access to this property.

SubPresenter

public SubPresenter(String prefix,
                    SubItemDisplay display,
                    Boolean showDisabledState,
                    Boolean canEdit,
                    Boolean showId)
Create a new instance.

Parameters:
prefix - The list of "." delimited properties from the parent record that lead to this property. For example, if this SubPresenter referenced a property on Sku and the owning record was a Product, the prefix would likely be defaultSku. Can be null or an empty String for properties directly on the parent record.
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.
showDisabledState - Whether or not to dim the item when it is disabled.
canEdit - Whether or not the SubPresenter instance can be edited.
showId - Whether or not to show the id for a SubPresenter selected records in its form

SubPresenter

public SubPresenter(String prefix,
                    SubItemDisplay display,
                    String[] availableToTypes,
                    Boolean showDisabledState,
                    Boolean canEdit,
                    Boolean showId)
Create a new instance.

Parameters:
prefix - The list of "." delimited properties from the parent record that lead to this property. For example, if this SubPresenter referenced a property on Sku and the owning record was a Product, the prefix would likely be defaultSku. Can be null or an empty String for properties directly on the parent record.
display - The display component that visually represents this SubPresenter. Usually an instance of SubItemView.
availableToTypes - Comma delimited list of polymorphic types that have access to this property.
showDisabledState - Whether or not to dim the item when it is disabled.
canEdit - Whether or not the SubPresenter instance can be edited.
showId - Whether or not to show the id for a SubPresenter selected records in its form
Method Detail

getDisplay

public com.smartgwt.client.widgets.Canvas getDisplay()
Specified by:
getDisplay in interface SubPresentable

setDataSource

public void setDataSource(ListGridDataSource dataSource,
                          String[] gridFields,
                          Boolean[] editable)
Specified by:
setDataSource in interface SubPresentable

setStartState

public void setStartState()
Specified by:
setStartState in interface SubPresentable
Overrides:
setStartState in class DynamicFormPresenter

enable

public void enable()
Specified by:
enable in interface SubPresentable
Overrides:
enable in class DynamicFormPresenter

disable

public void disable()
Specified by:
disable in interface SubPresentable
Overrides:
disable in class DynamicFormPresenter

setReadOnly

public void setReadOnly(Boolean readOnly)
Specified by:
setReadOnly in interface SubPresentable

updatePresenterReadOnlyStatus

protected void updatePresenterReadOnlyStatus()

load

public boolean load(com.smartgwt.client.data.Record associatedRecord,
                    AbstractDynamicDataSource associatedDataSource)
Specified by:
load in interface SubPresentable

load

public boolean load(com.smartgwt.client.data.Record associatedRecord,
                    AbstractDynamicDataSource abstractDynamicDataSource,
                    com.smartgwt.client.data.DSCallback cb)
Specified by:
load in interface SubPresentable

getRelationshipValue

public String getRelationshipValue(com.smartgwt.client.data.Record associatedRecord,
                                   AbstractDynamicDataSource abstractDynamicDataSource)

bind

public void bind()
Specified by:
bind in interface SubPresentable
Overrides:
bind in class DynamicFormPresenter

getSelectionChangedHandlerRegistration

public com.google.gwt.event.shared.HandlerRegistration getSelectionChangedHandlerRegistration()

getRemoveButtonHandlerRegistration

public com.google.gwt.event.shared.HandlerRegistration getRemoveButtonHandlerRegistration()


Copyright © 2013. All Rights Reserved.