on 11-30-2009 9:55 AM
Hallo SDN
I would like to create custom search functionality . We have created a ABAP function module which would return the search results.
Which UI element should i use to display it like google results.
PS: Every search list should have the format of
Description, hit percentage (100% ..10%) and 3 [operations/actions/link] namely Disply,Update and Delete .
If available in your Web Dynpro version, use a RowRepeater.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a TransparentContainer "SearchResults" with a RowLayout at designtime. After executing the search, set a boolean context attribute "newSearchResults" to TRUE. In wdDoModifyView() check this attribute. If it is TRUE, clear the container, loop over the result list and call a method that adds the UI for a single search result to the container. Reset the flag afterwards.
static void wdDoModifyView()
{
if ( wdContext.currentContextElement().getNewSearchResults() )
{
IWDTransparentContainer container = (IWDTransparentContainer) view.getElement("SearchResults");
container.destroyAllChildren();
foreach (result : searchResults)
{
addResultUI(container, result);
}
wdContext.currentContextElement().setNewSearchResults(false);
}
}
static void addResultUI(IWDTransparentContainer container, SearchResult result)
{
IWDLinkToURL link = (IWDLinkToURL) view.createElement(IWDLinkToURL.class, null);
link.createLayoutData(IWDRowHeadData.class);
link.setTarget(result.getUrl());
link.setText(result.getUrl());
container.addChild(link);
/* etc */
}
Armin
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.