This post is more than 5 years old
7 Posts
0
764
trying to writing down a customize user locator and wants to access this as a conventional manner in wdk
Hi,
i'm trying to create a component, something like 'userlocator'.what i want to do is, when logged in user select some values from locator and click on submit button , this component should be close and control should be transferred on calling component class.
I want to do this , same as usually we perform such task with userlocator,e.g.,
public void onReturn(Form form, Map map) {
.....
if(map != null) {
...
LocatorItemResultSet locatoritemresultset = (LocatorItemResultSet)map.get("_locator_sel");
...
}
...
}
But to achieve this i have to add selected value in locatoritemresultset and then add this object into a map with key('_locator_sel').
But important thing is , how my calling class will acess this map . Because, i'm unable to return this map from my customize user locator class.
Pls suggest me, what i should do and how to achieve this.
your suggestion will be appreciable
Thanks
Shubham
Mohit408
7 Posts
0
November 27th, 2012 17:00
i ve resolved it.
If we want to add this, we simply add r_object_id in LocatorItemResultSet and pass this obj., to method setReturnValue as key value pair("_locator_sel", locatoritemresultsetobj)
This object will be automatically added into map by the method setReturnvalue(), and then in our calling code we access it through map with key mentioned in method as a key of map(or as we access wdk's userlocator).
LocatorItemresultSet rs=new LocatoritemResultSet('r_object_id')
rs.add(“objectids1”);
rs.add(“objectids2”);
rs.add(“objectids3”);
SetReturnValue(“_locator_sel”,rs);
setComponentReturn();