Bug 730889 - Topic creation success message does not update after adding a second topic
Summary: Topic creation success message does not update after adding a second topic
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Matthew Casperson
QA Contact: Misty Stanley-Jones
URL:
Whiteboard:
: 735265 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-16 06:44 UTC by Misty Stanley-Jones
Modified: 2014-08-04 22:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-07 00:32:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Misty Stanley-Jones 2011-08-16 06:44:24 UTC
I added a first topic and got this message:
Successfully Created Topic With ID: 4902 Title: Transaction compensation

I added a second topic and the message did not change to reflect my new topic (4903).

Comment 1 Matthew Casperson 2011-10-07 00:27:56 UTC
Fixed in 20111007-1026

This one was a bit of a drama:

/*
 * The initial approach to having the status messages updated with the
 * topic details was to use:
 * 
 * @Override
 * 
 * @Factory(value = "topic") public Topic getInstance() { return
 * super.getInstance(); }
 * 
 * The problem with this is that the "topic" object is not refreshed, so
 * the messages all reprint the details of the first created object. The
 * next step I took to try and fix this was to refresh the context in an
 * override of clearInstance() like so:
 * 
 * Contexts.getConversationContext().set("topic", null);
 * 
 * The problem with this is that the messages generated by the
 * EntityHome object actually calculate their EL values in a thread. So
 * by the time the message was calculated, the clearInstance function
 * had set the "topic" object to null.
 * 
 * Manually setting the EL object "lasttopic" before the persist ensures that
 * the messages have time to calculate their variables before the object
 * is reset.
 */

Comment 2 Matthew Casperson 2011-10-07 03:21:38 UTC
*** Bug 735265 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.