on 08-14-2007 4:22 PM
I am wondering how to get the tab id of the currently selected tab at runtime? I have read other posts suggesting creating a string context attribute, then set the "selectedTab" property of the tabstrip to this attribute. I have done this, but it is not working. Is there something else I am missing?
Sarah, bind tab`s property "selectedTab" to context attribute and you can access it in any place of view controller. Also try to define onSelect action and event handler (with no implementation).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Exception occured during processing of Web Dynpro application local/CustomerEncounter/CustomerEncounterApplication. The causing exception is nested.
[EXCEPTION]
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException
at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.handleUIElementEvent(HtmlClient.java:964)
at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.updateEventQueue(HtmlClient.java:379)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.prepareTasks(AbstractClient.java:93)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:294)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:752)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:705)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.reflect.InvocationTargetException
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:324)
at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.handleUIElementEvent(HtmlClient.java:956)
... 25 more
Caused by: java.lang.NullPointerException
at com.sap.tc.webdynpro.clientserver.data.DataContainer.removePendingUserInput(DataContainer.java:1238)
at com.sap.tc.webdynpro.clientserver.data.DataContainer.setString(DataContainer.java:1051)
at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.TabStrip.setSelectedTab(TabStrip.java:626)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TabStripAdapter.onTabSelect(TabStripAdapter.java:2750)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TabStripAdapter.onTABCHANGE(TabStripAdapter.java:1184)
... 30 more
Does context node with attribute bound to UI element`s property (selectedTab) have elements?
according to this
public void removePendingUserInput(AttributePointer pointer)
{
/*1234*/ externalFormat.remove(pointer);
/*1235*/ internalFormat.remove(pointer);
/*1238*/ pointer.changed();
}
seems like pointer is null which means that "attribute" instance doesn`t exist.
It seems like if I leave the following line of code out, it works, but as soon as I try to get the value of the attribute it crashes (TabSelection is the attribute name):
String tab=wdContext.currentTableNodeElement().getTabSelection();
I have the attribute also tied to a label so I can see what the value is, and there it is correctly outputting the tab ID. But for some reason, this code causes it to crash.
What I want to do is get the value so I can then use it to determine the next steps.
Hi Sarah,
Looks like you have assigned selectedTab (TabSelection) to custom node attribute. In your case TableNode -> TabSelection.
The cardinality of the node might be 0..1 or 0..n. Thats the reason its throwing NullpointerException.
You can move the TabSelection attribute from TableNode to root node and assign it to selectedTab property, it will work fine.
Regards
Abhilash
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.