com.wewebu.ow.server.ecmimpl.owdummy.ui
Class OwDefaultValueFieldControl

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.app.OwFieldManagerControl
          extended by com.wewebu.ow.server.ecmimpl.owdummy.ui.OwDefaultValueFieldControl
Direct Known Subclasses:
OwDummyDoubleDefaultControl

public class OwDefaultValueFieldControl
extends com.wewebu.ow.server.app.OwFieldManagerControl

Default value button wrapper field control base class. It wraps arbitrary field controls with a default value filter button.

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


Field Summary
static String FIELD_ID_KEY
           
 
Constructor Summary
OwDefaultValueFieldControl()
           
 
Method Summary
 void attach(com.wewebu.ow.server.ui.OwAppContext context_p, String strName_p)
           
protected  Object createDefaultValue(com.wewebu.ow.server.field.OwField field_p, String id_p)
           
 void detach()
           
protected  String getDefaultButtonLabel()
          (overridable)
 void init(com.wewebu.ow.server.app.OwFieldManager fieldmanager_p, Node configNode_p)
           
protected  void insertDefaultControl(Writer w_p, String strID_p)
          (overridable) Inserts the default button code.
 void insertEditField(Writer w_p, com.wewebu.ow.server.field.OwFieldDefinition fieldDef_p, com.wewebu.ow.server.field.OwField field_p, String strID_p)
          Wrapps the field using insertHTMLWrapperHead(Writer, String) and insertHTMLWrapperTail(Writer, String) and delegates to the wrapped field in between.
protected  void insertHTMLWrapperHead(Writer w_p, String strID_p)
          Inserts HTML wrapping conde before the wrapped field control.
protected  void insertHTMLWrapperTail(Writer w_p, String strID_p)
          (overridable) Inserts HTML wrapping conde after the wrapped field control.
 void insertReadOnlyField(Writer w_p, com.wewebu.ow.server.field.OwFieldDefinition fieldDef_p, Object value_p)
           
 void onSetDefaultValue(javax.servlet.http.HttpServletRequest request_p)
          Default value seting event hadler.
 Object updateField(javax.servlet.http.HttpServletRequest request_p, com.wewebu.ow.server.field.OwFieldDefinition fieldDef_p, Object value_p, String strID_p)
           
 
Methods inherited from class com.wewebu.ow.server.app.OwFieldManagerControl
getFieldManager, getFormEventFunction, getFormEventURL, getFormTarget, init, insertLabel
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormName, getID, onExternalRequest, onFormEvent, onRequest, setExternalFormTarget, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_ID_KEY

public static final String FIELD_ID_KEY
See Also:
Constant Field Values
Constructor Detail

OwDefaultValueFieldControl

public OwDefaultValueFieldControl()
Method Detail

insertEditField

public void insertEditField(Writer w_p,
                            com.wewebu.ow.server.field.OwFieldDefinition fieldDef_p,
                            com.wewebu.ow.server.field.OwField field_p,
                            String strID_p)
                     throws Exception
Wrapps the field using insertHTMLWrapperHead(Writer, String) and insertHTMLWrapperTail(Writer, String) and delegates to the wrapped field in between.

Specified by:
insertEditField in class com.wewebu.ow.server.app.OwFieldManagerControl
Parameters:
w_p -
fieldDef_p -
field_p -
strID_p -
Throws:
Exception

insertHTMLWrapperHead

protected void insertHTMLWrapperHead(Writer w_p,
                                     String strID_p)
                              throws Exception
Inserts HTML wrapping conde before the wrapped field control.

Parameters:
w_p -
strID_p -
Throws:
Exception

insertHTMLWrapperTail

protected void insertHTMLWrapperTail(Writer w_p,
                                     String strID_p)
                              throws Exception
(overridable) Inserts HTML wrapping conde after the wrapped field control.

Parameters:
w_p -
strID_p -
Throws:
Exception

getDefaultButtonLabel

protected String getDefaultButtonLabel()
(overridable)

Returns:
the default button label.
The default implementation returns the value of the localize label obtained by concatenating "default.button." with the name of this concrete class.

insertDefaultControl

protected void insertDefaultControl(Writer w_p,
                                    String strID_p)
                             throws Exception
(overridable) Inserts the default button code.

Parameters:
w_p -
strID_p -
Throws:
Exception

onSetDefaultValue

public void onSetDefaultValue(javax.servlet.http.HttpServletRequest request_p)
                       throws Exception
Default value seting event hadler.

Parameters:
request_p -
Throws:
Exception

createDefaultValue

protected Object createDefaultValue(com.wewebu.ow.server.field.OwField field_p,
                                    String id_p)
                             throws Exception
Parameters:
field_p -
id_p -
Returns:
the default value that will be set it the wrapped control's field
Throws:
Exception

insertReadOnlyField

public void insertReadOnlyField(Writer w_p,
                                com.wewebu.ow.server.field.OwFieldDefinition fieldDef_p,
                                Object value_p)
                         throws Exception
Specified by:
insertReadOnlyField in class com.wewebu.ow.server.app.OwFieldManagerControl
Throws:
Exception

updateField

public Object updateField(javax.servlet.http.HttpServletRequest request_p,
                          com.wewebu.ow.server.field.OwFieldDefinition fieldDef_p,
                          Object value_p,
                          String strID_p)
                   throws Exception
Specified by:
updateField in class com.wewebu.ow.server.app.OwFieldManagerControl
Throws:
Exception

init

public void init(com.wewebu.ow.server.app.OwFieldManager fieldmanager_p,
                 Node configNode_p)
          throws Exception
Overrides:
init in class com.wewebu.ow.server.app.OwFieldManagerControl
Throws:
Exception

attach

public void attach(com.wewebu.ow.server.ui.OwAppContext context_p,
                   String strName_p)
            throws Exception
Overrides:
attach in class com.wewebu.ow.server.ui.OwEventTarget
Throws:
Exception

detach

public void detach()
Overrides:
detach in class com.wewebu.ow.server.ui.OwEventTarget


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.