on 05-11-2011 3:00 PM
Hi,
Probably this question was asked many many times before, but then i probably use the wrong search criteria, because i can't find them.
My question is simple: I am on a header view and depending on an action which i perform there, i want to fill a certain variable. I need the value of this variable in the next screen, which is on item level.
What possibilities do I have to transfer this value? (I already tried with server->request->set_form_field and server->request->get_form_field/data, but this didn't work)
Regards,
Martijn.
Thanks for your quick responses.
I didn't have a look at the custom controller option yet. Importants is that I don't want a value of a context node attribute transfered. I just want to create a simple variable (a boolean) which I can take to the other view.
It concerns the components BT114H_LAM (view OVViewSet) and BT138I_LAM (view OVViewSet).
Now what do I have to with the custom controllers? How do I determine which one I should use? I should create an attribute on one of the custom controllers, but this custom controller is not known in the second view I would guess? How do I read it there?
Regards,
Martijn.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Well here there are 2 different components, so you will have to use component controller, using concept of component interface, component usage etc.
But it seems, you just want one flag - much simpler way is - just create a static variable in the view IMPL class, set it anywhere you want, then you can read in any other view.
Say Class1 has attribute1.
in View 2 in class 2 method, you can write:
value = class1=>attribute1.
I hope that is what you are looking for. Please take care that you clear the value when you are done using it.
Thanks,
Rohit
Martijn,
We refer to static class attributes/methods by using operator =>
Say, class1 has attribute 'name1'.
You want to assign this to attribute 'name2' of class2 (or anywhere else) by writing:
name2 = class1=>name1.
Difference in static and instance variables in that for static variables you need not create object of that class every time to access that class. Same value exists in the session, whereas for instance variables there is a different value for each instance.
We create instance of a class by writing: Create Object lr_object type ref to <classname>.
This is not required for static attributes.
I hope it resolves your query.
Thanks,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It is not clear in which context you are talking about. Could you please specify the view names.
Server get form field etc are used in Core BSP applications generally.
For BSP Workbench based views in the components, to share data between views there is a custom controller, and concept of component controller to share data between different components.
All you have to do is:
1. for your view, check out which context node has the field you want in different view
2. create same context node in custom controller and same context node in second view
3. right click in view 1 context node, bind it to custom controller context node
4. right click in view 2 context node, bind it to custom controller context node
This way, data will automatically flow from one view to another.
Also, to get instance of custom controller anywhere in IMPL class, you can use method get_custom_controller.
I hope it helps.
Thanks,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use custom controller. You can create attributes in custom controller class corresponding to your variables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.