Topic
  • 3 replies
  • Latest Post - ‏2010-10-29T02:13:56Z by SystemAdmin
drdamour
drdamour
23 Posts

Pinned topic How can i access the Work Item DOJO Bean?

‏2010-08-31T21:58:07Z |
I've noticed the step processing widgets communicated data changes to each other via a shared DOJO bean that stores the work item. At least this is what it looks like.

I am writing a custom widget that modifies the attachments for a work item. It works when the user makes modification in my widget, as my widget sends the updates to the attachment widget and it reflects my changes, but if i modify the attachments in the attachment widget my widget does not see the modifications and cannot react to them.

This causes a major problem in the following scenario:
1. user opens WI
2. WI sent to custom widget from step completion widget
3. user uses custom widget to modify attachment 1
4. custom widget sends up to attachment widget, which reflects changes
5. user uses attachment widget to modify attachment 2
6. attachment widget reflects changes
7. user uses custom widget to modify attachment 3
8. custom widget sends up to attachment widget, which reflects changes from steps 3 & 7 only, change in step 5 lost

the step 5 change is lost cause the custom widget doesn't know about it, but if it could query the current status of the WI instead of being sent the WI in step 2 that would fix the problem.

Note: i'm not a fan of this solution, i'd much rather have the attachment widget (or ANY widget that modifies the work item) to have a "Work Item Modified" event so that other widget can get the latest version of the WI via the event system, but i need this to work in the current version.

please let me know if you have any questions, thanks!


I am Just a new Boy,
A Stranger in this Town,
Where are All the Good Times,
Who's Gonna Show this Stranger Around?
Updated on 2010-10-29T02:13:56Z at 2010-10-29T02:13:56Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    25 Posts

    Re: How can i access the Work Item DOJO Bean?

    ‏2010-10-19T06:42:43Z  
    You can try ecmwdgt.getBean(bean id)
  • drdamour
    drdamour
    23 Posts

    Re: How can i access the Work Item DOJO Bean?

    ‏2010-10-20T01:44:06Z  
    You can try ecmwdgt.getBean(bean id)
    is ecmwdgt a global i can use?

    what would be the bean id?


    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
  • SystemAdmin
    SystemAdmin
    25 Posts

    Re: How can i access the Work Item DOJO Bean?

    ‏2010-10-29T02:13:56Z  
    • drdamour
    • ‏2010-10-20T01:44:06Z
    is ecmwdgt a global i can use?

    what would be the bean id?


    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
    Yes. it is a global variable. you can get the bean id in init.js