Issue 117341 - TabPageContainer: failed to setModel for css.awt.tab.UnoControlTabPage
Summary: TabPageContainer: failed to setModel for css.awt.tab.UnoControlTabPage
Status: CLOSED WONT_FIX
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC All
: P3 Normal
Target Milestone: ---
Assignee: Frank Schönheit
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 18:16 UTC by hanya
Modified: 2013-02-24 21:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
fixed sample code (2.06 KB, application/x-starbasic)
2011-03-15 11:41 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2011-03-11 18:16:12 UTC
I tried to use new tabpagecontainer control with the code written by tbo in the following page: 
http://tools.services.openoffice.org/EIS2/cws.ShowCWS?logon=true&Id=9597&Path=DEV300%2Ftabcontrol

It worked on DEV300m99. But it does not work anymore on DEV300m101 and m102.
I got "General error" in the following line, all errors are shown as "General error" is another problem.

...
tabpagemodel.insertByName("intab",fixedtextModel)
'msgbox tabpagemodel.dbg_properties

tabpage = Createunoservice("com.sun.star.awt.tab.UnoControlTabPage")
tabpage.setModel(tabpagemodel) ' <---- General error
Comment 1 Oliver Brinzing 2011-03-13 09:32:22 UTC
confirming problem
Comment 2 jsc 2011-03-14 07:49:40 UTC
jsc -> oj: i think it's yours
Comment 3 ocke.janssen 2011-03-14 07:53:10 UTC
Please have a look at this one. May be it's a duplicate one. Seems that this could be a problem with your refactoring in toolkit.
Comment 4 Frank Schönheit 2011-03-15 11:41:26 UTC
Created attachment 76104 [details]
fixed sample code
Comment 5 Frank Schönheit 2011-03-15 11:44:57 UTC
Resolving as WONTFIX:
The original sample code relied on an implementation which was buggy, in that tab page models created at the global service factory (via CreateUnoService) always had the Width/Height/PositionX/PositionY/(some more) properties. This was contrary to all other controls: The general rule is that if you want to insert a control/model into a dialog, then you have to use the dialog/model's XMultiServiceFactory.createInstance method.

This code was fixed, so now when you attempt to work with a TabPageModel created via CreateUnoService, instead of dialogModel.createInstance, this fails. (It is completely undoubted that the error handling in this case needs improvement.)

So, in short: The old sample code does not work anymore, and is not expected to work.

The new sample code is attached to this issue here.
Comment 6 Frank Schönheit 2011-03-15 11:45:32 UTC
closing
Comment 7 hanya 2011-03-16 07:21:02 UTC
Thank you I see. And now com.sun.star.awt.tab.UnoControlTabPageModel should have entry in the list of service names from the XMultiServiceFactory by the getAvailableServiceNames method.
Comment 8 Frank Schönheit 2011-03-17 08:10:58 UTC
You're absolutely right - committed as http://hg.services.openoffice.org/cws/dba34d/rev/9b443432fb13. Thanks!
Comment 9 Oliver-Rainer Wittmann 2012-06-13 12:32:20 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.