on 12-13-2011 5:04 PM
Hi,
I am working on component ICCMP_BP_SEARCH. Here I have the views BuPaSearch and BuPaSelectCustomer.
Within each of the views I created a new value node ZPARTNER. The CuCo CuCoSearch also got a value node ZPARTNER. Now I binded the nodes of the each view to the node of the CuCo and added an attribute to the CuCo as well.
Now when I perform a search I fill data into the context node of the view BuPaSearch and set the attribute in the CuCo.
In the view BuPaSelectCustomer (html-file) I try to get the current instance of the CuCo to read the attribute and the value node.
I expected the changes of my value node in BuPaSearch to be published to the CuCo and the BuPaSelectCustomer view. Maybe I need to add some coding, but at least the global attribute should be available, no?
When I get the custom controller in the html file (BuPaSelectCustomer) the CuCo is initial. If I access the CuCo inside the BuPaSearch view where it was filled, I have all the attributes and entities I created.
Seems I am wrong in my thinking or I have some mistake in my implementation.
Any idea what I should check or what could have gone wrong?
Thanks for help!
Hello, Benedikt.
Do you get a CuCo as initial. Or CuCo is not initial but your attribute is initial?
How do you try to get CuCo? Please provide some coding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply.
It's not the CuCo being initial but my attribute and the collection wrapper of the value node has only one entry, the empty one which is added in the INIT-method of the context node. So it feels like a second instance of my CuCo as inside the other view I have my collection, attribute etc.
This is my coding to get the CuCo:
DATA: lr_cucosearch TYPE REF TO zl_iccmp_bp_cucosearch_impl.
lr_cucosearch ?= get_custom_controller( 'ICCMP_BP_SEARCH/CuCoSearch' ).
This coding I use in both views. This is wrong? I debugged and it looked like it would search for an instance and then return it instead of creating a second one.
Am I mistaken?
Thanks.
Could you check is this the same instance of CuCo in both cases? For this check ID of lr_cucosearch in both cases (in debugger, there is a number in the second column when you put this lr_cucosearch in the watch area). They should be the same. If yes, then I'd suggest to put a watchpoint on your attribute and after setting it catch the place where it's cleared.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
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.