I have a List with StandardListItem with an icon (the one from THIS example). The StandardListItems got a press event to handle a function now:
<List id="test-list" items="{
path : '/products',
sorter : [{
path : 'prodName',
descending : true
}]
}">
<items>
<StandardListItem title="{prodName}"
description="{prodCountry}"
press="onListPress"
type="Active"
icon="{
path:'price',
formatter:'.getIconFlag'
}"
/>
</items>
</List>
Now I'd like to have a simple Tooltip displayed (showing e.g. the prodName) when clicking on the Icon (and then positioning the tooltip relative to the icon although it is not a seperate control). Problem: The press event is fired for the whole StandardListItem including the icon. I did not find out if this is possible, but based on the markup I think is has to be, because the icon is a seperate DOM element.
´.getIcon()´ just returns the String URI for the icon property, so .. Is it possible to handle a seperate press/click event for the icon "section"?
[EDIT:]
I solved it: What I wanted is the same as in THIS post
I can access the target by:
oEvent.getSource()._event.target
and then look if my target has class "sapUiIcon"
and either return false or call another function.
THX for any advice hwo to access the target information ..