[
https://jira.jboss.org/jira/browse/GTNPORTAL-17?page=com.atlassian.jira.p...
]
Minh Hoang TO commented on GTNPORTAL-17:
----------------------------------------
Indeed, 'Adding Item' was triggered twice.
Here is a brief description of CreateNewPage/Edit Page mechanism and inter-portlet
communication in GateIn, that helps you understand the root cause of the issue.
1. On CreateNewPage/Edit Page , targeted component ( UIPageCreationWizard or UIPageBody,
respectively ) is added into UIPortalToolPanel, the last one is a descendant of
UIPortalApplication ( the root component )
2. Add/Edit/Remove portlets during CreateNewPage/Edit Page is done through the targeted
component mentioned earlier
3. When user interacts with one portlet, it broadcasts event to all relevant portlets .
Those last ones are retrieved by searching in the root UI component (
UIPortalApplication)
Answers to question "Why strange behaviors occured?"
1. In the case of CreateNewPage, the UIPageCreationWizard was not removed from
UIPortalToolPanel . For any emited event, there would be two portlets, with same
storage-name supporting it ( one is stored under UIViewWS, another is stored under
UIPageCreationWizard) . Hence, events seemed to be triggered twice
2. In the case of EditPage, the 'setUIComponent(null)' is called in Abort/Finish
actions , that explains why the strange behavior disappears after editing the page.
Matt Wringe 's patch is impeccable solution!
Events seems to be triggered twice
----------------------------------
Key: GTNPORTAL-17
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-17
Project: GateIn Portal
Issue Type: Bug
Components: PC integration
Reporter: Thomas Heute
Assignee: Minh Hoang TO
Fix For: 3.0.0-Beta02
Attachments: UIPageCreationWizard.patch
I've tried the Cart and Catalog portlets used in JBoss Portal 2.7 and realized that
when you add an element to the cart it is added twice
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira