Manage Learn to apply best practices and optimize your operations.

Display Customized Message

Display Customized Message in place of "No Document Found" in embedded view using Java Script.

You Can View User Feedback To This Tip

Display Customized message (In other Languages too) in place of "No Document Found" in Embedded Views

If you don't want to use @dbcolumn as it has a great impact on the server performance for the large databases . Here is a different way using Java Script:

 Create an embedded view within a DIV Tag on your form as shown here: <div id="view"> ------> Mark it as pass thru HTML Your embedded View (Note: Do not select embedded view as Pass Thru HTML) </div> ------> Mark it as pass thru HTML Create the customized message within DIV Tag which you want to display when there is no document in the view as shown here: <div id="msg"> ---------> Mark it as pass Thru HTML Customized message (Note: This line is not pass thru HTML) </div> ----> Mark it as pass Thru HTML Put the following code In JS Header : function HideView() { var tableTags = document.all.tags('tr') ; if (tableTags.length==0) {"visible";"hidden"; } else {"hidden";"visible"; } Put the following code in On Load Event: HideView()



  • Maybe you have designed your $$ViewTemplate as follows: At first you have a table witch contains your own actions (for example some designed buttons). After this table, you have your embedded view (displayed as Java Applet). In this case, you could use the following code (we use JavaScript and CSS):

     Design your $$ViewTemplate as follows: - Table with your actions Put these lines under your table: <DIV ID="vwEmbed"><P> --> Mark it as pass thru HTML Your embedded view (displayed as java-applet) --> Do not mark as pass thru HTML !! </P></DIV> <DIV ID="msg">Sorry. No documents found.</DIV> Put the following code In JS Header : function cstNDFMsg() { var chkH = document.all.tags('h2') ; if (chkH.length==1) {"visible";"hidden"; } else {"hidden";"visible"; } } Put the following code in On Load Event: cstNDFMsg() Put the following code in the HTML HEAD Content: "<STYLE TYPE="text/css">"+ "/* P APPLET is used to resize the ViewTemplate */"+ "p applet {width:100%;height:90%;}"+ "/* H2 is used by Domino for displaying the 'No Documents found' message */"+ "h2 { font: normal Tahoma,Arial,Helvetica,sans-serif 8pt #aa0000; text-align:center; }"+ "/* Customized 'No Document found' message */"+ "#msg {padding-top:5pt;text-align:center;height:40px;font-family:Tahoma,Arial; font-size:16pt;font-weight:bold;border-style:solid; border-width:1px;border-color:#000000; background-color:#ffffff;color:#aa0000;}"+ "</STYLE>"

    You could play with the stylesheet to get your own NO DOCUMENTS FOUND-Style.

    —Christian Weiss 

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...