Skip to Main Content

Tuesday, March 22, 2011

"No data found" info to popup LOV

APEX and jQuery

When you search from APEX popup LOV and search do not bring any result popup LOV window is kind of blank. It is not very informative for end user. Here is how you can change that and add e.g. "No Data Found" text. If you are on APEX 3.x you need load jQuery library in Popup LOV template Page HTML Head.

Go edit your Popup LOV template Home -> Application Builder -> Application xxx -> Shared Components -> Templates.

Add to Popup LOV template Page HTML Head.

<script type="text/javascript">
$(function(){
 var a=$("div.t110PopupBody a");
 if(a.length==0){
  $("div.t110PopupBody").append(
   $("<p/>",{
    "css":{"color":"red","font-weight":"bold"},"text":"No data found!"
   })
  );
 }
});
</script>

Change "t110PopupBody" to class name you have in "Before Result Set" div tag.

See also original post in OTN forum.

Pagination

Comments

No comments yet on this post