本文整理匯總了Java中org.apache.wicket.markup.html.form.DropDownChoice.setOutputMarkupId方法的典型用法代碼示例。如果您正苦於以下問題:Java DropDownChoice.setOutputMarkupId方法的具體用法?Java DropDownChoice.setOutputMarkupId怎麽用?Java DropDownChoice.setOutputMarkupId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.markup.html.form.DropDownChoice
的用法示例。
在下文中一共展示了DropDownChoice.setOutputMarkupId方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initViewSelector
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void initViewSelector(WebMarkupContainer headerPanel){
DropDownChoice<AssignmentViewType> viewSelect = new DropDownChoice(ID_VIEW_TYPE, viewModel,
Model.ofList(viewTypeList != null && viewTypeList.size() > 0 ?
viewTypeList : createAssignableTypesList()),
new EnumChoiceRenderer<AssignmentViewType>(this));
viewSelect.add(new OnChangeAjaxBehavior() {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (AssignmentViewType.USER_TYPE.equals(viewSelect.getModelObject())){
initUserViewSelectionPopup(createStringResource("AssignmentCatalogPanel.selectAssignmentsUserOwner"),
target);
} else {
searchModel.reset();
AssignmentCatalogPanel.this.addOrReplaceSearchPanel(getHeaderPanel());
AssignmentCatalogPanel.this.addOrReplaceLayout(target, getCatalogItemsPanelContainer(), getPageBase());
target.add(getCatalogItemsPanelContainer());
target.add(getHeaderPanel());
}
}
});
viewSelect.setOutputMarkupId(true);
headerPanel.add(viewSelect);
}
示例2: addEventTypeDropDown
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void addEventTypeDropDown() {
final List<String> eventTypes = EapEventType.getAllTypeNames();
if (!eventTypes.isEmpty()) {
eventTypeName = eventTypes.get(0);
}
final DropDownChoice<String> eventTypeDropDownChoice = new DropDownChoice<String>("eventTypeDropDownChoice", new Model<String>(), eventTypes);
eventTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
eventTypeName = eventTypeDropDownChoice.getModelObject();
}
});
if (!eventTypes.isEmpty()) {
eventTypeDropDownChoice.setModelObject(eventTypes.get(0));
}
eventTypeDropDownChoice.setOutputMarkupId(true);
layoutForm.add(eventTypeDropDownChoice);
}
示例3: buildFilterExpressionOperatorDropDownChoice
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void buildFilterExpressionOperatorDropDownChoice() {
this.filterExpressionOperator = (FilterExpressionOperatorEnum) this.element.getValue();
final DropDownChoice<FilterExpressionOperatorEnum> filterExpressionOperatorDropDownChoice = new DropDownChoice<FilterExpressionOperatorEnum>("filterExpressionOperatorDropDownChoice", new PropertyModel<FilterExpressionOperatorEnum>(this, "filterExpressionOperator"), Arrays.asList(FilterExpressionOperatorEnum.values()), new ChoiceRenderer<FilterExpressionOperatorEnum>() {
private static final long serialVersionUID = 1L;
@Override
public Object getDisplayValue(final FilterExpressionOperatorEnum element) {
return element.getValue();
}
});
filterExpressionOperatorDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = -5452061293278720695L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
FilterExpressionPanel.this.element.setValue(FilterExpressionPanel.this.filterExpressionOperator);
FilterExpressionPanel.this.table.getSelectedElements().remove(FilterExpressionPanel.this.element);
target.add(FilterExpressionPanel.this.table);
}
});
filterExpressionOperatorDropDownChoice.setOutputMarkupId(true);
this.layoutForm.add(filterExpressionOperatorDropDownChoice);
}
示例4: initLayout
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void initLayout() {
IModel data = new PropertyModel(getModel(), SearchValue.F_VALUE);
final DisplayableRenderer renderer = new DisplayableRenderer(choices);
final DropDownChoice input = new DropDownChoice(ID_COMBO_INPUT, data, choices, renderer) {
@Override
public IConverter getConverter(Class type) {
return renderer;
}
};
input.setNullValid(true);
input.setOutputMarkupId(true);
add(input);
}
示例5: initAssignmentParametersPanel
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
protected void initAssignmentParametersPanel(){
DropDownChoice<QName> typeSelect = new DropDownChoice(ID_TYPE, typeModel,
new ListModel(WebComponentUtil.createAssignableTypesList()), new QNameChoiceRenderer());
typeSelect.add(new OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.add(get(ID_TABLES_CONTAINER));
target.add(addOrReplace(createCountContainer()));
}
});
typeSelect.setOutputMarkupId(true);
add(typeSelect);
}
示例6: init
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
/**
* Init panel components
*/
private void init() {
TitledBorder border = new TitledBorder("mavenSettingsBorder");
addChoice("releases", true, false, false, false);
addChoice("snapshots", false, true, false, false);
addChoice("pluginReleases", true, false, true, false);
addChoice("pluginSnapshots", false, true, true, false);
final DropDownChoice mirrorDropDownChoice = new DropDownChoice<>("mirrorAnySelection",
new PropertyModel<T>(this, "mirrorAnySelection"), virtualRepoDescriptors);
mirrorDropDownChoice.setOutputMarkupId(true);
if (!virtualRepoDescriptors.isEmpty()) {
mirrorDropDownChoice.setDefaultModelObject(getDefaultChoice(false, false, false, true));
}
mirrorDropDownChoice.setEnabled(false);
form.add(mirrorDropDownChoice);
form.add(new HelpBubble("mirrorAnySelection.help", new ResourceModel("mirrorAnySelection.help")));
final StyledCheckbox mirrorAnyCheckbox =
new StyledCheckbox("mirrorAny", new PropertyModel<Boolean>(this, "mirrorAny"));
mirrorAnyCheckbox.setDefaultModelObject(Boolean.FALSE);
mirrorAnyCheckbox.add(new AjaxFormComponentUpdatingBehavior("onclick") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
mirrorDropDownChoice.setEnabled(mirrorAnyCheckbox.isChecked());
target.add(mirrorDropDownChoice);
}
});
form.add(mirrorAnyCheckbox);
TitledAjaxSubmitLink generateButton = getGenerateButton();
form.add(new DefaultButtonBehavior(generateButton));
border.add(form);
add(border);
add(generateButton);
}
示例7: initViewSelector
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void initViewSelector(WebMarkupContainer headerPanel){
DropDownChoice<AssignmentViewType> viewSelect = new DropDownChoice(ID_VIEW_TYPE, viewTypeModel,
Model.ofList(getRoleCatalogStorage().getShoppingCartConfigurationDto().getViewTypeList()),
new EnumChoiceRenderer<AssignmentViewType>(this));
viewSelect.add(new OnChangeAjaxBehavior() {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
initProvider();
searchModel.reset();
target.add(getContentPanel());
target.add(getHeaderPanel());
}
});
viewSelect.add(new VisibleEnableBehaviour(){
private static final long serialVersionUID = 1L;
@Override
public boolean isEnabled(){
return getRoleCatalogStorage().getAssignmentsUserOwner() == null;
}
});
viewSelect.setOutputMarkupId(true);
headerPanel.add(viewSelect);
}
示例8: initLayout
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void initLayout(String localPartLabelKey, String localPartTooltipKey,
String namespaceLabelKey, String namespaceTooltipKey, boolean markLocalPartAsRequired, boolean markNamespaceAsRequired){
Label localPartLabel = new Label(ID_LOCAL_PART_LABEL, getString(localPartLabelKey));
localPartLabel.setOutputMarkupId(true);
localPartLabel.setOutputMarkupPlaceholderTag(true);
add(localPartLabel);
WebMarkupContainer localPartRequired = new WebMarkupContainer(ID_LOCAL_PART_REQUIRED);
localPartRequired.setVisible(markLocalPartAsRequired);
add(localPartRequired);
Label namespaceLabel = new Label(ID_NAMESPACE_LABEL, getString(namespaceLabelKey));
namespaceLabel.setOutputMarkupId(true);
namespaceLabel.setOutputMarkupPlaceholderTag(true);
add(namespaceLabel);
WebMarkupContainer namespaceRequired = new WebMarkupContainer(ID_NAMESPACE_REQUIRED);
namespaceRequired.setVisible(markNamespaceAsRequired);
add(namespaceRequired);
TextField localPart = new TextField<>(ID_LOCAL_PART, localpartModel);
localPart.setOutputMarkupId(true);
localPart.setOutputMarkupPlaceholderTag(true);
localPart.setRequired(isLocalPartRequired());
localPart.add(new UpdateBehavior());
add(localPart);
DropDownChoice namespace = new DropDownChoice<>(ID_NAMESPACE, namespaceModel, prepareNamespaceList());
namespace.setOutputMarkupId(true);
namespace.setOutputMarkupPlaceholderTag(true);
namespace.setNullValid(false);
namespace.setRequired(isNamespaceRequired());
namespace.add(new UpdateBehavior());
add(namespace);
Label localPartTooltip = new Label(ID_T_LOCAL_PART);
localPartTooltip.add(new AttributeAppender("data-original-title", getString(localPartTooltipKey)));
localPartTooltip.add(new InfoTooltipBehavior());
localPartTooltip.setOutputMarkupPlaceholderTag(true);
add(localPartTooltip);
Label namespaceTooltip = new Label(ID_T_NAMESPACE);
namespaceTooltip.add(new AttributeAppender("data-original-title", getString(namespaceTooltipKey)));
namespaceTooltip.add(new InfoTooltipBehavior());
namespaceTooltip.setOutputMarkupPlaceholderTag(true);
add(namespaceTooltip);
}
示例9: initLayout
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
protected void initLayout(){
ChooseTypePanel<ValuePolicyType> passPolicyChoosePanel = new ChooseTypePanel<ValuePolicyType>(ID_GLOBAL_PASSWORD_POLICY_CHOOSER,
new PropertyModel<ObjectViewDto<ValuePolicyType>>(getModel(), SystemConfigurationDto.F_PASSWORD_POLICY));
ChooseTypePanel<SecurityPolicyType> securityPolicyChoosePanel = new ChooseTypePanel<SecurityPolicyType>(ID_GLOBAL_SECURITY_POLICY_CHOOSER,
new PropertyModel<ObjectViewDto<SecurityPolicyType>>(getModel(), SystemConfigurationDto.F_SECURITY_POLICY));
add(passPolicyChoosePanel);
add(securityPolicyChoosePanel);
ObjectPolicyConfigurationEditor objectPolicyEditor = new ObjectPolicyConfigurationEditor(ID_OBJECT_POLICY_EDITOR,
new PropertyModel<List<ObjectPolicyConfigurationTypeDto>>(getModel(), SystemConfigurationDto.F_OBJECT_POLICY_LIST));
add(objectPolicyEditor);
DropDownChoice<AEPlevel> aepLevel = new DropDownChoice<>(ID_GLOBAL_AEP,
new PropertyModel<AEPlevel>(getModel(), SystemConfigurationDto.F_AEP_LEVEL),
WebComponentUtil.createReadonlyModelFromEnum(AEPlevel.class),
new EnumChoiceRenderer<AEPlevel>(SystemConfigPanel.this));
aepLevel.setOutputMarkupId(true);
if(aepLevel.getModel().getObject() == null){
aepLevel.getModel().setObject(null);
}
aepLevel.add(new EmptyOnChangeAjaxFormUpdatingBehavior());
add(aepLevel);
TextField<String> auditRecordsField = WebComponentUtil.createAjaxTextField(ID_CLEANUP_AUDIT_RECORDS, new PropertyModel<String>(getModel(), SystemConfigurationDto.F_AUDIT_CLEANUP));
TextField<String> closedTasksField = WebComponentUtil.createAjaxTextField(ID_CLEANUP_CLOSED_TASKS, new PropertyModel<String>(getModel(), SystemConfigurationDto.F_TASK_CLEANUP));
add(auditRecordsField);
add(closedTasksField);
createTooltip(ID_CLEANUP_AUDIT_RECORDS_TOOLTIP);
createTooltip(ID_CLEANUP_CLOSED_TASKS_TOOLTIP);
CheckBox experimentalCodeCheck = WebComponentUtil.createAjaxCheckBox(ID_EXPERIMENTAL_CODE_CHECKBOX, new PropertyModel<Boolean>(getModel(), SystemConfigurationDto.F_ENABLE_EXPERIMENTAL_CODE));
add(experimentalCodeCheck);
}
示例10: populateItem
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
@Override
protected void populateItem(final ListItem<LoggerTO> item) {
item.add(new Label("name"));
DropDownChoice<LoggerLevel> level =
new DropDownChoice<LoggerLevel>("level");
level.setModel(new IModel<LoggerLevel>() {
private static final long serialVersionUID =
-2350428186089596562L;
@Override
public LoggerLevel getObject() {
return item.getModelObject().getLevel();
}
@Override
public void setObject(final LoggerLevel object) {
item.getModelObject().setLevel(object);
}
@Override
public void detach() {
}
});
level.setChoices(Arrays.asList(LoggerLevel.values()));
level.setOutputMarkupId(true);
level.add(new AjaxFormComponentUpdatingBehavior(
"onchange") {
private static final long serialVersionUID =
-1107858522700306810L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
boolean result = getId().equals("corelogger")
? confRestClient.setLoggerLevel(
item.getModelObject().getName(),
item.getModelObject().getLevel())
: consoleLoggerController.setLoggerLevel(
item.getModelObject().getName(),
item.getModelObject().getLevel());
if (result) {
info(getString("operation_succeded"));
} else {
info(getString("operation_error"));
}
target.add(feedbackPanel);
}
});
MetaDataRoleAuthorizationStrategy.authorize(level, ENABLE,
xmlRolesReader.getAllAllowedRoles(
"Configuration", "loggerSetLevel"));
item.add(level);
}
示例11: makeDropDownChoice
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private DropDownChoice<DocumentType> makeDropDownChoice(String identifier, IModel<List<DocumentType>> types) {
DropDownChoice<DocumentType> dropDownChoice = new DropDownChoice<DocumentType>(identifier, new Model<DocumentType>(), types);
dropDownChoice.setOutputMarkupId(true);
return dropDownChoice;
}
示例12: AddEditFilterPanel
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
public AddEditFilterPanel(String id, AnalyzerFilter filter,
int index) {
super(id, true);
this.entityModel = new ReloadableEntityModel<AnalyzerFilter>(filter);
// Ne pas utiliser filter.getID() pour déterminer si c'est en création.
// Car cela empêche de modifier un filtre tout juste créé
this.index = index;
Form form = getForm();
form.setModel(new CompoundPropertyModel(entityModel));
final ModalWindow filterClassModal = new ModalWindow("filterClassModal");
form.add(filterClassModal);
filterClassModal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
IModel filterClassesModel = new LoadableDetachableModel() {
@Override
protected Object load() {
FilterClassServices filterClassServices = ConstellioSpringUtils
.getFilterClassServices();
return filterClassServices.list();
}
};
IChoiceRenderer filterClassRenderer = new ChoiceRenderer("className");
final DropDownChoice filterClassField = new DropDownChoice(
"filterClass", filterClassesModel, filterClassRenderer);
form.add(filterClassField);
filterClassField.setOutputMarkupId(true);
AjaxLink addFilterClassLink = new AjaxLink("addFilterClassLink") {
@Override
public void onClick(AjaxRequestTarget target) {
AddEditFilterClassPanel addEditAnalyzerClassPanel = new AddEditFilterClassPanel(
filterClassModal.getContentId(), new FilterClass(),
filterClassField);
filterClassModal.setContent(addEditAnalyzerClassPanel);
filterClassModal.show(target);
}
};
form.add(addFilterClassLink);
form.add(new CheckBox("ignoreCase"));
form.add(new CheckBox("expand"));
form.add(new CheckBox("enablePositionIncrements"));
form.add(new CheckBox("inject"));
form.add(new TextField("language"));
form.add(new TextArea("wordsText"));
form.add(new TextArea("synonymsText"));
form.add(new TextArea("protectedText"));
form.add(new TextField("generateWordParts", Integer.class));
form.add(new TextField("generateNumberParts", Integer.class));
form.add(new TextField("catenateWords", Integer.class));
form.add(new TextField("catenateNumbers", Integer.class));
form.add(new TextField("catenateAll", Integer.class));
form.add(new TextField("splitOnCaseChange", Integer.class));
form.add(new TextField("delimiter"));
form.add(new TextField("encoder"));
form.add(new TextField("pattern"));
form.add(new TextField("replacement"));
form.add(new TextField("replace"));
}
示例13: AddEditConnectorTypeMetaMappingPanel
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
public AddEditConnectorTypeMetaMappingPanel(String id, ConnectorTypeMetaMapping metaMapping) {
super(id, true);
this.metaMappingModel = new ReloadableEntityModel<ConnectorTypeMetaMapping>(metaMapping);
Form form = getForm();
form.setModel(new CompoundPropertyModel(metaMappingModel));
TextField metaNameField = new RequiredTextField("metaName");
metaNameField.add(new StringValidator.MaximumLengthValidator(255));
form.add(metaNameField);
TextField indexFieldNameField = new RequiredTextField("indexFieldName");
indexFieldNameField.add(new StringValidator.MaximumLengthValidator(255));
form.add(indexFieldNameField);
final CheckBox indexedCheckbox = new CheckBox("indexed");
form.add(indexedCheckbox);
// final CheckBox storedCheckbox = new CheckBox("stored");
// form.add(storedCheckbox);
final CheckBox multiValuedCheckbox = new CheckBox("multiValued");
form.add(multiValuedCheckbox);
final ModalWindow fieldTypeModal = new ModalWindow("fieldTypeModal");
form.add(fieldTypeModal);
fieldTypeModal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
IModel fieldTypesModel = new LoadableDetachableModel() {
@Override
protected Object load() {
FieldTypeServices fieldTypeServices = ConstellioSpringUtils.getFieldTypeServices();
return fieldTypeServices.list();
}
};
IChoiceRenderer fieldTypeRenderer = new ChoiceRenderer("name");
final DropDownChoice fieldTypeField = new DropDownChoice("fieldType", fieldTypesModel,
fieldTypeRenderer);
form.add(fieldTypeField);
fieldTypeField.setOutputMarkupId(true);
AjaxLink addFieldTypeLink = new AjaxLink("addFieldTypeLink") {
@Override
public void onClick(AjaxRequestTarget target) {
AddEditFieldTypePanel addEditFieldTypePanel = new AddEditFieldTypePanel(fieldTypeModal
.getContentId(), new FieldType(), fieldTypeField);
fieldTypeModal.setContent(addEditFieldTypePanel);
fieldTypeModal.show(target);
}
};
form.add(addFieldTypeLink);
}
示例14: AddEditFieldTypePanel
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
public AddEditFieldTypePanel(String id, FieldType fieldType, Component refreshComponentP) {
super(id, true);
this.fieldTypeModel = new ReloadableEntityModel<FieldType>(fieldType);
this.refreshComponent = refreshComponentP;
Form form = getForm();
form.setModel(new CompoundPropertyModel(fieldTypeModel));
TextField nameField = new RequiredTextField("name");
nameField.add(new StringValidator.MaximumLengthValidator(255));
form.add(nameField);
final ModalWindow fieldTypeClassModal = new ModalWindow("fieldTypeClassModal");
form.add(fieldTypeClassModal);
fieldTypeClassModal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
IModel fieldTypeClassesModel = new LoadableDetachableModel() {
@Override
protected Object load() {
FieldTypeClassServices fieldTypeClassServices = ConstellioSpringUtils.getFieldTypeClassServices();
return fieldTypeClassServices.list();
}
};
IChoiceRenderer fieldTypeClassRenderer = new ChoiceRenderer("className");
final DropDownChoice fieldTypeClassField = new DropDownChoice("fieldTypeClass", fieldTypeClassesModel,
fieldTypeClassRenderer);
form.add(fieldTypeClassField);
fieldTypeClassField.setOutputMarkupId(true);
AjaxLink addFieldTypeClassLink = new AjaxLink("addFieldTypeClassLink") {
@Override
public void onClick(AjaxRequestTarget target) {
AddEditFieldTypeClassPanel addEditFieldTypeClassPanel =
new AddEditFieldTypeClassPanel(fieldTypeClassModal.getContentId(), new FieldTypeClass(), fieldTypeClassField);
fieldTypeClassModal.setContent(addEditFieldTypeClassPanel);
fieldTypeClassModal.show(target);
}
};
form.add(addFieldTypeClassLink);
analyzerPanel = new AddEditAnalyzerFieldPanel("analyzerPanel", new LoadableDetachableModel() {
@Override
protected Object load() {
FieldType fieldType = fieldTypeModel.getObject();
return fieldType.getAnalyzer() != null ? fieldType.getAnalyzer() : new Analyzer();
}
});
form.add(analyzerPanel);
queryAnalyzerPanel = new AddEditAnalyzerFieldPanel("queryAnalyzerPanel", new LoadableDetachableModel() {
@Override
protected Object load() {
FieldType fieldType = fieldTypeModel.getObject();
return fieldType.getQueryAnalyzer() != null ? fieldType.getQueryAnalyzer() : new Analyzer();
}
});
form.add(queryAnalyzerPanel);
TextField precisionStepField = new TextField("precisionStep", Integer.class);
form.add(precisionStepField);
TextField positionIncrementGapField = new TextField("positionIncrementGap", Integer.class);
form.add(positionIncrementGapField);
final CheckBox sortMissingLastCheckbox = new CheckBox("sortMissingLast");
form.add(sortMissingLastCheckbox);
final CheckBox omitNormsCheckbox = new CheckBox("omitNorms");
form.add(omitNormsCheckbox);
final CheckBox multiValuedCheckbox = new CheckBox("multiValued");
form.add(multiValuedCheckbox);
}
示例15: DefineDrillEntityPanel
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
public DefineDrillEntityPanel(String id, String type, final DrillDownEntity drillEntity, Entity entity) {
super(id, new CompoundPropertyModel<DrillDownEntity>(drillEntity));
this.type = type;
final Label widgetLabel = new Label("entityLabel", getString(type));
add(widgetLabel);
final DropDownChoice<Entity> entityChoice = new DropDownChoice<Entity>("entities",
new PropertyModel<Entity>(drillEntity, "entity"), new WidgetDropDownModel(), new EntityChoiceRenderer());
entityChoice.setOutputMarkupPlaceholderTag(true);
entityChoice.setOutputMarkupId(true);
entityChoice.setRequired(true);
add(entityChoice);
final Label linkLabel = new Label("linkLabel", getString("ActionContributor.Drill.parameter"));
linkLabel.setOutputMarkupId(true);
linkLabel.setOutputMarkupPlaceholderTag(true);
add(linkLabel);
final DropDownChoice<String> paramChoice = new DropDownChoice<String>("parameters",
new PropertyModel<String>(drillEntity, "linkParameter"), parameters, new ChoiceRenderer<String>());
paramChoice.setRequired(true);
paramChoice.setLabel(new Model<String>( getString("ActionContributor.Drill.parameter")));
paramChoice.setOutputMarkupId(true);
paramChoice.setOutputMarkupPlaceholderTag(true);
add(paramChoice);
final Label columnLabel = new Label("columnLabel", getString("ActionContributor.Drill.column"));
columnLabel.setOutputMarkupId(true);
columnLabel.setOutputMarkupPlaceholderTag(true);
add(columnLabel);
final TextField<Integer> columnField = new TextField<Integer>("column");
columnField.setOutputMarkupId(true);
columnField.setOutputMarkupPlaceholderTag(true);
add(columnField);
if (drillEntity.getIndex() == 0) {
if (entity instanceof Chart) {
columnLabel.setVisible(false);
columnField.setVisible(false);
}
} else {
if (DrillDownUtil.getLastDrillType(entity) == DrillDownEntity.CHART_TYPE) {
columnLabel.setVisible(false);
columnField.setVisible(false);
}
}
entityChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
updateParameters(drillEntity);
target.add(paramChoice);
}
});
}