FPM : OVERRIDE_EVENT_GAF method of Component Controller
Hello All
I am not able catch the button evenet value in OVERRIDE_EVENT_GAF method of Component Controller.
What i have done is
1) Created FPM Application with Road Map 4 Mainsteps.
2) In the First Road Map contains view, having two buttons. On click of buttons need to hide MainStpes
Example : On Click of Button1 need to show Step1 Step2 and Step3 means Step4 is hiding
On Click of Button2 need to show Step1 Step3 and Step4 means Step2 is hiding
3)For the above requirement In the View created two actions for two buttons. In Button1 action written below code.
Code for Button1 Action in the View
data: lo_fpm type ref to if_fpm,*lr_event type ref to cl_fpm_event.
create event
lr_event = cl_fpm_event=>create_by_id(
cl_fpm_event=>gc_event_change_step ).
lo_fpm = cl_fpm_factory=>get_instance( ).
lr_event->mo_event_data->set_value(
iv_key = 'B1'
iv_value = 'BUTTON1').
4) onclick of Button 1 when i m trying to get the value of B1 it is coming empty in the OVERRIDE_EVENT_GAF method of Component Controller. Expecting "BUTTON1" written below code
Code for OVERRIDEEVENT_GAF method of Component Controller_
DATA: lo_fpm TYPE REF TO if_fpm,
lr_event TYPE REF TO cl_fpm_event.
get reference to FPM API
lo_fpm = cl_fpm_factory=>get_instance( ).
create event
lr_event = cl_fpm_event=>create_by_id(cl_fpm_event=>gc_event_change_step ).
lr_event->mo_event_data->get_value(iv_key = 'B1' ).
5) Based on condition planning to hide the steps.
IF BUTTON1
Hide Step4
IF BUTTON2
Hide Step2
Please help how to get value in OVERRIDE_EVENT_GAF method of Component Controller onAction of Button
Edited by: CarlinWilliams on Jun 17, 2011 1:56 PM
Edited by: CarlinWilliams on Jun 17, 2011 1:57 PM
Hi Carlin,
You need to ensure that you raise the event:
e.g. here I raise an event to pass some data from an org chart:
lo_event =
cl_fpm_event=>create_by_id( zpa_os_org_struc_flex_n_assist=>c_island_nav_up_requested ).
lo_event->mo_event_data->set_value(
iv_key = zpa_os_org_struc_flex_n_assist=>c_node_selected_for_nav
iv_value = ls_nav_node ).
wd_this->ao_fpm->raise_event( lo_event ).
Then you need to read the event. In the OVERRIDE_EVENT_GAF method you can read the event by referring to
io_gaf->mo_event
e.g.
io_gaf->mo_event_data->get_value( exporting iv_key = zpa_os_org_struc_flex_n_assist=>c_node_selected_for_nav
importing ev_value = ls_node_detail ).
let me know if you need any other help/explanation,
Cheers,
Chris
Similar Messages
-
Call a view's method from Component Controller.
Hi
Is it possible to call a view's method from Component Controller.
Regards
NikhilHi Tummuru,
I have created an event in Component Controller by the name toMenuView. Now I created a method in which this event is getting fired. Foll. is the code of the method.
public void fireToMenuView( )
wdComponentAPI.getMessageManager().reportSuccess("fireToMenuView");
wdThis.wdFireEventToMenuView();
Now I have created an event handler "handleToMenuView" in the MenuView and subscribed the event handler to the event in Component Controller.
The control is reaching to the fire event in component controller but not to the Event handler in view controller.
What am I missing.
Regards
Nikhil -
Calling view controller method from component controller method
Hi,
Is there any way to call view controller method from component controller method?
Thanks,Hi Khandal.
You should not make you component controller dependent from a view controller.
But what you can do is to define an event in the component controller. The view
controller can register for this event.
In the stage where you currently want to call the view controller method just fire
the event. In the event handler method in the view controller you can call the
method then.
Why do you need to call a view controller method? Can you give more details
about the scenario?
Cheers,
Sascha -
Calling view method from component controller
Hi Experts,
How to refer a view method from component controller?if you have the view Instance, then you can call using the view instance. But this is not the correct apporach.
-
Hook methods in component controller vs hook methods in view controller
Hi,
I want to know how WDDoInit in component controller differs from the same in view controller.
How the lifecycle flows in both controllers?
Eg. if i create a method intialize() in both component & view controllers and if i called initalize method in view, which one will be called?
Need to know how the flow works.
Regards,
ManojDear Manoj,
Please check if it is helpful.
The order of execution of standard hook methods when a WDJ application is called the first time is as follows:
1. Component Controller DoInIt()
2. View Controller DoInIt()
3. Interface Window Controller
4. Component Controller DoBeforeNavigation()
5. Component Controller DoModify()
6. Component Controller DoPostProcessing()
After this, if you navigate to some other view, then the order of execution of methods of that New view will be:
1. Component Controller DoBeforeNavigation()
2. New View DoInIt()
3. New View onPlugfromFirstView
4. Component Controller DoModify()
5. Component Controller DoPostProcessing()
Then, if you again navigate back to the first view, then the order of execution of methods is:
1. Component Controller DoBeforeNavigation()
2. New View onPlugfromNewView
3. Component Controller DoModify()
4. Component Controller DoPostProcessing()
Webdynpro - Sequence of Execution
Thanks & Regards,
Patralekha -
Method in Component Controller
Hi,
In when we see the Methods Tab in Component Controller, There One Check Box we can see as "INTERFACE'.
Can you please tell me what is the purpose of that/
Regards
Sandeep.Hi,
this comes in the concept of Cross Compenent usage.
Web Dynpro components are reusable modules. This allows you to build Web Dynpro applications that consist of different components. From within a component, an interface enables you to use the data and functions of another component.
If we mark the method as interface that method will be available in all the other components that we built.we can select that method along with the interface name wich is the compoemt name. -
Calling Component controller method in webdynpro
Hi All,
Is it possible to call a method from component controller to view controller?
Regards,
Sasikalayes it is possible.
hope this would help you
http://help.sap.com/saphelp_nw70/helpdata/en/3b/29933f09a5fb47e10000000a114084/content.htm
Regards,
nag -
Calling component controller's method
Hi,
How can i call component controller's method from a view?
Thanks.Yes, You can call method of component controller from View.
If you have already mapped any context node/attribute between your view and component controller then it means component controller is already added in your view. If you have not done same then you can add component controller by going into the properties of view.
To access the method use following code.
wdThis.wdGet<Your_controllername>Controller().<methodName>();
Regards,
Rohit -
Hi,
I have a method of component controller that call a function via RFC and I have to specify the importing and exporting parameters: how can I do for to specify a parameter as a table?
Tks in advance...Try creating a service call ..it will take care of creating a component controller method, context nodes for function module interface, the service call method created will have automatically genereated code which fetches data from importing params, calling the function module and then binding the data back to exporting param node.
To create service call just right click on your component and select - create service call ; a wizard will guide you then..
Regards
Manas Dua -
Call component controller method from view
Hi
I have created an action in view Thus its event handler is "OnActionDoSomething()"
And, I have a method in component controller "MethodSaySomething()".
Now, how can I call MethodSaySomething() from OnActionDoSomething().
OnActionDoSomething()
// Call MethodSaySomething() defined in component controller
ThanksHi,
To access the methods present in component controller from View , first u need to add the component controller as the required controller.
open the view controller --> switch to propertues tab --> add the component controller as required controller(click add controller).
Now in your action handler , write this below code to add the method:
wdThis.wdGet<COmponent Controller>().MethodSaySomething();
Hope it helps
Thanks and Regards, -
'Build stopped' when NWDS generate import statement in Component Controller
Hi,
I add method in Component Controller the code work fine if the code not require to import class. When the code need to import the class, and NWDS automatically import for them. The error occur like below while the code is complied.
Build stopped due to an error: Compile failed; see the compiler error output for details. [Error: com.sap.tc.buildplugin.DefaultPlugin Thread[Worker-44,5,main]]
I have to delete all import statements in import block like below.
//@@begin imports
import com.sap.demo.employee_exc__wd.wd.comp.employeecomp.wdp.IPrivateEmployeeComp;
//@@end
Conclusion : The code will not be compiled if they have import statement that NWDS automatically generate.
P.S i use NWDS7.2
Please help me solve this issue.
Many ThanksHi John Wu,
First of all thank for your reply. I investigate the root cause and found that i can not import the class from another project (EJB project (Local Home or Local Object)). So i can only import JAVA lib, if i put import statement to import home interface from another EJB project, the code can not be build. What i do is
- Add EJB project in the project build path.
- Add EJB project in Project Reference.
Is thay all?
What task do i need to do more?
There are 2 error show while compling the code.
The 1st one :
Compile failed; see the compiler error output for details.[EXCEPTION]
C:\Users\Thongie\SAP_Workspace\workspace2.jdi\LocalDevelopment\t2\E362EEAA7C591A06D61B111A42AAAE70\default\logs\build.xml:236: Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:114)
at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:57)
at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:195)
at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:167)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
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:597)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)
at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)
at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:318)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1432)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:3875)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.build(BuildJob.java:370)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.doInWorkerThread(BuildJob.java:181)
at com.sap.ide.dii05.util.api.job.JdiJob$1.doInWorkerThread(JdiJob.java:77)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3$1.run(InternalJdiJob.java:199)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3.run(InternalJdiJob.java:208)
at com.sap.ide.dii05.util.internal.job.BusyBackgroundIndicator.showWhile(BusyBackgroundIndicator.java:74)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob.internalRun(InternalJdiJob.java:189)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runInternal(InternalDiiJob.java:306)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runL(InternalDiiJob.java:208)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.run(InternalDiiJob.java:195)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[Error: com.sap.tc.buildplugin.DefaultPlugin Thread[Worker-7,5,main]]
Thw 2nd one :
Build stopped due to an error: Compile failed; see the compiler error output for details. [Error: com.sap.tc.buildplugin.DefaultPlugin Thread[Worker-7,5,main]]
Edited by: Thongie on Jul 17, 2011 7:41 AM -
How can we call the method of used controller?
Hi All,
i created two WDA Applications.( like YWDA1,YWDA2 ) . i am using the component WDA2 in WDA 1.and displaying the one view of WDA2 as popup window in WDA1 on action of one of the input element in the view of WDA1 by using the method l_window_manager->create_window_for_cmp_usage
I have a button on the view of WDA2 which has appear in the popup window...how can i call the method which has binded to that button....and where should i code that...and i need to assign selected value in the popup window to input elemetn of view WDA1
Please help me to resolve this....
Regards,
RaviYou can not directly call view's event handler from other component.
create a method in component controller of the second component and in the button click call the component controller method. ( also make the method as interface so that you can call it from other components )
Now, you can call the interfacecontroller's method
DATA: l_ref_INTERFACECONTROLLER TYPE REF TO ZIWCI__VSTX_REBATE_REQ_WD .
l_ref_INTERFACECONTROLLER = wd_This->wd_CpIfc_<comp usage name>( ).
l_ref_INTERFACECONTROLLER->Save_Rr(
STATUS = '01' " Zvstxrrstatus
save_rr is the method of second component controller -
Inheritance component controller
Hi all!
Usually I use my methods of component controller(like work with popup or display messages) in every WD component.
After create new WD component I copy my methods from another controller to current.
How can I call methods from "parent" component controller in current like in OO?You can create an interface component if you have many children components which you to have a similar interface. This is probably as close to OO style inheritance you can get with Web Dynpro Components. You can't have direct parent/child style class inheritance in WD Components. Perhaps these methods should be in a normal ABAP class and used via the Assistance Class or directly within the controller. That way you could use full class inheritance.
-
Pre,Post,OverWrite Exit for web dynpro ABAP methods of component,view
Hi,
my question is i have created overwrite exit for method of component controller in one enhancement implementaion say ENH1, and i also created overwrite exit for same method in another enhancement implemenation say ENH2, it means i have two different implemenations now,
My questions here is, will both Enhancement implemenations will "execute", if yes in what order..
Please clarify.
Thanks.I'm afraid the information that Manas gave you is incorrect. In an overwrite method, the enhancement completely overrides and replaces the original method. Both versions are NOT executed. This is the risk you run with the Overwrite enhancement - you are choosing to completely replace the SAP delivered logic.
From the Online Help:
The overwrite exit method takes on the signature of the original method and overwrites it. This means that an overwrite exit is executed instead of the original method.
At runtime only one overwrite exit can be active. If several overwrite exits are active, a runtime error occurs.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/dc/e6ba426b81da11e10000000a155106/frameset.htm -
Using popup in Component controller
Experts,
I would like to use the create_popup_to_confirm method in component controller so i could reuse them in other views. The problem i have is the "subscription to the button event". I am assuming the subscription should be done at the view level but how do i link it to the "button_kind" which is at the controller level ?
Thanks
ASujoFor the susbscribe to button event action should be aexisting in one view. and that you need to assign.
you can assign it in comp controller also.
but actions you have to create in the view.
and for reusing the function for creating pop up, create some parameter in it
like 1. for view controller
2. for action names.
then assign the buttons to the events using these paramters.
thanks
sarbjeet singh
Maybe you are looking for
-
it is urgent that i find out how to change these settings otherwise i will be forced to make a complaint. I have never had to make these questions previsouly and never had i had this much trouble just trying to recieve an email to fix the issue
-
Using the local service registry from other applications (VC, GP)
Hi all, I am not sure if this is the appropriate forum, but my problem is the service registry I think. I am facing the problem of using services that I publish to my local service registry from VC and GP. The problem is as follows: I publish the ser
-
ICloud Photo library storage optimisation
I cannot make this think work..! Open , close IPL buttons...! but ...! same storage in my iPhone and in my iCloud..!
-
Why does my iPad not show up in manage usage
Why does my iPad not show up in manage usage?
-
Data in setup tables and qued delta
Hi Samuris' How can I see 1. the data in setup tables 2. Data in qued delta 3.From which table(in R/3) the data is extracted when we schedule a IP for a delta. Do we have any transaction code to view 1,2. Could anyone let me know exact flow of dat