|
From: Benoit X. (JIRA) <no...@at...> - 2006-10-31 23:06:43
|
Enable multiple instances of MDI frames for same view.
------------------------------------------------------
Key: RCP-437
URL: http://opensource.atlassian.com/projects/spring/browse/RCP-437
Project: Spring Framework Rich Client Project
Type: Improvement
Versions: 0.3.0
Reporter: Benoit Xhenseval
Hi
I'd like to propose a patch that is backward compatible with the existing code.
The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1).
At the moment, this is not possible.
This is simply done by looking up for the singleton property in the Spring XML config for the requested view.
If the view is a singleton and an instance already exists, it returns it.
If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one.
I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox.
Thanks
Benoit
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|
|
From: Benoit X. (JIRA) <no...@at...> - 2006-10-31 23:08:42
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-437?page=all ] Benoit Xhenseval updated RCP-437: --------------------------------- Attachment: DesktipApplicationPage.java.patch The patch based on Revsion 1548 > Enable multiple instances of MDI frames for same view. > ------------------------------------------------------ > > Key: RCP-437 > URL: http://opensource.atlassian.com/projects/spring/browse/RCP-437 > Project: Spring Framework Rich Client Project > Type: Improvement > Versions: 0.3.0 > Reporter: Benoit Xhenseval > Attachments: DesktipApplicationPage.java.patch > > Hi > I'd like to propose a patch that is backward compatible with the existing code. > The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1). > At the moment, this is not possible. > This is simply done by looking up for the singleton property in the Spring XML config for the requested view. > If the view is a singleton and an instance already exists, it returns it. > If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one. > I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox. > Thanks > Benoit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Arne L. (JIRA) <no...@at...> - 2006-11-02 23:17:41
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-437?page=comments#action_20613 ] Arne Limburg commented on RCP-437: ---------------------------------- Hi Benoit, it was a design-decision to have just one view per page and viewdescriptor. Did you consider to use different view descriptors for your trade view? > Enable multiple instances of MDI frames for same view. > ------------------------------------------------------ > > Key: RCP-437 > URL: http://opensource.atlassian.com/projects/spring/browse/RCP-437 > Project: Spring Framework Rich Client Project > Type: Improvement > Versions: 0.3.0 > Reporter: Benoit Xhenseval > Attachments: DesktipApplicationPage.java.patch > > Hi > I'd like to propose a patch that is backward compatible with the existing code. > The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1). > At the moment, this is not possible. > This is simply done by looking up for the singleton property in the Spring XML config for the requested view. > If the view is a singleton and an instance already exists, it returns it. > If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one. > I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox. > Thanks > Benoit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Benoit X. (JIRA) <no...@at...> - 2006-11-03 09:32:43
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-437?page=comments#action_20619 ] Benoit Xhenseval commented on RCP-437: -------------------------------------- Hi Arne, Could you elaborate, and go in details? Are all viewdescriptors in the xml file? f so, it would be entirely unrealistic to have multiple of those. Let's imaging a "View Trade" internal frame, you launch one, it is empty, you type a trade number and it gets filled with the trade info. Same idea, you launch a second one, type another trade id, etc etc It is impossible up-front to determine how many of those views you'll need. How would you solve this with the singleton page/viewDescriptor ? I'm quite happy to consider alternatives. Many thanks Benoit > Enable multiple instances of MDI frames for same view. > ------------------------------------------------------ > > Key: RCP-437 > URL: http://opensource.atlassian.com/projects/spring/browse/RCP-437 > Project: Spring Framework Rich Client Project > Type: Improvement > Versions: 0.3.0 > Reporter: Benoit Xhenseval > Attachments: DesktipApplicationPage.java.patch > > Hi > I'd like to propose a patch that is backward compatible with the existing code. > The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1). > At the moment, this is not possible. > This is simply done by looking up for the singleton property in the Spring XML config for the requested view. > If the view is a singleton and an instance already exists, it returns it. > If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one. > I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox. > Thanks > Benoit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Arne L. (JIRA) <no...@at...> - 2006-11-03 10:20:41
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-437?page=comments#action_20621 ] Arne Limburg commented on RCP-437: ---------------------------------- You need to use your own implementation of ViewDescriptorRegistry. You could use something like ViewTrade#1 as viewName and create a new ViewDescriptor with this id if none is present. Don't forget to set the ID!!! > Enable multiple instances of MDI frames for same view. > ------------------------------------------------------ > > Key: RCP-437 > URL: http://opensource.atlassian.com/projects/spring/browse/RCP-437 > Project: Spring Framework Rich Client Project > Type: Improvement > Versions: 0.3.0 > Reporter: Benoit Xhenseval > Attachments: DesktipApplicationPage.java.patch > > Hi > I'd like to propose a patch that is backward compatible with the existing code. > The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1). > At the moment, this is not possible. > This is simply done by looking up for the singleton property in the Spring XML config for the requested view. > If the view is a singleton and an instance already exists, it returns it. > If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one. > I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox. > Thanks > Benoit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Benoit X. (JIRA) <no...@at...> - 2006-11-03 11:08:44
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-437?page=comments#action_20622 ] Benoit Xhenseval commented on RCP-437: -------------------------------------- With all due respect, this sounds OTT. It should be simpler/easier to do it, as I mentioned, when you launch the view/internalFrame, you do NOT know the trade id. One could also conceivably see 2 views with the same trade but in different tabs on the view for instance. Could you elaborate on the registry and may be see if my option may fit in there? Thanks Benoit > Enable multiple instances of MDI frames for same view. > ------------------------------------------------------ > > Key: RCP-437 > URL: http://opensource.atlassian.com/projects/spring/browse/RCP-437 > Project: Spring Framework Rich Client Project > Type: Improvement > Versions: 0.3.0 > Reporter: Benoit Xhenseval > Attachments: DesktipApplicationPage.java.patch > > Hi > I'd like to propose a patch that is backward compatible with the existing code. > The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1). > At the moment, this is not possible. > This is simply done by looking up for the singleton property in the Spring XML config for the requested view. > If the view is a singleton and an instance already exists, it returns it. > If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one. > I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox. > Thanks > Benoit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Arne L. (JIRA) <no...@at...> - 2006-11-03 14:43:49
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-437?page=comments#action_20626 ] Arne Limburg commented on RCP-437: ---------------------------------- Your pageComponent could not be activated throw the code. Whenever you get a ViewDescriptor of one of your pageComponents and call showView on DesktopApplicationPage a new JInternalFrame is created. You should really consider to have one ViewDescriptor for every of your TradeViews. What about this solution: You can control wether to create a new Frame via setting the tradeId. For every TradeId there is exactly one View if this is not desired you should override getId() of your viewdescriptor to return something else that is unique for a single view. public class TradeViewDescriptor extends DefaultViewDescriptor { private int tradeId; [...] public int getTradeId() { return tradeId; } public void setTradeId(int tradeId) { this.tradeId = tradeId; } public String getId() { return super.getId() + tradeId; } } public class TradeView implements View { public int getTradeId() { return ((TradeViewDescriptor)getDescriptor()).getTradeId(); } public void setTradeId(int tradeId) { ((TradeViewDescriptor)getDescriptor()).setTradeId(tradeId); } } public class NonSingletonViewRegistry extends BeanFactoryViewRegistry { private List viewDescriptors = new ArrayList(); public ViewDescriptor[] getViewDescriptors() { ViewDescriptor[] beanViewDescriptors = super.getViewDescriptors(); ViewDescriptor[] viewDescriptors = new ViewDescriptor[this.viewDescriptors.size() + beanViewDescriptors.length]; this.viewDescriptors.toArray(viewDescriptors); System.arraycopy(beanViewDescriptors, 0, viewDescriptors, this.viewDescriptors.size(), beanViewDescriptors.length); return viewDescriptors; } public ViewDescriptor getViewDescriptor(String viewName) { ViewDescriptor viewDescriptor = findViewDescriptor(viewName); if (viewDescriptor != null) return viewDescriptor; viewDescriptor = super.getViewDescriptor(viewName); viewDescriptors.add(viewDescriptor); return viewDescriptor; } protected ViewDescriptor findViewDescriptor(String viewName) { for (Iterator i = viewDescriptors.iterator(); i.hasNext();) { ViewDescriptor viewDescriptor = (ViewDescriptor)i.next(); if (viewDescriptor.getId().equals(viewName)) return viewDescriptor; } return null; } } > Enable multiple instances of MDI frames for same view. > ------------------------------------------------------ > > Key: RCP-437 > URL: http://opensource.atlassian.com/projects/spring/browse/RCP-437 > Project: Spring Framework Rich Client Project > Type: Improvement > Versions: 0.3.0 > Reporter: Benoit Xhenseval > Attachments: DesktipApplicationPage.java.patch > > Hi > I'd like to propose a patch that is backward compatible with the existing code. > The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1). > At the moment, this is not possible. > This is simply done by looking up for the singleton property in the Spring XML config for the requested view. > If the view is a singleton and an instance already exists, it returns it. > If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one. > I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox. > Thanks > Benoit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-09 20:05:24
|
[ http://jira.springframework.org/browse/RCP-437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo updated RCP-437:
-----------------------------
Fix Version/s: 1.x
> Enable multiple instances of MDI frames for same view.
> ------------------------------------------------------
>
> Key: RCP-437
> URL: http://jira.springframework.org/browse/RCP-437
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Benoit Xhenseval
> Fix For: 1.x
>
> Attachments: DesktipApplicationPage.java.patch
>
>
> Hi
> I'd like to propose a patch that is backward compatible with the existing code.
> The patch allows several MDI windows for the same view (say "TradeView", traders would like to see more than 1).
> At the moment, this is not possible.
> This is simply done by looking up for the singleton property in the Spring XML config for the requested view.
> If the view is a singleton and an instance already exists, it returns it.
> If it does not exist or is not a singleton, DesktopApplicationPage.findPageComponent returns null which then indicates to SpringRC to build a new one.
> I'd be grateful if you'd consider it for inclusion in the mdi package in the sandbox.
> Thanks
> Benoit
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|