ItemClickListener on FilterTable not working after updating backing datasou

I have a FilterTable (although the same behavior occurs with TreeTable) that has an itemClickListener that reacts to a double click event. If you click on the item in the table, it will bring up a subwindow that allows the user to modify the contents of that row and you can save or cancel from that window. If the user clicks cancel, the listener is still working and can click on another row to generate a subwindow. If the user clicks to save the update, however, the click listener no longer works.

The only thing I can tell that may be causing the issue is that the datasource (HierarchicalContainer) backing the table is updated when the save button is clicked.

Here is the method being called to update the dataSource:

private void updateDataSource(Object item, HierarchicalContainer dataSource, final AssessmentQuestion question)
{
    dataSource.getContainerProperty(item, "uuid").setValue(question.getUUID());
    dataSource.getContainerProperty(item, "question").setValue(question);
    dataSource.getContainerProperty(item, this.description).setValue(question.getDescription());
    dataSource.getContainerProperty(item, this.recommendation).setValue(question.getRecommendation());
  dataSource.getContainerProperty(item, this.workInstructionLink).setValue(question.getWorkInstructionLink());
    dataSource.getContainerProperty(item, this.type).setValue(Type.valueOf(question.getType()).display());

    String section = question.getSection();

    if (section != null)
    {
        dataSource.getContainerProperty(item, this.section).setValue(section);
    }
    else
    {
        dataSource.getContainerProperty(item, this.section).setValue(MessageFormatter.formatMessageByKey("com.cerner.phantom.ui.gadget.assessments.manager.unknown", new Object { question.getSection() }));
    }

    String subsection = question.getSubsection();

    if (subsection != null)
    {
        dataSource.getContainerProperty(item, this.subsection).setValue(subsection);
    }
    else
    {
        dataSource.getContainerProperty(item, this.subsection).setValue(null);
    }

    String impactedRole = question.getImpactedRoles();

    if (impactedRole != null && !impactedRole.equals(""))
    {
        IndexedContainer selectedRoles = new IndexedContainer();
        String roles = "";

        for (String retVal: impactedRole.split(" "))
        {
            Item roleId = selectedRoles.addItem(Integer.parseInt(retVal));

            if (roles != "")
            {
                roles = roles + ", " + ImpactedRole.valueOf(Integer.parseInt(retVal)).display();
            } else {
                roles = ImpactedRole.valueOf(Integer.parseInt(retVal)).display();
            }
        }

        dataSource.getContainerProperty(item, this.impactedRole).setValue(roles);
    }

    dataSource.getContainerProperty(item, this.responseType).setValue(ResponseType.valueOf(question.getResponseType()).display());
    
    Integer expectedResponse = question.getExpectedResponse();
    
    if (expectedResponse != null)
    {
        dataSource.getContainerProperty(item, this.expectedResponse).setValue(ResponseValue.valueOf(expectedResponse).display());
    }

    Integer priority = question.getRecommendationPriority();

    if (priority != null)
    {
        dataSource.getContainerProperty(item, this.recommendationPriority).setValue(RecommendationPriority.valueOf(priority).display());
    }

    final CheckBox obsoleteCheckBox = new CheckBox();
    obsoleteCheckBox.setImmediate(true);
    obsoleteCheckBox.setValue(question.isObsolete());
    obsoleteCheckBox.addListener(new Button.ClickListener()
    {
        private static final long serialVersionUID = -1450255318294266354L;

        @Override
        public void buttonClick(ClickEvent event)
        {
            question.setObsolete((Boolean) obsoleteCheckBox.getValue());
            getDataSource().updateQuestion(question);
        }
    });

    dataSource.getContainerProperty(item, this.obsolete).setValue(obsoleteCheckBox);
}

Any thoughts on what could be causing this?

A couple of additional notes…
If I refresh the page in the browser, it works
If I close the Vaadin tab that contains the table and reopen it, it works

One last thing. I just noted that if I let it sit for 10 minutes, it works again. I tried several times in the meantime with no result, but now it works. If I go through the process again, it fails to work again. Is there some sort of timer I need to override here or do a refresh of some sort? I tried to do a refreshRowCache and a requestRepaint, but neither of those did the trick.

Code for button:

