public class ListRenderAdapter extends ScriptableCustomItemComponentRenderAdapter
CustomItemComponentRenderAdapter.getModelTransformer() , before its passed back to the calling API.CustomItemComponentRenderAdapter.ContextualTwoWayTransformerauthorizationModule, modelTransformer| Constructor and Description |
|---|
ListRenderAdapter() |
ListRenderAdapter(ListRenderAdapter t) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.wicket.Component |
getComponent(String componentId,
MetaItem metaItem,
org.apache.wicket.model.IModel model,
Object modelObject,
User user)
Some fields/attribute may require display of options
for selection or Auto-Suggest etc..
|
org.apache.commons.collections.Transformer |
getDataTransformer()
The actual Model for List rendering and the model for the data field may not be the same.
|
protected String |
getInstanceId(MetaItem metaItem,
Object modelObject)
Javascript code needs to target its component so each instance will need an instanceId.
|
protected org.apache.wicket.model.IModel |
getRawDataModel(org.apache.wicket.model.IModel model)
The actual Model for List rendering and the model for the data field may not be the same.
|
boolean |
isBindModelToRawData()
The model to the component is what is provided as an Object to the whole component.
|
protected void |
markComponentReadOnly(org.apache.wicket.Component c) |
void |
setBindModelToRawData(boolean bindModelToRawData)
The model to the component is what is provided as an Object to the whole component.
|
void |
setDataTransformer(org.apache.commons.collections.Transformer dataTransformer)
The actual Model for List rendering and the model for the data field may not be the same.
|
attachScript, getScriptComponentId, getScriptTransformer, setScriptComponentId, setScriptTransformerfilter, getDataList, getLookup, getModelTransformer, processSubmit, setModelTransformer, translateCurrentSelectionModelpublic ListRenderAdapter()
public ListRenderAdapter(ListRenderAdapter t)
protected void markComponentReadOnly(org.apache.wicket.Component c)
markComponentReadOnly in class CustomItemComponentRenderAdapterprotected String getInstanceId(MetaItem metaItem, Object modelObject)
ScriptableCustomItemComponentRenderAdaptergetInstanceId in class ScriptableCustomItemComponentRenderAdapterprotected org.apache.wicket.model.IModel getRawDataModel(org.apache.wicket.model.IModel model)
CustomItemComponentRenderAdapter.translateCurrentSelectionModel(IModel, Object, MetaItem). However, the raw data supplied in the
data field may require additional transformation to String.model - as IModel from the componentdataTransformer,
bindModelToRawDatapublic org.apache.wicket.Component getComponent(String componentId, MetaItem metaItem, org.apache.wicket.model.IModel model, Object modelObject, User user)
HiddenField
A List representation of the Model with a Script (if any)getComponent in class ScriptableCustomItemComponentRenderAdaptercomponentId - as Sting id for the ComponentmetaItem - as MetaItem meta data for rendering logicmodel - is the current data defined in a IModel for the MetaItem.
The resultant model in the returned Component may NOT be same as the one passed to the inner component, hence always use the derived one.
This is because there maybe a mismatch in the form of core/raw data and one required for final presentation.
For example the input maybe a Comma Separated list of Strings, however for presentation in a List box we may convert the Model to a ListModel.modelObject - as Object, that represents the main Entity (overall context)user - as com.neurosys.security.auth.domain.User for any Authorization related needs @nullable trueScriptableCustomItemComponentRenderAdapterpublic org.apache.commons.collections.Transformer getDataTransformer()
CustomItemComponentRenderAdapter.translateCurrentSelectionModel(IModel, Object, MetaItem). However, the raw data supplied in the
data field may require additional transformation to String.getRawDataModel(IModel)public void setDataTransformer(org.apache.commons.collections.Transformer dataTransformer)
CustomItemComponentRenderAdapter.translateCurrentSelectionModel(IModel, Object, MetaItem). However, the raw data supplied in the
data field may require additional transformation to String.getRawDataModel(IModel)public boolean isBindModelToRawData()
dataTransformer,
getRawDataModel(IModel)public void setBindModelToRawData(boolean bindModelToRawData)
dataTransformer,
getRawDataModel(IModel)Copyright © 2018. All rights reserved.