How to call view of one application from another application in SAP UI5?
Hi,
I have a main shell application. inside the shell i have called a application project using iframe.
Now from this project i have to access the view from the shell application. I tried getParent() but it returns null.
How do i access view which is not in my project and in a different project?
Yeah view cannot be called independently.
Here in the above post i am just saying call the interface view.
which will call the window and first view will be called.
in the wddoinit of the first view . we will check the interface node and if a particular attribute is set.
that means call is coming from the comp B then you can fire the plug to next view.
this will take the user directly to second view.
but the flow logic then will be as per by comp A only.
means after view 2 it will go to view 3 like that as you have defined in comp A.
so you cannot use it as an independent reusable entity.
thanks
sarbjeet singh
Similar Messages
-
Can I Call method on one JVM from another through a dll?
Let me explain.
I have this java jar file that I can only have one instance of running at any given time. I'm using a shared data segment in a dll to store a bool indicating whether the program is already running or not. If it's already running, I have to not run the second instance and give focus to the current running instance.
The jar file calls a native method "canInstantiate()" on a dll to see if there's already an app running. If there isn't, the env and obj are stored in the shared data segment of the dll and we return true. If there is already an instance of the program running, I want canInstantiate call a function on the current instance of the jar (like a callback) to tell it to request focus. It's not working. Can someone tell me if my code is right?
The .h file
#include "stdafx.h"
#include <jni.h>
#include "CardServer.h"
#pragma data_seg("SHARED") // Begin the shared data segment.
static volatile bool instanceExists = false;
static JavaVM *theJavaVM = NULL;
static JNIEnv* theJavaEnv= NULL;
static jobject instanceObject = NULL;
static jmethodID mid = NULL;
static jclass cls = NULL;
#pragma data_seg()
#pragma comment(linker, "/section:SHARED,RWS")
jdouble canInstantiate(JNIEnv *env, jobject obj);
jdouble instantiate(JNIEnv *env, jobject obj);
jdouble uninstantiate(JNIEnv *env, jobject obj);
void grabFocus();
</code>
The .cpp file:
<code>
#include "MyFunctions.h"
#include <string.h>
#include <stdlib.h>
#include "stdafx.h"
#include <iostream.h>
jdouble canInstantiate(JNIEnv *env, jobject obj)
printf("In canInstantiate!!");
if (!instanceExists)
printf("No instance exists!!");
return (jdouble)0.0;
else
printf("An instance already exists!!");
grabFocus();
return (jdouble)1.0;
jdouble instantiate(JNIEnv *env, jobject obj)
printf("**In CPP: Instantiate!!\n");
cout << "At start, env is: " << env << endl;
cout << "At start, obj is: " << obj << endl;
if (instanceExists == false)
instanceExists = true;
theJavaEnv = env;
instanceObject = obj;
theJavaEnv->GetJavaVM(&theJavaVM);
cls = (theJavaEnv)->FindClass("TheMainClassOfTheJar");
if (cls == 0) {
fprintf(stderr, "Can't find Prog class\n");
exit(1);
mid = (theJavaEnv)->GetMethodID(cls, "grabFocusInJava", "(I)I");
if (mid == 0) {
fprintf(stderr, "Can't find grabFocusInJava\n");
exit(1);
printf("About to call grabFocusInJava\n");
grabFocus();
printf("CPP: After the grab focus command in instantiate!!\n");
cout << "At end, env is: " << env << endl;
cout << "At end, obj is: " << obj << endl;
return 0.0;
else
printf("CPP: Finished Instantiate!!\n");
return 1.0;
jdouble uninstantiate(JNIEnv *env, jobject obj)
printf("CPP: In uninstantiate!!\n");
if (instanceExists == true)
instanceExists = false;
theJavaVM = NULL;
instanceObject = NULL;
printf("CPP: Finishing uninstantiate!!\n");
return 0.0;
else
printf("CPP: Finishing uninstantiate!!\n");
return 1.0;
void grabFocus()
printf("In CPP::GrabFocus!!\n");
instanceObject = theJavaEnv->NewGlobalRef(instanceObject);
cls = (theJavaEnv)->FindClass("CardFormatter");
if (cls == 0) {
fprintf(stderr, "Can't find Prog class\n");
exit(1);
printf("Got the cls id again!!\n");
if (cls == 0)
printf("IT'S INVALID!!\n");
mid = (theJavaEnv)->GetMethodID(cls, "grabFocusInJava", "(I)I");
if (mid == 0) {
fprintf(stderr, "Can't find grabFocusInJava\n");
exit(1);
theJavaEnv->CallIntMethod(instanceObject, mid, 2);
printf("Called grabFocusInJava\n");
</code>
thanks in advanceCan I Call method on one JVM from another through a dll
...The rest of your question merely expands on your title.
And the answer to that question is no.
When you call a method you are executing a "thread of execution." A thread of execution exists only in a single process. It can not exist in another process.
If the dll is doing some interesting things then you could call a method that sets a flag. Data can move between instances. But you would then have to have a thread in that different process monitoring that flag. And sharing data in a dll is not a normal process, so it would have to be coded appropriately.
If all you want to do is set the current focus to the existing application, then that can be done with existing windows functionality. You don't need to do anything special in your dll. You can probably search these forums to find the exact code. If not there are countless examples in windows repositories (like MSDN) on how to do that. -
How to refresh components of one jsf from another jsf (partialTriggers)
This thread begins here:
How to refresh components of one jsf from another jsf (partialTriggers)
My apologies for post in other forum and thanks Frank for reply.
I found a solution before read your post. I'm newbie and I ignore the use of colons. So, for do the problem that I explain in my post I must to change this code:
public backing_home () {
content = new RichPanelGroupLayout();
content.setRendered (true);
String[] partialTriggers = {"menu:menuItem1", "menu:menuItem2", "menu:menuItem3", "menu:menuItem4"}; //All id's of menuItems of the menuBar in menu.jsp
this.content.setPartialTriggers(partialTriggers);
Note that now I don't pass the item ID only. I add "menu:" before the ID. This allows to acces to name container ('menu' is de ID of subview). And that's all. This works!!
Anyway, I test your propuse Frank. Thank you!
WesthWesth,
Yes this code appears to be correct. Was that your question?
--Ric -
How to call more then one smartforms from SE38 ?
Hello Expertise,
Good Afternoon,
Hope all r fine. Do anybody knows,Is it possible to call more than one smartform from SE38?
If possible then how?
Please help me.
Thanks n regards,
Tripod.Hi,
what you meaning with: call more than one...
call & show as smartform (print preview ) > I think that´s not possible
Call & create PDF > show as PDF in IExplorer ? > Yes could work when you crate the PDF > and send it to different Internet explorer
Call & create PDF > show as PDF in GUI ? > Yes could work when you crate the PDF > and send it to different Containers...
Best Regards
Robert -
How to call a procedure with refcursor from another plsql unit
example I created a pkg with the a procedure that returns a REFCURSOR.
Now I need to call this procedure from another pkg and use the refcursor values in other pkg.
Help please.......
PROCEDURE CustomerSite_Get (p_Registry IN VARCHAR2,
p_CustomerNumber IN VARCHAR2, p_Cursor IN OUT t_cursor);
PROCEDURE CustomerSite_Get (p_Registry IN VARCHAR2,
p_CustomerNumber IN VARCHAR2, p_Cursor IN OUT t_cursor)
IS
-- 0903: Include BillToName
BEGIN
OPEN p_Cursor FOR
SELECT S.LOCATION CustomerSite, S.SITE_USE_ID CustomerSiteID, C.CUSTOMER_NAME BillToName
FROM RA_CUSTOMERS C,
RA_ADDRESSES A,
RA_SITE_USES S,
UWA_REGISTRY R,
UWA_REGISTRY_BILL_TO B
WHERE C.CUSTOMER_ID = A.CUSTOMER_ID
AND A.ADDRESS_ID = S.ADDRESS_ID
AND S.SITE_USE_ID = B.SITE_USE_ID
AND R.REGISTRY_ID = B.REGISTRY_ID
AND B.TRIP_BILLING != 'N'
AND R.DELETE_FLAG != 'Y'
AND R.Registry = p_Registry
AND R.CUSTOMER_NUM = p_CustomerNumber
ORDER BY S.LOCATION;
END CustomerSite_Get;
thanks,
Anitha.
Edited by: user521218 on May 6, 2009 1:24 PMHi Anitha,
try this,
-- PKG_A
Procedure CustomerSite_Get( p_Registry IN Varchar2
, p_CustomerNumber IN Varchar2
, p_Cursor IN OUT t_cursor) Is
Begin
PKG_B.CustomerSite_Get( p_Registry
, p_CustomerNumber
, p_Cursor );
End;
-- PKG_B
Procedure CustomerSite_Get(p_Registry IN Varchar2
,p_CustomerNumber IN Varchar2
,p_Cursor IN OUT t_cursor) Is
Begin
Open p_Cursor For
SELECT S.LOCATION CustomerSite
,S.SITE_USE_ID CustomerSiteID
,C.CUSTOMER_NAME BillToName
FROM RA_CUSTOMERS C
,RA_ADDRESSES A
,RA_SITE_USES S
,UWA_REGISTRY R
,UWA_REGISTRY_BILL_TO B
WHERE C.CUSTOMER_ID = A.CUSTOMER_ID
AND A.ADDRESS_ID = S.ADDRESS_ID
AND S.SITE_USE_ID = B.SITE_USE_ID
AND R.REGISTRY_ID = B.REGISTRY_ID
AND B.TRIP_BILLING != 'N'
AND R.DELETE_FLAG != 'Y'
AND R.Registry = p_Registry
AND R.CUSTOMER_NUM = p_CustomerNumber
Order BY S.LOCATION;
End CustomerSite_Get;regards,
Christian Balz -
How to call View of Component A from Compoenent B
Hi Friends,
I have a requirment like:
There are four views in component A and i want to use view2 of Component A in Component B. Can some one tell me how to work out.
Note: All four views are assigned to one window only.
Thanks in Advance
Regards
SankarYeah view cannot be called independently.
Here in the above post i am just saying call the interface view.
which will call the window and first view will be called.
in the wddoinit of the first view . we will check the interface node and if a particular attribute is set.
that means call is coming from the comp B then you can fire the plug to next view.
this will take the user directly to second view.
but the flow logic then will be as per by comp A only.
means after view 2 it will go to view 3 like that as you have defined in comp A.
so you cannot use it as an independent reusable entity.
thanks
sarbjeet singh -
How to Call Methods of one component into another Component
Hi Experts,
I have one requirement...
I have 2 components A and B, i used A comp in B, i need to call Comp A methods in Component B, can anybody give me the syntax?? please...
Thanks and Regards,
Kissna.Hi Manas Thanks for your fast reply,
My question is, for example we have wd_comp_controller or wd_this objects to call methods of view from view and comp controller right.. like this we have any methods to call used component methods? if yes can u please give me the objects syntax?...
Thanks and regards,
Kissna. -
How to call a Java Web Service from another Java package ?
Please, does anybody know a simple way to access to a JWSDP Web Service deployed under Tomcat with another java application ?
I've tried with ServiceFactory and Service class from JaxRPC API but it doesn't work ....
Thanx.What not just invoke it the same you would invoke a remote service? Create a service stub and call a service method.
Mike -
How to defer constraint of one schema from another schema
Hi All,
I am having a requirement of migrating data from one schema(SCHEMA_A) to another schema(SCHEMA_B). So I tried to implement the same using PL/SQL.
Because of foreign key contraint while migrating child table, Oracle throws an error message like parent key not available.
So I tried to set the all contraints to deferred and after completion of migration i planned to set all the contraints to immediate.
But Here I am executing the procedure from schema(SCHEMA_C) which has rights to access SCHEMA_A and SCHEMA_B.
How could I able to defer all the constraint in SCHEMA_B from SCHEMA_C?
Thanks in Advance,
Antany.Yes,
You could run something like this, for foreign keys:
BEGIN
FOR cur_rec IN (SELECT table_name, constraint_name FROM DBA_CONSTRAINTS WHERE OWNER = <owner> AND CONSTRAINT_TYPE = 'R' )
LOOP
EXECUTE IMMEDIATE 'ALTER TABLE <owner>.' || cur_rec.table_name || ' DISABLE CONSTRAINT ' || cur_rec.constraint_name;
END LOOP;
END;
/ -
How connect one client from another client in SAP.
hi
In my company,HR module is in independent client.
So other Module FI want to get HR information.i want to write a function in HR system.
in FI module to call it and return data. (RFC).
how set it ? the two R/3 System can access one another.
how write abap code in report ? please give demo,thank you!t_code sm59.
http://help.sap.com/saphelp_nw04/helpdata/en/22/0424ce488911d189490000e829fbbd/content.htm -
How to rename AW of one schema from another schema?
Hi Folks,
I am trying to rename an Analytical workspace which is in Schema1 from the SYSTEM schema as given below but getting the error "ORA-03001: unimplemented feature"
Enter user-name: system
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter session set current_schema = Schema1 ;
Session altered.
SQL> execute dbms_aw.aw_rename('AWNAME','AWNAME_BKP');
BEGIN dbms_aw.aw_rename('AWNAME','AWNAME_BKP'); END;
ERROR at line 1:
ORA-03001: unimplemented feature
ORA-06512: at "SYS.DBMS_AW", line 1050
ORA-06512: at "SYS.DBMS_AW", line 1073
ORA-06512: at line 1Any solutions for this?
Thanks,
PrabhuWesth,
Yes this code appears to be correct. Was that your question?
--Ric -
Can we call sceen of one program into another?
Hi ABAPers,
I wish to know whether, is it possible to call the screen of one program through another program? I know, calling a subroutine of a program from another is possible but i want to know whether calling screen of one program from another is possible or not?
Also if its possible then how?
Regards,
Sonu.Hi,
We can call the subscreens ...
CALL SUBSCREEN <area> INCLUDING [<prog>] <dynnr>.
The screen of a subscreen that you call is placed in the subscreen area <area> on the main screen.
If you do not specify a program <prog>, the system uses a screen from the current ABAP program. If you do specify a program <prog>, the system uses a screen from the program <prog> for the subscreen. This program is treated in the same way as an external subroutine call. In other words, it is loaded into the program group of the calling program, or, if it is a function group, as its own program group in the same internal session as the calling ABAP program.
Regards
Sudheer -
How to call a method in one JSP from another JSP?
say that I have 2 JSPs.
JSP one has a button.
JSP two has some method that, say, find the square root of the number passed from JPS one.
How to - when click - the button on page one call the method on page two?
Please note that I can not use object binding, but I want passing the actual parameter and call the method on page two.
Please note that this is an update of a previous post on the same topic called "Object scope".
Thank you all very much.No, i dont know how to call other than main methods from other classes
And one more doubt i have i.e. Like in C can we see the execution of the program like how the code is being compiled step by step and how the value of the variable changes from step to step like(Add Watch)......... -
How to Call one EJB from another
Hi all
I am trying to call one EJB in one system from another EJB residing on diferent system...
Both are Stateless session beans ...
I can't use No-args Intialcontext() as i need to specify the Ip address of other system to be looked up.....
So i am using properties Dorg.omg.CORBA.ORBInitlalHost....
But its not looking up..Its telling not bound...But i called it from standalone client remotely...
Am i wrong..?
I hope I am in right path....
I hope ill get reply as fast as possible...
Gopal VHi ken Thanks for replying....
Ya i packed it as a jar (using Export tool in Eclipse3.2)....
I am using SUN AS 9.....
I packed bean1 and bean2 as two different jars in the same domain...
Here is my code...
Bean1:
@Stateless(mappedName="ejb/Second")
public class SecondIMPL implements SecondRemote {
public FirstRemote obj;
public String connect() {
try{
InitialContext ctx= new InitialContext();
FirstRemote obj =(FirstRemote)ctx.lookup("ejb/First");
System.out.println("Client :"+obj.bMethod());
}catch(Exception e){
e.printStackTrace();
return "Check server Log";
}Bean2 :
@Stateless(mappedName="ejb/First")
public class FirstIMPL implements FirstRemote {
public String bMethod() {
return "From First Bean";
Client:
public static void main(String[] args) {
try{
InitialContext ctx= new InitialContext();
SecondRemote obj =(SecondRemote)ctx.lookup("ejb/Second");
System.out.println("Client :"+obj.connect());
}catch(Exception e){
e.printStackTrace();
Here is my Stack Trace...
[#|2007-05-24T18:35:17.214+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=18;_ThreadName=p: thread-pool-1; w: 19;_RequestID=bb4848e7-829a-421d-a560-93659898eb02;|
javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.SecondRemote[Root exception is java.lang.ClassNotFoundException: com.SecondRemote]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:350)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.FirstBean.rediff(FirstBean.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
at $Proxy36.rediff(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
Caused by: java.lang.ClassNotFoundException: com.Second
at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:701)
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:614)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.ejb.EJBUtils.getBusinessIntfClassLoader(EJBUtils.java:568)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:320)
... 31 more
|#] -
How to call one .SWF from another?
How do I call one .SWF from another. I built a very beefy
base .SWF, and want to add music overlay, and an intro slide show
to the exsting Flash animation, but put it in a second .FLA/.SWF
file. How do I call one from the other?
This will be embedded in an HTML file but I assume this is
superfluous to my question.
F.Z.I think you should open that Another SWF (FLA),
and add some actionscript..
For example, you could create a movie clip, and write
actionscript in the
first keyframe:
loadMovie("
http://www.somewebpage.com/movie.swf",
this);
"FredZimmerman" <[email protected]> wrote in
message
news:ftnjas$mj5$[email protected]..
> How do I call one .SWF from another. I built a very
beefy base .SWF, and
> want
> to add music overlay, and an intro slide show to the
exsting Flash
> animation,
> but put it in a second .FLA/.SWF file. How do I call one
from the other?
>
> This will be embedded in an HTML file but I assume this
is superfluous to
> my
> question.
>
> F.Z.
>
Maybe you are looking for
-
Can not view/export a report which has 2 group by field when no data found
Recently I developed a report, which contains 2 group by fields. it runs successfully when the report displays some data. but when there is no data, i cann't view/export this report. It shows nothing by html format and shows "this file cannot be open
-
My iPad no longer allows the Facebook app to work. How do I fix this?
-
Getting this error from DirSync Unable to update this object because the following attributes associated with this object have values that may already be associated with another object in your local directory services: [UserPrincipalName [email prote
-
Stupid Error in Compiling JSP on Tomcat 4.1
Hi, I know I am missing something stupid, but I am not able to compile/view a simple JSP. The code of the JSP is <%@ page language="java" import="builder.*" errorPage="" %> <html> <%builder.MenuBuilder menuBuilder = new builder.MenuBuilder("http://am
-
I have a large library and sevearl Faces already in there. Each one has about 30 or so pics of people I have ID's. When I go to the Faces section for a given person, I dont see it generating very many (if any) new possible photos from the library. I