Closing Window with component usage in used component
Hi,
I create a popup with the following code.
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window_for_cmp_usage(
interface_view_name = 'W_DEFAULT'
component_usage_name = 'TEST'
* title =
* close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
lo_window->open( ).
Now I need a function which close the window in the component test. Not in the calling component.
Kind regards
Marcus
It is very simple, I used the following code.
DATA:
lo_api TYPE REF TO if_wd_view_controller.
lo_api = wd_this->wd_get_api( ).
DATA: lo_window_controller TYPE REF TO if_wd_window_controller,
lo_window TYPE REF TO if_wd_window.
lo_window_controller = lo_api->get_embedding_window_ctlr( ).
lo_window = lo_window_controller->get_window( ).
lo_window->close( ).
Similar Messages
-
Closing JInternalFrame with Ctrl+F4 not using default close action
If you have a JInternalFrame and set the default close operation to HIDE, when you close the frame with Ctrl+F4, the frame is disposed instead of hidden. Anyone know if this is the way it is suppose to work, or is this a bug?
Assuming the above is correct:
public void keyPressed(KeyEvent e){
if( (e.isControlDown())&&(e.getKeyCode() == 115 ) )doDefaultCloseAction()); rykk -
I accidently closed the window with all my frequently used app tabs, now the only window that opens was an extra one I had opened. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab? edit
DetailsThen the (App) tabs from that window are lost unless you can restore an older copy of the sessionstore.js file (Time Machine?) that has that lost window.
*http://kb.mozillazine.org/sessionstore.js -
I seemed to have picked up malware that opens new windows with advertising.
How do I stop malware which opens new windows with advertising links, I use a mac mini with Yosemite OS X 10.10
Seee:
Adwaremedic: Removes all known adware from your Mac -
How to use multi async method in Windows Runtime Component (C#)
I want to migrate an async method into Windows Runtime Component.
CookieContainer cc = await utility.GetCookieContainer();
But the content of async method still contains async methods.
public async Task<CookieContainer> GetCookieContainer()
if (stsAuthToken != null)
if (DateTime.Now > stsAuthToken.Expires)
this.stsAuthToken = await GetMsoStsSAMLToken();
AuthCookies cookies = await GetAuthCookies(this.stsAuthToken);
CookieContainer cc = new CookieContainer();
Cookie samlAuthCookie = new Cookie("FedAuth", cookies.FedAuth)
Path = "/",
Expires = this.stsAuthToken.Expires,
Secure = cookies.Host.Scheme.Equals("https"),
HttpOnly = true,
Domain = cookies.Host.Host
cc.Add(this.spSiteUrl, samlAuthCookie);
Cookie rtFACookie = new Cookie("rtFA", cookies.RtFA)
Path = "/",
Expires = this.stsAuthToken.Expires,
Secure = cookies.Host.Scheme.Equals("https"),
HttpOnly = true,
Domain = cookies.Host.Host
cc.Add(this.spSiteUrl, rtFACookie);
this.cookieContainer = cc;
And even GetMsoStsSAMLToken and GetAuthCookies contain async methods...
How to migrate it?Hi Matt,
I'm sorry for my unclear description.
My WinRT Component is for Javascript. If I use folloiong codes, error occurs.
public static async Task<bool> GetInternal(string url, string username, string password)
bool r = await AuthUtility.Create(new Uri(url), username, password);
return r;
The error is
SharePointWindowsRuntimeComponent.Common.GetInternal(System.String, System.String, System.String)' has a parameter of type 'System.Threading.Tasks.Task<System.Boolean>' in its signature. Although this generic type is not a valid Windows Runtime type,
the type or its generic parameters implement interfaces that are valid Windows Runtime types. Consider changing the type 'Task' in the method signature to one of the following types instead: Windows.Foundation.IAsyncAction, Windows.Foundation.IAsyncOperation,
or one of the other Windows Runtime async interfaces. The standard .NET awaiter pattern also applies when consuming Windows Runtime async interfaces. Please see System.Runtime.InteropServices.WindowsRuntime.AsyncInfo for more information about converting managed
task objects to Windows Runtime async interfaces.
Some articles said, Task<T> is not WinRT type and should be converted to IAsyncOperation<T>. Only stirng, int, bool, object, array of above types and some 'simple' type can be used. (The
related article)
Then I try to convert Task<bool>, but the codes don't work.
Above is why I ask this question.
If async method can be used in WinRT component directly, please let me know why I got above error.
Thanks. -
When you attempt to deploy a windows 10 C++ Universal app that has a reference to a Windows Runtime component, to a Remote Machine (windows 10 machine), you will get an error message instead of successful deployment.
Right click solution, Go to Properties -> Configuration Properties -> Configuration - Uncheck "Deploy" checkbox for the Windows Runtime Component project. Then retry deployment to remote machine.
-
Closing window of web dynpro application with exit-plug don't run in the EP
Hi everybody,
I want to close a window that contains a Web Dynpro with a close button, because it's used and create as a popup from an other iView (that's not created with web dynpros) in the EP. I read the different threads how to close a window in web dynpro, like JavaScript in WD
I create a HTML file with the javascript code to close the window and it works fine, when I start the application separately.
If I used it in the portal and click the close button I get the following error message:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!
I tried also: ...wdFirePlugExit("javascript:self.parent.close();") or some other javascript code, but got the same error message.
Then I tried:
WDPortalNavigation.navigateAbsolute(url,WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null,(String) null);
instead of fireing the outbound plug in the action of the close button
(...InterfaceViewController().wdFirePlugExit(url);)
but than a new window with the EP open and the old is still there!
We use the NWDS2004s an the EP 7.00.
It must be possible to close a (this) window!
Thanks for any hint
christianHi,
This is what you can do:
1. You have already created the HTML file with the necessary javascript in the foloowing folder structure :
src->Mimes->Components-><your component name>-><fileName.html>.
2. Create a new iView of type URL in your portal.
3. Get the absolute URL of this HTML file inside your project. This will be in the following format:
http://<server>:<port>/webdynpro/resources/sap.com/<development ComponentName>/Components/<namespace>/<fileName>.html
You can find it thus:
try {
String u = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getDeployableObjectPart(),"filename.html");
wdComponentAPI.getMessageManager().reportSuccess(u);
} catch (WDURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
4. Now enter this URL string as the URL for the iview.
5. Do a normal portal navigation to this iview on-click of the button.
Regards,
Satyajit. -
Accessing Windows Script Component (.wsc) methods from CVI
Hi,
I am trying to gain access to an already existing script that from Labwindows. It is a .wsc, Windows Script Component, file. It's in my System32 folder and I have registered it. The only way I could find to get the functions into labwindows was by generating a .tlb file from it using a windows utility. I then used the ActiveX control wizard in CVI to import the type library. The functions all seem to show up in the instruemnet panel. However, when I try get an automation reference I get an error (: error code= -2147467262). There is no dialog box or anything that comes up with this error code, I do error checking in my code and print them to my log, thats where I'm pulling the error code from. The problem is similar to what is described by the third post in this thread:
http://forums.ni.com/t5/LabWindows-CVI/How-to-integrate-windows-scripting-components-written-in-jscr...
Here is a reference to some info on WSC's:
http://msdn.microsoft.com/en-us/library/dd79w6c8(v=VS.85).aspx
Here is the call I am trying to make that fails:
error = JDDiag_NewAutomation (NULL, 1, LOCALE_NEUTRAL, 0, &JDDiag);
and the protype that the controller wizard generates from the .tlb:
/*-------------------- Prototype ---------------------*/
HRESULT JDDiag_NewObj (const char *Server,
int Support_Multithreading, LCID Locale,
int Reserved,
CAObjHandle *Object_Handle);
Also, here is the code in JScript that would accomplish what I am trying to do in CVI:
JDDiag = new ActiveXObject( "JDDiagnostic.WSC" );
JDDiag.Init( objController );
If anyone has any ideas/knows what I am doing wrong, or if this is even possible please let me know. Also, the WSC is written in JScript, but I don't feel like that should matter because according to the Microsoft documentation they can be written in any scripting language and the COM should take care of things.
Thanks,
Josh MeyerUsing Windows 7 Home Premium
I have read this thread carefully and followed the recommendations, and I still get the MsgBox error:
The module "scrobj.dll" was loaded but the call to DllInstall failed with error code 0x80004005
For more information about this problem, search online using the error code as a search term.
I even took these additional steps in the command prompt:
>cd C:\Windows\System32
>regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
>cd C:\Windows\SysWOW64
>regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
I executed the identical command after changing to each of the directories. Each time I received the same error
Yes - that is what happens when you "necro" half century old threads.
The object I obsolete and unsupported. The error - 0x80004005 indicates that you are not an admin. It may also indicate that you are using an unsupported module.
¯\_(ツ)_/¯ -
Can anyone tell me what the possible values are for the CurrentState value of a package under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages
For Example:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_1_for_KB2900986~31bf3856ad364e35~amd64~~6.1.1.1
"CurrentState"=dword:00000070
I believe that this equates to "Installed", but I am looking for somewhere that documents this.
I located http://technet.microsoft.com/en-us/library/cc756248%28v=ws.10%29.aspx and the related events pages show values like 0, 4, 5, 6, 7. Not x00000070 (112) etc
Thanks In Advance
JimHi Jim,
Thank you for your post.
From your description, I see that you want to know if there is a related official article which introduces the value of CurrentState (dword:00000070) under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages.
Please let me know if I have misunderstood anything.
Based on my research, I'm sorry that it appears that there is not a corresponding official document which can meet your requirement. However, according to my knowledge, 99% of the time the value will be 00000070 for CurrentState.
Currently, I'd like to confirm that if there is any real problem occurs due to the registry value? If so, then we may find another way to help with you.
Please feel free to let me know if you have any questions. Thank you for your time and understanding.
Best Regards,
Sophis Sun
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
Finder opens a new window with tabs in the last closed window loaded automatically
As the title says, I've found this happens more than a few times for some change. Maybe every time, I didn't count. Say, I closed a window with 3 tabs opened, then next time when I click finder to open a new window, I will find the 3 tabs loaded in the new window automatically. I am wondering if it is a new feature or bug. If it is not right, would anyone give me some suggestion to correct, if possible? Thanks.
Yup. I think bring convenience or not is supposed to be the fundamental difference bugs and features.
Convenience also comes with users' habit. I am sure I will get used to the new way as time goes by. -
Yesterday my Firefox browser was updated without me even noticing it. I closed the only 2 windows that were open, both having a bunch of tabs, because I turned off my PC. Today I opened up Firefox, clicked ''Restore previous session'' which opened up one of these 2 windows. But when I wanted to access the list of ''Recently Closed Windows'' it didn't open. It only shows a small square as if it's there, but it doesn't show anything. I can open up ''Recently Closed Tabs'' but that doesn't help me. I now only have 1 window, but the other one had some important tabs opened in it as well, so I could really use some help.
Thanks in advance.Sorry to hear about this problem and for the delay in getting back to you.
Firefox stores your open windows and tabs in a file named sessionstore.js in your currently active settings folder. Could you check that folder and back up all of the sessionstore files as the first step.
Open your current Firefox settings (AKA Firefox profile) folder using
Help > Troubleshooting Information > "Show Folder" button
If you find a file named sessionstore but not sessionstore.js, Windows may be hiding file extensions from you. To work with files as accurately as possible, I suggest unhiding them. This Microsoft support article has the steps: [http://support.microsoft.com/kb/865219].
''(In Windows 8.1, you should be able to access the Folder Options dialog by tapping the Alt key to show the menu bar, then using the Tools menu. Click to the View menu and scan down for the hidden files/folders option.)''
Assuming you still have a sessionstore.js or sessionstore.bak file that would have your pre-update session, check out these threads for different ways to rescue the lost URLs from the sessionstore.js or sessionstore.bak file:
* Using Firefox's Browser Console (formerly known as Error Console): https://support.mozilla.org/questions/969046#answer-471950
* Using Firefox developer tool "Scratchpad": http://forums.mozillazine.org/viewtopic.php?f=38&t=622036&start=60&p=12098147#p12098147
* Using a third party website: https://firefox-session-restore.herokuapp.com/ -
Service Manager "Error communicating with component" after moving SQL servers
We just moved our SCCM database to a new SQL server and ever since, I've been getting stumped as to why I'm getting the following error each time I try to query the status of anything under the SQL server:
Error communicating with component
Admittedly, I'm a total novice when it comes to SCCM and I was doing this under the loose supervision of my predecessor (this is his last week). I appreciate anyone offering any advice as to where I should start, and I apologize I'm not knowledgeable
enough yet to know exactly what info to provide you with initially!
Thanks!Thanks for the quick replies!
@Peter: Currently using SCCM 2012 R2 running on a 2008 server, with the database having moved from SQL 2010 to 2012. We have a single primary site with 5 additional distribution points supporting around 260 users.
We did only change our SQL server and the guide you posted is the exact one we used. Everything seemed to look exactly like the guide. Afterwards, when checking the Configuration Manager Server Manager, under Servers, it had my SCCM server and
new SQL server both listed. The components listed under my SQL server were as follows:
SMS_COMPONENT_MONITOR
SMS_EXECUTIVE
SMS_MP_FILE_DISPATCH_MANAGER
SMS_OUTBOX_MONITOR
SMS_SITE_SQL_BACKUP_SCCM01
SMS-SRS_REPORTING_POINT
However, when we query those components, we get "Error communicating with component" on all of them except SMS_SITE_SQL_BACKUP_SCCM01. I'm slightly suspicious of our certificates but I'm not well-versed enough with them to troubleshoot effectively
on my own. -
Cant get the reference of the main window of component 1 into component 2
Hi All,
I am using Component 2 as reusable component in Component 1in webdynpro-ABAP.
I am not able to get the reference of the main window of component 1 in component 2 .
Pls help.
Thanks,
AkshathaHi
You can get the reference of the main window by getting the reference of the interface window generated for the main window.
Thanks
Vijay -
Lately, I've been getting a blue screen in the midst of working and have to do a cold reboot to end it. Seems to happen when I'm closing windows or quitting applications. Not always, but sporadically. What causes this? I'm using 10.6.8 on early 2011 MBP. Thanks for any help/advice!
You have 10.6 on that machine, I suggest you stick with it for performance, third party hardware and software reasons as long as possible.
Consider 10.8 (not 10.7) when it's released, because 10.7 and 10.8 will require a new investment in software and newer third party hardware as it requires newer drivers the old machines won't have. (forced upgrade because of software, really nice of them)
http://roaringapps.com/apps:table
Far as your Safari problem do these things until it's resolved:
1: Software Update fully under the Apple menu.
2: Check the status of your plug-ins and update (works for all browsers) also install Firefox and see if your problems continue. You should always have at least two browsers on the machine just in case one fails.
https://www.mozilla.org/en-US/plugincheck/
Flash install instructions/problem resolution here if you need it.
How to install Flash, fix problems
3: Install Safari again from Apple's web site
https://www.apple.com/safari/
4: Run through this list of fixes, stopping with #16 and report back before doing #17
Step by Step to fix your Mac -
Serializing text with component
(Serializing text with component)
The text is just ascii text, but it could be a considerable size (like 64k). The purpose would be to serialize, and then de-serialze all of this custom information I need for that component (and some other stuff). An example would be to save a list of names with my 'Name' component.
I don't see any evidence that it is possible...
Thanks,
JRWell, imagine if we had to do serialization in this
manner (i.e. manually). Not a pretty picture in my
opnion...sure, that's why the API exists... don't take it the other way round and apply serialization to every single piece of data
why do you think that serialization is easier btw ? here's the non-serialized version :
Writer writer = new FileWriter(filename);
writer.write(value); // I assume your text is available in a String named 'value'
writer.close();and here it is with serialization :
JButton container = new JButton(value);
FileOutputStream fos = new FileOutputStream(filename);
ObjectOutputStream outputStream = new ObjectOutputStream(fos);
outputStream.writeObject(container);
outputStream.close();Serialization helps you serialize complex objects (like graphical components) easily. It's a relatively heavy mechanism (compared to regular file writing) and shouldn't be used as a standard way of writing text to a file.
Maybe you are looking for
-
up date question
-
GL: YTD Global Consolidation in 11.0.3? Help!
hey all. our CFO has a problem with the way the 'standard' oracle consolidation handles multi-currency sets of books. when you revalue, translate and consolidate on a monthly basis you lose the year-to-date forex visibility and exposure. basically, i
-
Can anyone send me a link to a downloaqd site for Lightroom 5.0 which doesn't involve my Creative Cloud account? thank you!
-
Re: Claim Your Adobe Licensing Product Upgrade
Dear Sir, I received the email from your company about the claim for the Adobe Licensing Product Upgrade. I have log-in to the webpage with the coupon no. and find the coupon is already being deleted. Please help to check if the coupon is deleted or
-
IPhone 4, Stopped Vibrate After OS Upgrade
Hi, My question has two parts: 1. My IPhone 4 simply stopped vibrate after a software upgrade, i did everything i restart it stop start the vibrate button but nothing helped, is there anything i can do? 2. I leave in Israel and there is no Apple stor