Source:
<code>public CreateBrickModel() { setLvName(new EntityModel<String>()); setStorageDevices(new ListModel<StorageDevice>()); setSize(new EntityModel<String>()); setStripeSize(new EntityModel<Integer>()); setNoOfPhysicalDisksInRaidVolume(new EntityModel<Integer>()); setRaidTypeList(new ListModel<RaidType>()); setMountPoint(new EntityModel<String>()); setDefaultMountFolder(new EntityModel<String>()); ArrayList<RaidType> list = <START> new ArrayList<RaidType>(Arrays.asList(RaidType.values())); <END> getRaidTypeList().setItems(list); getRaidTypeList().setSelectedItem(RaidType.None); getNoOfPhysicalDisksInRaidVolume().setIsAvailable(false); getStripeSize().setIsAvailable(false); getSize().setIsChangable(false); initSize(); getStorageDevices().getSelectedItemsChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { updateBrickSize(); } }); getLvName().getEntityChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { String mountPoint = getDefaultMountFolder().getEntity() + "/" + getLvName().getEntity(); getMountPoint().setEntity(mountPoint); } }); getRaidTypeList().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { if (getRaidTypeList().getSelectedItem() != RaidType.None && getRaidTypeList().getSelectedItem() != RaidType.Raid0) { getNoOfPhysicalDisksInRaidVolume().setIsAvailable(true); getStripeSize().setIsAvailable(true); } else { getNoOfPhysicalDisksInRaidVolume().setIsAvailable(false); getStripeSize().setIsAvailable(false); } onPropertyChanged(new PropertyChangedEventArgs("raidTypeChanged")); } }); }</code><technical_language>Please retain this immutable if is serving ListModelListBoxEditor</technical_language>

Target:
public CreateBrickModel() { setLvName(new EntityModel<String>()); setStorageDevices(new ListModel<StorageDevice>()); setSize(new EntityModel<String>()); setStripeSize(new EntityModel<Integer>()); setNoOfPhysicalDisksInRaidVolume(new EntityModel<Integer>()); setRaidTypeList(new ListModel<RaidType>()); setMountPoint(new EntityModel<String>()); setDefaultMountFolder(new EntityModel<String>()); List<RaidType> list = Arrays.asList(RaidType.values()); getRaidTypeList().setItems(list); getRaidTypeList().setSelectedItem(RaidType.None); getNoOfPhysicalDisksInRaidVolume().setIsAvailable(false); getStripeSize().setIsAvailable(false); initSize(); getStorageDevices().getSelectedItemsChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { updateBrickSize(); } }); getLvName().getEntityChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { String mountPoint = getDefaultMountFolder().getEntity() + "/" + getLvName().getEntity(); getMountPoint().setEntity(mountPoint); } }); getRaidTypeList().getSelectedItemChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { if (getRaidTypeList().getSelectedItem() != RaidType.None && getRaidTypeList().getSelectedItem() != RaidType.Raid0) { getNoOfPhysicalDisksInRaidVolume().setIsAvailable(true); getStripeSize().setIsAvailable(true); } else { getNoOfPhysicalDisksInRaidVolume().setIsAvailable(false); getStripeSize().setIsAvailable(false); } onPropertyChanged(new PropertyChangedEventArgs("raidTypeChanged")); } }); }