Button save = new Button(ResourceAssistant.getString("com.cerner.phantom.ui.gadget.assessments.manager.save"),
        new Button.ClickListener() 
{
    private static final long serialVersionUID = -1707668412306528550L;

    @Override
    @SuppressWarnings("synthetic-access")
    public void buttonClick(ClickEvent event) 
    {
        getWindow().setImmediate(true);
        final IDataSource source = getDataSource();

        //                if (source != null && descriptionArea.toString() != "" && questionTypeBox.isValid() && questionSectionBox.isValid() && 
        //                        impactedRoleBox.isValid() && responseTypeBox.isValid() && recommendationPriorityBox.isValid())
        if (source != null && descriptionArea.toString() != "" && questionTypeBox.isValid() && questionSectionBox.isValid() && 
                impactedRoleOptions.isValid() && responseTypeBox.isValid() && expectedResponseBox.isValid() && recommendationPriorityBox.isValid())
        {
            final Item item = (Item) subwindow.getData();
            final boolean isNewQuestion = item == null;
            AssessmentQuestion question = null;

            if (item != null)
            {
                question = (AssessmentQuestion) item.getItemProperty("question").getValue();
            }

            if (question == null)
            {
                question = new AssessmentQuestion();
                question.setUUID(UUID.randomUUID().toString());
            }

            question.setDescription((String) descriptionArea.getValue());
            question.setRecommendation((String) recommendationArea.getValue());
            question.setWorkInstructionLink((String) workInstructionArea.getValue());
            //                    question.setType(Type.valueOfByDisplay(AssessmentManagerGadget.this.types.getItem(questionTypeBox.getValue()).getItemProperty("display").toString()).ordinal());
            question.setType((Integer) questionTypeBox.getValue());
            question.setSection(AssessmentManagerGadget.this.sections.getItem(questionSectionBox.getValue()).getItemProperty("display").toString());

            if (questionSubsectionBox.getValue() != null)
            {
                question.setSubsection(subsectionContainer.getContainerProperty(questionSubsectionBox.getValue(), "display").toString());
            } else {
                question.setSubsection(null);
            }

            //                    if (impactedRoleBox.getValue() != null)
            //                    {
            //                        question.setImpactedRole((String) impactedRoleBox.getValue());
            //                    }
            //                    
            if (impactedRoleOptions.getValue() != null)
            {
                String impactedRoles = impactedRoleOptions.getValue().toString();
                impactedRoles = impactedRoles.replace("[", "");
                impactedRoles = impactedRoles.replace("]", "");
                impactedRoles = impactedRoles.replace(",", "");
                question.setImpactedRoles(impactedRoles);
            }

            if (recommendationPriorityBox.getValue() != null)
            {
                question.setRecommendationPriority(RecommendationPriority.valueOf((Integer) recommendationPriorityBox.getValue()).ordinal());
            }

            question.setResponseType(ResponseType.valueOfByDisplay(AssessmentManagerGadget.this.responseTypes.getItem(responseTypeBox.getValue()).getItemProperty("display").toString()).ordinal());
            
            if (expectedResponseBox.getValue() != null)
            {
            question.setExpectedResponse(ResponseValue.valueOfByDisplay(AssessmentManagerGadget.this.expectedResponses.getItem(expectedResponseBox.getValue()).getItemProperty("display").toString()).ordinal());
            }

            question.setDescription((String) descriptionArea.getValue());
            question.setRecommendation((String) recommendationArea.getValue());
            question.setWorkInstructionLink((String) workInstructionArea.getValue());

            //                    if (newTypeCaption != null) {
            //                        typeCodeSets.add(new Type(newTypeCaption));
            //                        getDataSource().updateCodeSets(typeCodeSets);
            //                        updateCodeSets();
            //                    }

            if (newSectionCaption != null) {
                sectionCodeSets.add(new Section(newSectionCaption));
                getDataSource().updateCodeSets(sectionCodeSets);
                updateCodeSets();
                selectedSection = Section.valueOfByDisplay(newSectionCaption).ordinal();;
            }

            if (newSubsectionCaption != null) {
                //                        Integer parentSection = Integer.parseInt(questionSectionBox.getValue().toString());
                Subsection subsection = new Subsection(newSubsectionCaption, selectedSection);
                subsectionCodeSets.add(subsection);
                getDataSource().updateCodeSets(subsectionCodeSets);
                updateCodeSets();
            }

            //                    if (newRoleCaption != null) {
            //                        roleCodeSets.add(new Role(newRoleCaption));
            //                        getDataSource().updateCodeSets(roleCodeSets);
            //                        updateCodeSets();
            //                    }

            getWindow().removeWindow(subwindow);

            final AssessmentQuestion toUpdate = question;

            if (isNewQuestion)
            {
                addAssessmentQuestionToDataSource(dataSource, toUpdate);
            }
            else
            {
                updateDataSource(item.hashCode(), dataSource, toUpdate);
            }

            getExecutorService().submit(new Runnable()
            {
                @Override
                public void run()
                {
                    Throwable error = null;

                    try
                    {
                        source.updateQuestion(toUpdate);
                    }
                    catch (Throwable t)
                    {
                        error = t;
                        Logger.getLogger(getClass().getCanonicalName()).log(Level.SEVERE, t.getMessage(), t);
                    }

                    Application app = getApplication();

                    if (app != null)
                    {
                        synchronized(AssessmentManagerGadget.this)
                        {
                            synchronized(app)
                            {    
                                table.commit();
                                table.requestRepaint();
                                table.sort();

                                if (error != null)
                                {
                                    getWindow().showNotification(ResourceAssistant.getString("com.cerner.phantom.ui.gadget.assessments.manager.unableToUpdate"), Notification.TYPE_ERROR_MESSAGE);
                                }
                            }
                        }
                    }
                }
            });
        } else {
            // Clear any errors fixed since last attempt to save
            questionTypeBox.setComponentError(null);
            questionSectionBox.setComponentError(null);
            responseTypeBox.setComponentError(null);
            expectedResponseBox.setComponentError(null);
            recommendationPriorityBox.setComponentError(null);
            descriptionArea.setComponentError(null);

            // Mark the required field that is not completed with an error marker
            if (!questionTypeBox.isValid()) {
                questionTypeBox.setComponentError(new UserError("Required Field"));
            } 
            if (!questionSectionBox.isValid()) {
                questionSectionBox.setComponentError(new UserError("Required Field"));
            }
            if (!responseTypeBox.isValid()) {
                responseTypeBox.setComponentError(new UserError("Required Field"));
            }
            if (!expectedResponseBox.isValid()) {
                expectedResponseBox.setComponentError(new UserError("Required field"));
            }
            if (!recommendationPriorityBox.isValid()) {
                recommendationPriorityBox.setComponentError(new UserError("Required Field"));
            }
            if (descriptionArea.toString() == "") {
                descriptionArea.setComponentError(new UserError("Required Field"));
            }
        }
    }
});

Anyone have thoughts on this? I stepped away from it for a bit, but I’m back to it and haven’t been able to come up with any fresh ideas to try.