Source:
public HostBondInterfaceModel() { setAddress(new EntityModel<String>()); setSubnet(new EntityModel<String>()); setGateway(new EntityModel<String>()); setBond(new SortedListModel<>(new LexoNumericComparator())); setNetwork(new ListModel<Network>()); setBootProtocolAvailable(true); setBondingOptions(new ListModel<Map.Entry<String, EntityModel<String>>>()); Map.Entry<String, EntityModel<String>> defaultItem = null; RefObject<Map.Entry<String, EntityModel<String>>> tempRef_defaultItem = new RefObject<>(defaultItem); ArrayList<Map.Entry<String, EntityModel<String>>> list = AsyncDataProvider.getInstance().getBondingOptionList(tempRef_defaultItem); defaultItem = tempRef_defaultItem.argvalue; getBondingOptions().setItems(list); getBondingOptions().setSelectedItem(defaultItem); setCheckConnectivity(new EntityModel<Boolean>()); getCheckConnectivity().setEntity(false); EntityModel<Boolean> tempVar = new EntityModel<>(); tempVar.setEntity(false); setCommitChanges(tempVar); setCustomBondMode(new EntityModel<String>()); getCustomBondMode().getPropertyChangedEvent().addListener(new IEventListener<PropertyChangedEventArgs>() { @Override public void eventRaised(Event<? extends PropertyChangedEventArgs> ev, Object sender, PropertyChangedEventArgs args) { final String customBondValue = ((EntityModel<String>) sender).getEntity(); Map.Entry<String, EntityModel<String>> selectedItem = getBondingOptions().getSelectedItem(); if (selectedItem.getKey().equals(CUSTOM_BONDING_MODE)) { selectedItem.getValue().setEntity(customBondValue); } } }); getNetwork().getSelectedItemChangedEvent().addListener(this); network_SelectedItemChanged(null); }

Target:
public HostBondInterfaceModel() { setAddress(new EntityModel<String>()); setSubnet(new EntityModel<String>()); setGateway(new EntityModel<String>()); setBond(new SortedListModel<>(new LexoNumericComparator())); setNetwork(new ListModel<Network>()); setBootProtocolAvailable(true); setBondingOptions(new ListModel<Map.Entry<String, EntityModel<String>>>()); Map.Entry<String, EntityModel<String>> defaultItem = null; RefObject<Map.Entry<String, EntityModel<String>>> tempRef_defaultItem = new RefObject<>(defaultItem); ArrayList<Map.Entry<String, EntityModel<String>>> list = AsyncDataProvider.getInstance().getBondingOptionList(tempRef_defaultItem); defaultItem = tempRef_defaultItem.argvalue; getBondingOptions().setItems(list); getBondingOptions().setSelectedItem(defaultItem); setCheckConnectivity(new EntityModel<Boolean>()); getCheckConnectivity().setEntity(false); EntityModel<Boolean> tempVar = new EntityModel<>(); tempVar.setEntity(false); setCommitChanges(tempVar); setCustomBondEditor(new EntityModel<String>()); getCustomBondEditor().getEntityChangedEvent().addListener(new IEventListener<EventArgs>() { @Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { final String customBondValue = ((EntityModel<String>) sender).getEntity(); Map.Entry<String, EntityModel<String>> selectedItem = getBondingOptions().getSelectedItem(); if (selectedItem.getKey().equals(CUSTOM_BONDING_MODE)) { selectedItem.getValue().setEntity(customBondValue); } } }); getNetwork().getSelectedItemChangedEvent().addListener(this); network_SelectedItemChanged(null); }