on 11-19-2008 12:21 PM
Dear Experts,
I have a problem in executing one of my web dynpro components in which it contains a Navigation list. I am explaining the process which i followed. Please guide me.
Initially, I created a web dynpro component, with a view MAIN, and window WD_MAIN.
In the view MAIN, in the context, I have created a node called 'LINK' within which i have created a recursive node with name 'LINK_RECURSIVE' and two attributes 'TEXT' and 'ENABLED'.
I have also created a supply function for the node LINK in the view MAIN.
The code is as follows:
data declaration
DATA lt_links TYPE wd_this->elements_links.
DATA ls_links LIKE LINE OF lt_links.
@TODO compute values
e.g. call a data providing FuBa
ls_links-text = 'Student information'.
ls_links-enabled = abap_true.
APPEND ls_links TO lt_links.
CLEAR ls_links.
ls_links-text = 'Associate information'.
ls_links-enabled = abap_true.
APPEND ls_links TO lt_links.
CLEAR ls_links.
ls_links-text = 'Managers information'.
ls_links-enabled = abap_true.
APPEND ls_links TO lt_links.
bind all the elements
node->bind_table(
new_items = lt_links
set_initial_elements = abap_true ).
In the layout of the view MAIN, i have created a Contextual panel within which i have created a Navigation list.
In the properties of the Navigation list i have binded the property for Item source and Item text accordingly.
Now i created an application for this component, and while TESTING it, the browser hangs, and never resumes at all.
Please help me in solving this issue.
NOTE: I have not written any code in WDDOINIT, and WDDOMODIFYVIEW of the view MAIN.
I have taken the reference of the standard component WDR_TEST_EVENTS to build the component.
Hello ,
Here is the problem in your code
ls_links-text = 'Student information'.
ls_links-enabled = abap_true.
APPEND ls_links TO lt_links.
CLEAR ls_links.
ls_links-text = 'Associate information'.
ls_links-enabled = abap_true.
APPEND ls_links TO lt_links.
CLEAR ls_links.
ls_links-text = 'Managers information'.
ls_links-enabled = abap_true.
APPEND ls_links TO lt_links.
The code below is really important
lo_current_node = wd_context->get_child_node( 'LINK' ).
lo_current_element = lo_current_node->create_element( ).*
lo_current_node->bind_elements( lt_links).
Remove the line below
bind all the elements
node->bind_table(
new_items = lt_links
set_initial_elements = abap_true ).
If you still have problem , please get back to me . I have already implemented it .
Regards
Vivek
PS: Please provide the points if answer is helpful .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vivek,
Thanks for the input, I made the changes to the code as you have suggested me to do it.
As a reason it is giving me a short dump and the error is like this..
"The Invalidate Method Is Called on the Same Node MAIN.1.LINKS.1.LINKS_RECURSIVE During the Supply Method "
I feel this error is because of the context node LINKS.
My context node LINKS is like this.
CONTEXT
|
LINKS |
|-------LINKS_RECURSIVE( Recursive node )
|-------TEXT
|-------ENABLED
I hope you have got the clear idea of the context node LINKS, and suggest me.
NOTE: I have not used any invalidate statement in the code at all.
Thank you
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.