Skip to content

Commit

Permalink
Removing obsolte forms for deprecated enableDisable part in ResourceS…
Browse files Browse the repository at this point in the history
…chema
  • Loading branch information
Erik Suta committed Jul 11, 2014
1 parent 010de42 commit 9b55d90
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 89 deletions.
Expand Up @@ -20,50 +20,6 @@

<h3><wicket:message key="capabilityActivationPanel.label"/></h3>

<h4><wicket:message key="capabilityActivationPanel.label.enabledDisabled" /></h4>
<div class="row">
<div class="col-xs-6">
<dl class="dl-horizontal">
<dt>
<label><wicket:message key="capabilityActivationPanel.label.enabled" /></label>
</dt>
<dd><input wicket:id="enabled" type="checkbox" value="checked"/></dd>
</dl>
</div>
<div class="col-xs-6">
<dl class="dl-horizontal">
<dt>
<label><wicket:message key="capabilityActivationPanel.label.returnedByDefault" /></label>
</dt>
<dd><input wicket:id="returnedByDefault" type="checkbox" value="checked"/></dd>
</dl>
<dl class="dl-horizontal">
<dt>
<label><wicket:message key="capabilityActivationPanel.label.ignoreAttribute"/></label>
</dt>
<dd><input wicket:id="ignoreAttribute" type="checkbox" value="checked"/></dd>
</dl>
</div>
</div>
<dl class="dl-horizontal">
<dt>
<label><wicket:message key="capabilityActivationPanel.label.attributeName" /></label>
</dt>
<dd><select wicket:id="enableDisableSelect" class="form-control input-sm"></select></dd>
</dl>
<dl class="dl-horizontal">
<dt>
<label><wicket:message key="capabilityActivationPanel.label.enableList" /></label>
</dt>
<div wicket:id="enableList" />
</dl>
<dl class="dl-horizontal">
<dt>
<label><wicket:message key="capabilityActivationPanel.label.disableList" /></label>
</dt>
<div wicket:id="disableList" />
</dl>

<h4><wicket:message key="capabilityActivationPanel.label.status" /></h4>
<div class="row">
<div class="col-xs-6">
Expand Down
Expand Up @@ -32,11 +32,6 @@
* */
public class CapabilityActivationPanel extends SimplePanel{

private static final String ID_CHECK_ENABLED = "enabled";
private static final String ID_CHECK_RETURNED = "returnedByDefault";
private static final String ID_CHECK_IGNORE = "ignoreAttribute";
private static final String ID_ENABLE_LIST = "enableList";
private static final String ID_DISABLE_LIST = "disableList";
private static final String ID_CHECK_VALID_FROM_ENABLED = "validFromEnabled";
private static final String ID_CHECK_VALID_FROM_RETURNED = "validFromReturned";
private static final String ID_CHECK_VALID_TO_ENABLED = "validToEnabled";
Expand All @@ -46,7 +41,6 @@ public class CapabilityActivationPanel extends SimplePanel{
private static final String ID_CHECK_STATUS_IGNORE = "statusIgnoreAttribute";
private static final String ID_STATUS_ENABLE_LIST = "statusEnableList";
private static final String ID_STATUS_DISABLE_LIST = "statusDisableList";
private static final String ID_SELECT_ENABLE_DISABLE = "enableDisableSelect";
private static final String ID_SELECT_STATUS = "statusSelect";


Expand All @@ -56,18 +50,6 @@ public CapabilityActivationPanel(String componentId, IModel<CapabilityDto> model

@Override
protected void initLayout(){
CheckBox enabled = new CheckBox(ID_CHECK_ENABLED,
new PropertyModel<Boolean>(getModel(), "capability.enableDisable.enabled."));
add(enabled);

CheckBox returnedByDefault = new CheckBox(ID_CHECK_RETURNED,
new PropertyModel<Boolean>(getModel(), "capability.enableDisable.returnedByDefault"));
add(returnedByDefault);

CheckBox ignoreAttribute = new CheckBox(ID_CHECK_IGNORE,
new PropertyModel<Boolean>(getModel(), "capability.enableDisable.ignoreAttribute"));
add(ignoreAttribute);

CheckBox validFromEnabled = new CheckBox(ID_CHECK_VALID_FROM_ENABLED,
new PropertyModel<Boolean>(getModel(), "capability.validFrom.enabled"));
add(validFromEnabled);
Expand Down Expand Up @@ -116,27 +98,6 @@ protected StringResourceModel createEmptyItemPlaceholder(){
};
add(statusDisableList);


CapabilityListRepeater enableList = new CapabilityListRepeater(ID_ENABLE_LIST,
new PropertyModel<List<String>>(getModel(), "capability.enableDisable.enableValue")){

@Override
protected StringResourceModel createEmptyItemPlaceholder(){
return createStringResource("capabilityActivationPanel.list.placeholder");
}
};
add(enableList);

CapabilityListRepeater disableList = new CapabilityListRepeater(ID_DISABLE_LIST,
new PropertyModel<List<String>>(getModel(), "capability.enableDisable.disableValue")){

@Override
protected StringResourceModel createEmptyItemPlaceholder(){
return createStringResource("capabilityActivationPanel.list.placeholder");
}
};
add(disableList);

IChoiceRenderer renderer = new IChoiceRenderer<QName>() {

@Override
Expand All @@ -150,11 +111,6 @@ public String getIdValue(QName object, int index) {
}
};

DropDownChoice enableDisableChoice = new DropDownChoice(ID_SELECT_ENABLE_DISABLE,
new PropertyModel<QName>(getModel(), "capability.enableDisable.attribute"),
createAttributeChoiceModel(), renderer);
add(enableDisableChoice);

DropDownChoice statusChoice = new DropDownChoice(ID_SELECT_STATUS,
new PropertyModel<QName>(getModel(), "capability.status.attribute"),
createAttributeChoiceModel(), renderer);
Expand Down
Expand Up @@ -313,7 +313,7 @@ protected List<QName> load() {

} catch (Exception e){
LoggingUtils.logException(LOGGER, "Couldn't load resource schema attributes.", e);
error("Couldn't load resource schema attributes" + e);
getPageBase().error("Couldn't load resource schema attributes" + e);
//TODO - show this to the user
}
return choices;
Expand Down

0 comments on commit 9b55d90

Please sign in to comment.