# Manually updating ComponentItem will not trigger UI update

**URL:** https://discourse.kitware.com/t/manually-updating-componentitem-will-not-trigger-ui-update/306
**Category:** Using SMTK
**Created:** [September 2, 2019, 3:41pm UTC](https://discourse.kitware.com/t/manually-updating-componentitem-will-not-trigger-ui-update/306 "2019-09-02T15:41:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Haocheng\_Liu](https://discourse.kitware.com/user_avatar/discourse.kitware.com/haocheng_liu/32/36_2.png) [@Haocheng\_Liu](https://discourse.kitware.com/u/Haocheng_Liu)
#### Post date: [September 2, 2019, 3:41pm UTC](https://discourse.kitware.com/t/manually-updating-componentitem-will-not-trigger-ui-update/306/1 "2019-09-02T15:41:35Z")

</div>

Hi smtk developers,

I got a question regarding the ComponentItem and its qt representation. My use case is that the input for my operator is an `AssociationDef` item and a `ComponentItem`. When user has selected something in `AssociationDef`. the operator view should automatically populate the ComponentItem.

Ex. A user has selected a **nulcear assembly** so the operator view will read the **associated duct** from the assembly and populate it in the ComponentItem. I’m using the following code to monitor attribute changes.

```auto
QObject::connect(this->Internals->CurrentAtt, &qtAttribute::itemModified, this,
      &smtkRGGEditAssemblyView::onAttItemModified);

```

XML code is shown below.

```xml
      <AssociationsDef Name="model/assembly" NumberOfRequiredValues="1" AdvanceLevel="0">
        <Accepts>
          <Resource Name="smtk::session::rgg::Resource" Filter="model"/>
          <Resource Name="smtk::model::Resource"
                    Filter="group [string { 'selectable' = '_rgg_assembly' }]"/>
        </Accepts>
      </AssociationsDef>
      <ItemDefinitions>
        <Component Name="associated duct" label="associated duct" NumberOfRequiredValues="1" AdvanceLevel="0">
          <BriefDescription>A duct associated with the nuclear assembly</BriefDescription>
          <DetailedDescription>
            A json representation for the nuclear assembly. See details in jsonAssembly.h.
          </DetailedDescription>
          <Accepts>
            <Resource Name="smtk::model::Resource"
                    Filter="aux_geom [string { 'selectable' = '_rgg_duct' }]"/>
          </Accepts>
        </Component>

```

The code used to work well and I’ve not touched it since then. However starting from some time the `ComponentItem` is out of sync. Though the value is set in the `ComponentItem`, its view is never updated. Any ideas or suggestions on what smtk change might break this behavior?

Thanks.
