on 07-26-2006 7:19 AM
hi,
i have a problem with table UI.
I have a search criteria and creating the table dynamically for the search criteria.
when i want new search critieria, the dynamically created table is giving problem like
duplicate node , node already exists, cannot add same duplicate child node.
i want the previous dynamically created node to be discarded and new search criteria node should be bind to table when an action button is clicked
can anyone help it out.
wdContext.node<bean>.invalidate();
won't work it out in this case as i need to refresh the table data, which is dynamically created.
when i am using the wdContext.getContext.reset(false);
following error is generated.
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "Caption" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.Caption
at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:702)
at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:40)
at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:168)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractCaption.<init>(AbstractCaption.java:83)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.Caption.<init>(Caption.java:86)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dharmendra,
This is because you are progressing further (deeper) in your code
You may not use same ID for UI controls.
Also when you call destroy() on UI control the ID is released, so you may use it again. However, it seems that you call remove() on UI control's parent but not destroy() on control itself. Btw, this causes memory leaks.
Another advise: never supply concrete element ID in createElement, use
ui_control = wdView.createElement(class, null);
WD will assign unique ID automatically. You may read its value later via ui_control.getId();
VS
dharmendra,
Use wdContext.reset(false);
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dharmendra,
wdContext.getContext().reset(false)
This will remove all dynamically created node / attributes (i.e. structure or metadata).
node.invlidate() removes only elements from node (i.e. data).
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.