<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6032286075039821028</id><updated>2011-11-14T21:01:51.532-05:00</updated><category term='SSJS'/><category term='Dojo'/><category term='Security'/><category term='Repeat Control'/><category term='Pager Control'/><title type='text'>XPages - Runtime</title><subtitle type='html'>Something I learnt and might be of your interest</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.mydominolab.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-2474038451510303697</id><published>2011-10-25T18:52:00.000-04:00</published><updated>2011-10-25T18:52:39.686-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>XPages: sessionAsSigner &amp; sessionAsSignerWithFullAccess mix-up (Xpages BUG??)</title><content type='html'>I spent around 3 days chasing a [TypeError] exception while trying to delete a document. According to the IBM documentation, sessionAsSigner works with the effective (web) access of the Xpage signer. &lt;br /&gt;&lt;br /&gt;If my basics are not wrong, a User with Editor access should be able to delete a document even if that person's name or role or group is not in one of the authors field of the document. I logged in as me (I myself is the signer too, no other developer is working in my database) and tried to delete a document with the sessionAsSigner access. It didn't let me delete (You are not listed as one of the authors error). I have Manager access in the ACL and the "Maximum internet name &amp;amp; password" settings was Editor.&lt;br /&gt;&lt;br /&gt;According to the IBM documentation, sessionAsSignerWithFullAccess should give admin access to the data (So it seems like the sessionAsSigner is not applicable to the "documents" in which case the above behavior is correct).&lt;br /&gt;&lt;br /&gt;So I used the sessionAsSignerWithFullAccess to get the database object. Still no luck on deleting the document (same not authorized error). After a lot of trial and error, it appears to me that it is a mix-up issue between sessionAsSigner and sessionAsSignerWithFullAccess.&lt;br /&gt;&lt;br /&gt;Here is the code for reference (the replica ids are fake)&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #D9D9D9; border-collapse: collapse; border: none; mso-border-alt: solid #548DD4 .5pt; mso-padding-alt: 5.75pt 5.75pt 5.75pt 5.75pt; mso-yfti-tbllook: 1184;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid #548DD4 1.0pt; mso-border-alt: solid #548DD4 .5pt; padding: 5.75pt 5.75pt 5.75pt 5.75pt; width: 479.5pt;" valign="top" width="639"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-family: 'Courier New'; font-size: 10pt;"&gt;function&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;   removeDocument() {&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-family: 'Courier New'; font-size: 10pt;"&gt;var&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;   dbA=sessionAsSigner.getDatabase(&lt;/span&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New'; font-size: 10pt;"&gt;""&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New'; font-size: 10pt;"&gt;""&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbA.openByReplicaID(@DbName()[0],&lt;/span&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"85XXXXE2005BXXXX"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-family: 'Courier New'; font-size: 10pt;"&gt;var&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;   dbB=sessionAsSignerWithFullAccess.getDatabase(&lt;/span&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New'; font-size: 10pt;"&gt;""&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,&lt;/span&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New'; font-size: 10pt;"&gt;""&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbB.openByReplicaID(@DbName()[0],&lt;/span&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"85YYYY500046YYYY"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-family: 'Courier New'; font-size: 10pt;"&gt;var&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;   vw=dbB.getView(&lt;/span&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"($All)"&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-family: 'Courier New'; font-size: 10pt;"&gt;var&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;   doc=vw.getFirstDocument();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.remove(&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-family: 'Courier New'; font-size: 10pt;"&gt;true&lt;/span&gt;&lt;/b&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;If a previous code is getting a sessionAsSigner, then a subsequent attempt to access the sessionAsSignerWithFullAccess gives only a sessionAsSigner level of access. &lt;br /&gt;&lt;br /&gt;If I change the first line of code to get the dbA from session (instead of sessionAsSigner), then the sessionAsSignerWithFullAccess on line 3 gets the full access as expected.&lt;br /&gt;&lt;br /&gt;Has anyone faced this issue before??  I am thinking that it is a bug on the implementation of this feature. This issue was there on 8.5.2 also (We recently upgraded to 8.5.3).&lt;br /&gt;&lt;br /&gt;The sessionAsSigner need not be in the same script to reproduce this issue. If anywhere else in the code, a sessionAsSigner is accessed before calling the delete code, the same issue happens.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-2474038451510303697?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/2474038451510303697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2011/10/xpages-sessionassigner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/2474038451510303697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/2474038451510303697'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2011/10/xpages-sessionassigner.html' title='XPages: sessionAsSigner &amp; sessionAsSignerWithFullAccess mix-up (Xpages BUG??)'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-8662449070614052588</id><published>2011-03-15T18:31:00.000-04:00</published><updated>2011-03-15T18:31:53.458-04:00</updated><title type='text'>XPages - Difference between xp:this.data (xp:dominoView) and xp:dataContext usage?</title><content type='html'>One of the useful thing I learnt at a quick glance over the book ("&lt;i&gt;Mastering XPages&lt;/i&gt;") so far is the &lt;b&gt;dataContext&lt;/b&gt;. In fact, I was thinking how can some complex computation be done in one place in the XPage and then reference that computed object anywhere else in the page. dataContext is just what I needed.&lt;br /&gt;&lt;br /&gt;Now that I use it extensively in my code, I kind of started thinking that the &lt;i&gt;xp:this.data&lt;/i&gt; is also almost like a dataContext. (I may be totally wrong, but then I need someone to tell me that). And I had to use the &lt;i&gt;xp:dominoView&lt;/i&gt; and a &lt;i&gt;dataContext &lt;/i&gt;variable as the value of a repeat control conditionally. You might be wondering, what made me think to do something like that. Here is the story.&lt;br /&gt;&lt;br /&gt;I have built a re-usable custom control (using &lt;i&gt;xp:dominoView&lt;/i&gt; as the repeat control value) and I needed to implement a search inside the single category. I know that the search will just ignore the “&lt;i&gt;categoryFilter&lt;/i&gt;” or the “&lt;i&gt;keys&lt;/i&gt;”. Then the only way for me is to add the single category as a part of the view search query. Unfortunately, the single category column is complex and it is hard to come up with a generalized search syntax.&lt;br /&gt;&lt;br /&gt;That’s when I thought of using a dataContext like the following as the repeat control value &lt;b&gt;&lt;i&gt;when the search is on.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div style="text-align: -webkit-auto;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #F2F2F2; border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;   &lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:dataContext&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;span style="color: #7f007f;"&gt;var&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"dcSearchResults"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;#{javascript:var   db:NotesDatabase=session.getDatabase("","")&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;db.openByReplicaID(sServerName,   sReplicaID );&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;var vw=db.getView("view1");&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;var   dc=vw.getAllDocumentsByKey("key1");&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;return   dc.FTSearch("some query"); /*Code not tested*/&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;}&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;]]&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:dataContext&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:this.dataContexts&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;The dominoView is defined like the following.&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;  &lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #F2F2F2; border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;   &lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:this.data&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:dominoView&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;span style="color: #7f007f;"&gt;var&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"dominoView"&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #7f007f;"&gt;categoryFilter&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"#{javascript:compositeData.SingleCategory}"&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #7f007f;"&gt;databaseName&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"#{javascript:compositeData.Database}"&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #7f007f;"&gt;viewName&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"#{javascript:compositeData.ViewName}"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:dominoView&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:this.data&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The repeat control value was originally the following.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;  &lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #F2F2F2; border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;   &lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:repeat&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;span style="color: #7f007f;"&gt;var&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"ViewEntry"&lt;/span&gt;&lt;/i&gt;   &lt;span style="color: #7f007f;"&gt;disableTheme&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"true"&lt;/span&gt;&lt;/i&gt; &lt;span style="color: #7f007f;"&gt;id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"rptViewBody"&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #7f007f;"&gt;value&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"#{dominoView}"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The value is modified as the following so that depending on if the search is on/off, the repeat control will get a different array to loop through. The search result rows displayed correctly when search was on, but as feared the dominoView didn’t display any rows when search was off.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;  &lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #F2F2F2; border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"&gt;   &lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"&gt;&lt;span style="color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;xp:repeat&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt; &lt;span style="color: #7f007f;"&gt;var&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"ViewEntry"&lt;/span&gt;&lt;/i&gt;   &lt;span style="color: #7f007f;"&gt;disableTheme&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"true"&lt;/span&gt;&lt;/i&gt; &lt;span style="color: #7f007f;"&gt;id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"rptViewBody"&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-align: justify; text-autospace: none;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;"&gt;&lt;span style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #7f007f;"&gt;value&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"#{javascript:isSearchOn()!=true?dominoView:dcSearchResults}"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So, it appears that the xp:dominoView cannot be mixed with other code like a dataContext. It has to be a simple &lt;i&gt;“#{dominoView}”&lt;/i&gt; or &lt;i&gt;“#{javascript:dominoView}”&lt;span class="Apple-style-span" style="color: #444444;"&gt; (dominoView is the name of the variable).&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Or am I missing something here? (I have posted this &lt;a href="http://www-10.lotus.com/ldd/xpagesforum.nsf/topicThread.xsp?action=openDocument&amp;amp;documentId=49FA93C45D1595CD852578540061B8EF"&gt;question &lt;/a&gt;on the xpages forum too.)&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-8662449070614052588?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/8662449070614052588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2011/03/xpages-difference-between-xpthisdata.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8662449070614052588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8662449070614052588'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2011/03/xpages-difference-between-xpthisdata.html' title='XPages - Difference between xp:this.data (xp:dominoView) and xp:dataContext usage?'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-4921999372498756524</id><published>2011-03-14T20:08:00.001-04:00</published><updated>2011-03-14T20:08:00.415-04:00</updated><title type='text'>XPages Partial Refresh: Some day you will run into this nasty javascript issue with Internet Explorer.</title><content type='html'>I usually keep the client ids of the controls in a global JavaScript variable (JSON Object) so that they can be referenced in the client side JavaScript functions easily. Recently I did a &lt;a href="http://docs.dojocampus.org/dijit/Dialog"&gt;dijit.Dialog&lt;/a&gt; popup from a XPage that worked just fine in Firefox (as always). Hoping that it should also work in the Internet Explorer, I did a test and not so surprisingly, the dialog didn't show up as a dialog.&lt;br /&gt;&lt;br /&gt;I took a copy of the database before I start messing with the code during my debugging exercise. And later, I figured out that the javascript code in the partial refreshed custom control didn’t fire as expected. Also, it turned out that the global object I defined in the cc is showing as &lt;i&gt;undefined &lt;/i&gt;in the debugger tool.&lt;br /&gt;&lt;br /&gt;I did some research and found the following blog that nicely listed few different scenarios where IE breaks the JavaScript.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ragrawal.wordpress.com/2007/10/25/top-5-reasons-why-ie7-is-complaining-about-your-javascript/"&gt;http://ragrawal.wordpress.com/2007/10/25/top-5-reasons-why-ie7-is-complaining-about-your-javascript/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I had already faced the&amp;nbsp;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, sans-serif; font-size: 12px; line-height: 13px;"&gt;2&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, sans-serif; font-size: 12px; line-height: 13px;"&gt;&lt;sup&gt;nd&lt;/sup&gt;&lt;/span&gt;&amp;nbsp;scenario (Comma issue), so that&amp;nbsp;isn't&amp;nbsp;this time. But my bad, I didn’t declare my variable with the “var” keyword. Fixed it, and did a testing, still the&amp;nbsp;JavaScript&amp;nbsp;code didn’t fire.&lt;br /&gt;&lt;br /&gt;Then I noticed that the script block is almost at the top of the custom control preceded by the &lt;i&gt;dataContext &lt;/i&gt;and &lt;i&gt;data &lt;/i&gt;tags. So that means, the html output has the &amp;lt;script&amp;gt; as the first tag which is the first scenario listed in the above mentioned blog.&lt;br /&gt;&lt;br /&gt;I put a div just above the script block and then the&amp;nbsp;JavaScript&amp;nbsp;started working. Have I not come across that blog, I would have gone with some work around without really understanding the cause.&lt;br /&gt;&lt;br /&gt;Here is the code that I put in the custom control immediately after the&lt;b&gt; xp:view&lt;/b&gt; tag.&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Geneva, sans-serif; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; border-collapse: collapse;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(153, 204, 255); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(153, 204, 255); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(153, 204, 255); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(153, 204, 255); border-top-style: solid; border-top-width: 1pt; padding-bottom: 5.75pt; padding-left: 5.75pt; padding-right: 5.75pt; padding-top: 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;div&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;style&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"display:none"&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;-IE Hack-&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;div&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman';"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-4921999372498756524?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/4921999372498756524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2011/03/xpages-partial-refresh-some-day-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/4921999372498756524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/4921999372498756524'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2011/03/xpages-partial-refresh-some-day-you.html' title='XPages Partial Refresh: Some day you will run into this nasty javascript issue with Internet Explorer.'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-1668748726841370594</id><published>2010-10-25T09:00:00.001-04:00</published><updated>2011-11-14T21:01:51.574-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Repeat Control'/><title type='text'>Repeat Control – A better pagination (Version 8.5.1)  (An Update)</title><content type='html'>This is an update on the last week's &lt;a href="http://www.mydominolab.com/2010/10/repeat-control-better-navigation.html"&gt;post&lt;/a&gt;. I made few minor changes to the pagination. The combo box with any available page of results to pick from is great, but it is a little inconvenient to always pick from the combo if the users want to go to the previous or next pages. So I added a Previous and Next actions.&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;All I had to do was to unhide the Pager control and then remove the controls except Previous and Next. When clicking Previous/Next I have to decrease/increase the page number in the drop down also.&amp;nbsp;Everything&amp;nbsp;worked with a few lines of code on the Default Value of the Combo Box.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;But once a page number is selected from the drop down, the default value code of the combo will no more fire. That means, everything works fine until the drop down is used for navigating to another page. Afterwards, the Previous or Next actions doesn't update the page number in the drop down.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;So that means, I need to have a piece of code on the Previous/Next action's onClick event to set the value of the combo box. Unfortunately, this event doesn't even fire. I didn't get enough time to unfold the mysterious way these controls work. (For now all I know is, these Actions submit the page, and partial refreshes the part of the tree)&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I put the following lines of code to set the combo box value on the&amp;nbsp;&lt;i&gt;beforeRenderResponse&lt;/i&gt;&amp;nbsp;event of the custom control. One thing &amp;nbsp;to mention is that the page numbers start from 0. My repeat control implementation here is for displaying the search results.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 13.5pt; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-collapse: collapse;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(153, 204, 255); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(153, 204, 255); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(153, 204, 255); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(153, 204, 255); border-top-style: solid; border-top-width: 1pt; padding-bottom: 5.75pt; padding-left: 5.75pt; padding-right: 5.75pt; padding-top: 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.beforeRenderResponse&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript:var tmpRpt=getComponent("rptSrchResults");&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;if(tmpRpt)&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;{&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;getComponent("cmbPages").setValue(@Text(tmpRpt.getFirst()/tmpRpt.getRows()+1))&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;}}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;]]&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;xp:this.beforeRenderResponse&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;br /&gt; &lt;b style="background-color: yellow;"&gt;UPDATE (11/14/2011):&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;I posted this pager solution 1 year back (when I started learning Xpages). I think I made several changes here and there in my code after that. But anyways, the problem that I was facing earlier was in setting the combo box value after clicking previous or next buttons/links. Since none of the events worked fine for that purpose, I actually put a label control just ahead of the combo box and wrote the code for setting the combo box value in the rendered property of that label. The following is the code.&lt;br /&gt;    &lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; border-collapse: collapse;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(153, 204, 255); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(153, 204, 255); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(153, 204, 255); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(153, 204, 255); border-top-style: solid; border-top-width: 1pt; padding-bottom: 5.75pt; padding-left: 5.75pt; padding-right: 5.75pt; padding-top: 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:label&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.rendered&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript:var tmpRpt=getComponent("rptSrchResults");&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;if(tmpRpt)&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;{&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getComponent("cmbPages").setSubmittedValue(@Text(tmpRpt.getFirst()/&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;tmpRpt.getRows()+1));&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.rendered&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:label&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0in;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Here is the code for the combo box control.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-collapse: collapse;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(153, 204, 255); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(153, 204, 255); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(153, 204, 255); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(153, 204, 255); border-top-style: solid; border-top-width: 1pt; padding-bottom: 5.75pt; padding-left: 5.75pt; padding-right: 5.75pt; padding-top: 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:comboBox&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;span style="color: #7f007f;"&gt;id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"cmbPages"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:selectItems&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript:var rptControl=getComponent("rptSrchResults");&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;if (rptControl==null) return [];&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var total=rptControl.getRowCount();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var rowsperpage=rptControl.getRows();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var totalpages=Math.ceil(total/rowsperpage);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var arr=[];&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;for (var i=1;i&amp;lt;=totalpages;i++) {&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arr.push(@Text(i))&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;return arr}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:selectItems&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:eventHandler&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;span style="color: #7f007f;"&gt;event&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"onchange"&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;span style="color: #7f007f;"&gt;submit&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"true"&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: #7f007f;"&gt;refreshMode&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"partial"&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;span style="color: #7f007f;"&gt;refreshId&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"panelSrchResults"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.action&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript:var pager:com.ibm.xsp.component.xp.XspPager = getComponent("pager1");&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;pager.gotoPage(parseInt(getComponent("cmbPages").getValue())-1);}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.action&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:eventHandler&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;xp:comboBox&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;o:p&gt;Code for displaying the text "Searched for&amp;nbsp;&lt;b&gt;XXX&lt;/b&gt;. Displaying results&amp;nbsp;&lt;b&gt;X&lt;/b&gt;&amp;nbsp;of&amp;nbsp;&lt;b&gt;Y&lt;/b&gt;&amp;nbsp;of a total of&amp;nbsp;&lt;b&gt;Z&lt;/b&gt;&amp;nbsp;results"&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #f3f3f3; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-collapse: collapse;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border-bottom-color: rgb(153, 204, 255); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(153, 204, 255); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(153, 204, 255); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(153, 204, 255); border-top-style: solid; border-top-width: 1pt; padding-bottom: 5.75pt; padding-left: 5.75pt; padding-right: 5.75pt; padding-top: 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:text&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;span style="color: #7f007f;"&gt;escape&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"false"&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;span style="color: #7f007f;"&gt;disableTheme&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"true"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript:var rptControl=getComponent("rptSrchResults");&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var total=rptControl.getRowCount();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var from=(rptControl.getFirst() &amp;lt; total? (rptControl.getFirst() + 1 ) : total);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var tmpTo=rptControl.getFirst() + rptControl.getRows();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var to=(tmpTo &amp;lt; total? tmpTo : total);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;"Searched for &amp;lt;b&amp;gt;"+ getComponent("inpSrchUnits").getValue()+&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;"&amp;lt;/b&amp;gt;: Displaying results &amp;lt;b&amp;gt;"+ from +"&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;"+ to + "&amp;lt;/b&amp;gt; of a total of "+&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;"&amp;lt;b&amp;gt;"+total+"&amp;lt;/b&amp;gt; results";&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;xp:text&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 14px;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;o:p&gt;Here is how my pagination looks now.&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_5pKOCGyU4hQ/TMRzeC9q3vI/AAAAAAAAJcA/kvj268Er6HY/s1600/clip_image002.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_5pKOCGyU4hQ/TMRzeC9q3vI/AAAAAAAAJcA/kvj268Er6HY/s1600/clip_image002.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-1668748726841370594?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/1668748726841370594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/10/repeat-control-better-pagination.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/1668748726841370594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/1668748726841370594'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/10/repeat-control-better-pagination.html' title='Repeat Control – A better pagination (Version 8.5.1)  (An Update)'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_5pKOCGyU4hQ/TMRzeC9q3vI/AAAAAAAAJcA/kvj268Er6HY/s72-c/clip_image002.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-8701029247049690698</id><published>2010-10-21T22:01:00.001-04:00</published><updated>2010-10-24T18:15:14.868-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Repeat Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Pager Control'/><title type='text'>Repeat Control – A better pagination (Version 8.5.1)</title><content type='html'>&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Here are few things you might need while working with Repeat Controls&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;How to get the repeat control object?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Var rptControl=getComponent(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #8e00ff; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;"RepeatControlName"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;How to get the total number of rows (all result pages combined) returned by the repeat control?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;rptControl.getRowCount()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;How to find if the repeat control returned any results?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;rptControl.isRowAvailable() &lt;i&gt;(Result is Boolean)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;How to find the repeat limit or rows per page?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;rptControl.getRows()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;How to find the start value (think of the &amp;amp;start=1&amp;amp;count=30) of the current page of results?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-size: 10pt; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;rptControl. getFirst()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;Now here is the code for displaying the pager control in a different way (I like the page numbers in a drop down)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_5pKOCGyU4hQ/TMDEm-ZodCI/AAAAAAAAJb8/HTztFDnsV-E/s1600/clip_image001.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_5pKOCGyU4hQ/TMDEm-ZodCI/AAAAAAAAJb8/HTztFDnsV-E/s1600/clip_image001.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #F3F3F3; border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid #99CCFF 1.0pt; padding: 5.75pt 5.75pt 5.75pt 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="color: red;"&gt;No comments provided as the code is self   explanatory&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:text&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: #7f007f;"&gt;escape&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"false"&lt;/span&gt;&lt;/i&gt;   &lt;span style="color: #7f007f;"&gt;disableTheme&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"true"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript:var   rptControl=getComponent("rptSrchResults");&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var total=rptControl.getRowCount();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var from=(rptControl.getFirst() &amp;lt; total?   (rptControl.getFirst() + 1 ) : total);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var tmpTo=rptControl.getFirst() + rptControl.getRows();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var to=(tmpTo &amp;lt; total? tmpTo : total);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;"Your searched for &amp;lt;b&amp;gt;"+   getComponent("inpSrchUnits").getValue()+&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;"&amp;lt;/b&amp;gt;: Displaying results &amp;lt;b&amp;gt;"+ from   +"&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;"+ to + "&amp;lt;/b&amp;gt; of a total of   "+&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;"&amp;lt;b&amp;gt;"+total+"&amp;lt;/b&amp;gt; results"&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:text&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #F3F3F3; border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid #99CCFF 1.0pt; padding: 5.75pt 5.75pt 5.75pt 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="color: red;"&gt;The actual pager control is hidden   (display:none)&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:comboBox&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: #7f007f;"&gt;id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"cmbPages"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:selectItems&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript:var   rptControl=getComponent("rptSrchResults");&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;if (rptControl==null) return [];&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var total=rptControl.getRowCount();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var rowsperpage=rptControl.getRows();&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var totalpages=Math.ceil(total/rowsperpage);&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var arr=[];&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;for (var i=1;i&amp;lt;=totalpages;i++) {&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arr.push(@Text(i))&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;return arr}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:selectItems&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:eventHandler&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;   &lt;span style="color: #7f007f;"&gt;event&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"onchange"&lt;/span&gt;&lt;/i&gt; &lt;span style="color: #7f007f;"&gt;submit&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"true"&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #7f007f;"&gt;refreshMode&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"complete"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.action&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;#{javascript://getComponent("pager1").gotoPage(@Integer(this.getValue()));&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;//print("value="+getComponent("cmbPages").getValue());&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var pager:com.ibm.xsp.component.xp.XspPager =   getComponent("pager1");&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;pager.gotoPage(parseFloat(getComponent("cmbPages").getValue()))&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.action&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;xp:eventHandler&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;xp:comboBox&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-8701029247049690698?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/8701029247049690698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/10/repeat-control-better-navigation.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8701029247049690698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8701029247049690698'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/10/repeat-control-better-navigation.html' title='Repeat Control – A better pagination (Version 8.5.1)'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5pKOCGyU4hQ/TMDEm-ZodCI/AAAAAAAAJb8/HTztFDnsV-E/s72-c/clip_image001.gif' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-3027737544065273533</id><published>2010-08-25T23:51:00.000-04:00</published><updated>2010-10-21T20:00:44.889-04:00</updated><title type='text'>How to use SSJS inside the addOnLoad function?</title><content type='html'>&lt;div&gt;Suppose you want to call a Javascript function immediately after the page is loaded on the browser. The known solution with 8.5.1 is the following.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #F3F3F3; border-collapse: collapse; border: none; mso-border-alt: solid #99CCFF .5pt; mso-padding-alt: 5.75pt 5.75pt 5.75pt 5.75pt; mso-yfti-tbllook: 480;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid #99CCFF 1.0pt; mso-border-alt: solid #99CCFF .5pt; padding: 5.75pt 5.75pt 5.75pt 5.75pt; width: 6.15in;" valign="top" width="590"&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xml&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;version&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"1.0"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;encoding&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"UTF-8"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:view&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;xmlns:xp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"http://www.ibm.com/xsp/core"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;script&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;language&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"Javascript"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XSP.addOnLoad(function   (){doSomething()} );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;script&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:view&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Now, what if you also needed to pass the server generated ID of a Panel/Div ? That isn't hard. Just write into the source something like the following (See the &lt;b&gt;xp:text&lt;/b&gt;).&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: teal; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="color: teal; font-family: 'Courier New';"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #F3F3F3; border-collapse: collapse; border: none; margin-left: 5.75pt; mso-border-alt: solid #99CCFF .5pt; mso-padding-alt: 5.75pt 5.75pt 5.75pt 5.75pt; mso-yfti-tbllook: 480;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid #99CCFF 1.0pt; mso-border-alt: solid #99CCFF .5pt; padding: 5.75pt 5.75pt 5.75pt 5.75pt; width: 437.05pt;" valign="top" width="583"&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xml&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;version&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"1.0"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;encoding&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"UTF-8"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:view&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;xmlns:xp&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"http://www.ibm.com/xsp/core"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;script&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;language&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"Javascript"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XSP.addOnLoad(function   () {doSomething(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:text&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;escape&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"true"&lt;/span&gt;&lt;/i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;value&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"#{id:myPanel}&lt;/span&gt;&lt;/i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;disableTheme&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #4200ff; font-family: 'Courier New'; font-size: 10pt;"&gt;"true"&lt;/span&gt;&lt;/i&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:text&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )   });&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;script&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f8080; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:view&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The other easy way is to insert a computedField, erase the name of the field, set disableTheme to true, and then write whatever code (EL/SSJS) you can write as the value of the computedField. As the next step, go to the source mode, cut the source code for this computedField and paste in the&amp;nbsp;JavaScript.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;u&gt;Update:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Played with it a little more and found that the following method also works (Thanks Tim). But writing the EL on to the source like &lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #222222; font-family: Arial; font-size: 9pt; line-height: 115%;"&gt;XSP,addOnLoad(function () { doSomething("#{id:myPanel}"); })&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; color: #222222; font-family: Arial; font-size: 9pt; line-height: 115%;"&gt;;&lt;/span&gt;&lt;span style="color: #222222; font-family: Arial; font-size: 9pt; line-height: 115%;"&gt; will not work. Because server will compute it only if it is part of a xp tag like xp:text, xp:scriptBlock etc.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: #222222; font-family: Arial; font-size: 9pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #D9D9D9; border-collapse: collapse; border: none; mso-border-alt: solid #548DD4 .5pt; mso-padding-alt: 5.75pt 5.75pt 5.75pt 5.75pt; mso-yfti-tbllook: 1184;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: solid #548DD4 1.0pt; mso-border-alt: solid #548DD4 .5pt; padding: 5.75pt 5.75pt 5.75pt 5.75pt; width: 479.5pt;" valign="top" width="639"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xml&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;   &lt;span style="color: #7f007f;"&gt;version&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"1.0"&lt;/span&gt;&lt;/i&gt; &lt;span style="color: #7f007f;"&gt;encoding&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"UTF-8"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;?&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:view&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;   &lt;span style="color: #7f007f;"&gt;xmlns:xp&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"http://www.ibm.com/xsp/core"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:scriptBlock&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: #7f007f;"&gt;id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"scriptBlock1"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&amp;lt;![CDATA[&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;XSP.addOnLoad(doSomething("#{id:myPanel}"))&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;]]&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:this.value&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:scriptBlock&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:panel&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;   &lt;span style="color: #7f007f;"&gt;id&lt;/span&gt;&lt;span style="color: black;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"myPanel"&lt;/span&gt;&lt;/i&gt;&lt;span style="color: teal;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f;"&gt;xp:panel&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New'; font-size: 10pt;"&gt;xp:view&lt;/span&gt;&lt;span style="color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-3027737544065273533?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/3027737544065273533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/08/how-to-use-ssjs-inside-addonload.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/3027737544065273533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/3027737544065273533'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/08/how-to-use-ssjs-inside-addonload.html' title='How to use SSJS inside the addOnLoad function?'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-6696886264728563633</id><published>2010-07-22T01:34:00.000-04:00</published><updated>2010-10-21T20:01:40.126-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSJS'/><title type='text'>How to retrieve a string value from a scope variable as a JSON object into the client-side javascript variable?</title><content type='html'>&lt;div&gt;When we need to use a server evaluated value inside client-side JavaScript, we can use in-line SSJS. This is very well explained by John Mackey in his blog &lt;a href="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG"&gt;post&lt;/a&gt; long back.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Following are few ways we can write the in-line SSJS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var&lt;/span&gt; sCountryPanelID=&lt;span class="Apple-style-span" style="color: #993399;"&gt;'#{id:panelCountry}'&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var&lt;/span&gt; sCountryName=&lt;span class="Apple-style-span" style="color: #993399;"&gt;'#{sessionScope.CountryName}'&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var&lt;/span&gt; sCountryName=&lt;span class="Apple-style-span" style="color: #993399;"&gt;'#{javascript:sessionScope.CountryName}'&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var&lt;/span&gt; sCountryName=&lt;span class="Apple-style-span" style="color: #993399;"&gt;'#{javascript:sessionScope.get("CountryName")}'&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;alert(sCountryName)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Suppose we have a string in JSON format (like the following) that is stored in a scope variable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-color: #d7dbfd; border: 1px solid black; padding: 5px;"&gt;[{'name':'Lionel Messi','country':'Argentina'},{'name':'Ronaldinho','country':'Brazil'},{'name':'Diego Forlán','country':'Uruguay'}]&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the code snippet that stores the JSON-formatted-string in an applicationScope variable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="background-color: white; border: 1px solid black; padding: 5px;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;if&lt;/span&gt; (&lt;span class="Apple-style-span" style="color: #990000;"&gt;applicationScope&lt;/span&gt;.get(&lt;span class="Apple-style-span" style="color: #6600cc;"&gt;"AllTimeFavorites"&lt;/span&gt;)) &lt;span class="Apple-style-span" style="color: #990000;"&gt;return&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #3333ff;"&gt;//The following code can be run by one person at a time&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;synchronized&lt;/span&gt;(&lt;span class="Apple-style-span" style="color: #990000;"&gt;applicationScope&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #3333ff;"&gt;/*This is a bad example. But assume you are doing some lookups and keeping something as a JSON-formatted-string &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #3333ff;"&gt;in the applicationScope*/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var &lt;/span&gt;sFavorites=&lt;span class="Apple-style-span" style="color: #993399;"&gt;"{'name':'Lionel Messi','country':'Argentina'},{'name':'Ronaldinho','country':'Brazil'},{'name':'Diego Forlán','country':'Uruguay'}";&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;applicationScope&lt;/span&gt;.put("&lt;span class="Apple-style-span" style="color: #993399;"&gt;AllTimeFavorites&lt;/span&gt;",sFavorites);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the Client-side javascript, we can retrieve this value as follows.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var &lt;/span&gt;sAllTimeFavorites='&lt;span class="Apple-style-span" style="color: #993399;"&gt;#{javascript:applicationScope.AllTimeFavorites}&lt;/span&gt;';&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now the variable "sAllTimeFavorites" is holding the value as a string. We need to evaluate the string/expression to convert it as a JSON object so that the client-side javascript can process it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var &lt;/span&gt;objFavorites=eval(&lt;span class="Apple-style-span" style="color: #6600cc;"&gt;"(["&lt;/span&gt;+sAllTimeFavorites+&lt;span class="Apple-style-span" style="color: #6600cc;"&gt;"])"&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since &lt;i&gt;&lt;b&gt;eval&lt;/b&gt;&lt;/i&gt; is not recommended for performance reasons, let's try another way to do the same thing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000;"&gt;var &lt;/span&gt;objFavorites=&lt;span class="Apple-style-span" style="color: #6600cc;"&gt;[#{javascript:applicationScope.AllTimeFavorites}]&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here the only difference is that I didn't enclose the SSJS inside quotes. This makes me happy that I dont have to use &lt;i&gt;eval&lt;/i&gt; while fetching Javascript objects like JSON, Array etc. from the scope variables.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-6696886264728563633?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/6696886264728563633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/07/how-to-retrieve-string-value-from-scope.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/6696886264728563633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/6696886264728563633'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/07/how-to-retrieve-string-value-from-scope.html' title='How to retrieve a string value from a scope variable as a JSON object into the client-side javascript variable?'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-8910129176405465140</id><published>2010-07-20T00:45:00.000-04:00</published><updated>2010-10-21T20:01:56.932-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSJS'/><title type='text'>Classic Domino @Functions and their Javascript equivalents: What about those keywords?</title><content type='html'>&lt;div&gt;When I started converting some of the @Functions already written in classic domino to the server side javascript equivalents, I got confused about the usage of keyword parameters.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am referring to the bold parameters in the following @Functions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #3333ff;"&gt;@Name&lt;/span&gt;(&lt;b&gt;[CN]&lt;/b&gt;;SomeName);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #3333ff;"&gt;@DbLookup&lt;/span&gt;("";@Subset(@DbName;1):"&lt;span class="Apple-style-span" style="color: #993399;"&gt;Names.nsf&lt;/span&gt;";"&lt;span class="Apple-style-span" style="color: #993399;"&gt;($VIMGroups)&lt;/span&gt;";"&lt;span class="Apple-style-span" style="color: #993399;"&gt;MyGroup&lt;/span&gt;";"&lt;span class="Apple-style-span" style="color: #993399;"&gt;Members&lt;/span&gt;";&lt;b&gt;[FailSilent]&lt;/b&gt;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not a big deal, but it might be a little helpful for the novice XPage developers to know that those keywords go inside double quotes in the server side javascript. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So the above @Functions can be written as the following in the SSJS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;@Name("&lt;b&gt;&lt;span class="Apple-style-span" style="color: #663366;"&gt;[CN]&lt;/span&gt;&lt;/b&gt;",SomeName);&lt;/div&gt;&lt;div&gt;@DbLookup([@DbName()[0],"&lt;span class="Apple-style-span" style="color: #663366;"&gt;Names.nsf&lt;/span&gt;"],"&lt;span class="Apple-style-span" style="color: #663366;"&gt;($VIMGroups)&lt;/span&gt;","&lt;span class="Apple-style-span" style="color: #663366;"&gt;MyGroup&lt;/span&gt;","&lt;span class="Apple-style-span" style="color: #663366;"&gt;Members&lt;/span&gt;","&lt;b&gt;&lt;span class="Apple-style-span" style="color: #663366;"&gt;[FAILSILENT]&lt;/span&gt;&lt;/b&gt;");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-8910129176405465140?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/8910129176405465140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/07/classic-domino-functions-and-their.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8910129176405465140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8910129176405465140'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/07/classic-domino-functions-and-their.html' title='Classic Domino @Functions and their Javascript equivalents: What about those keywords?'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-619347128837255069</id><published>2010-07-15T21:37:00.000-04:00</published><updated>2010-10-21T20:02:08.607-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSJS'/><title type='text'>How to do @DbLookup with the replica id of a database in SSJS?</title><content type='html'>&lt;div&gt;We all know that we can use the replica id to specify the database while doing @DbLookup in classic Domino. It is documented in the help database also. But can we use the replica id in the server side javascript version of the @DbLookup??&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first thing I did was to check in the help if anything about that is mentioned. It says, the dbname argument is an array and nowhere it is mentioned about using replica id instead of the servername and dbpath array. I searched in blogs and &lt;a href="http://www.youatnotes.de/web/youatnotes/wiki-xpages.nsf/dx/Work_with_DbColumn_and_DbLookup"&gt;xpageswiki&lt;/a&gt; to see if anyone explained about it. And finally I tried different combinations on my own. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I found that the following syntax works fine.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Syntax 1:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;var arrDbInfo=[&lt;span class="Apple-style-span" style="color: #993399;"&gt;"85256650:0050872E"&lt;/span&gt;];&lt;/div&gt;&lt;div&gt;@DbLookup(arrDbInfo,&lt;span class="Apple-style-span" style="color: #993399;"&gt;"ViewName","Key","FieldName","[FAILSILENT]"&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Syntax 2:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;@DbLookup(&lt;span class="Apple-style-span" style="color: #663366;"&gt;"85256650:0050872E","ViewName","Key","FieldName","[FAILSILENT]"&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It also works fine with the @DbColumn.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;@DbColumn(&lt;span class="Apple-style-span" style="color: #993399;"&gt;"85256650:0050872E","ViewName",1&lt;/span&gt;);&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-619347128837255069?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/619347128837255069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/07/how-to-do-dblookup-with-replica-id-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/619347128837255069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/619347128837255069'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/07/how-to-do-dblookup-with-replica-id-of.html' title='How to do @DbLookup with the replica id of a database in SSJS?'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-2454210583212738411</id><published>2010-07-08T01:54:00.000-04:00</published><updated>2010-10-21T20:02:22.635-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dojo'/><title type='text'>dijit.Dialog inside a partial refreshing Custom Control</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: georgia;"&gt;You know that a Panel can be set to show as a dijit-dialog. All you need to do is to set few properties like &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: georgia;"&gt;dojoType&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-family: georgia;"&gt;, &lt;i&gt;dojoParseOnLoad&lt;/i&gt;, &lt;i&gt;dojoTheme&lt;/i&gt;, &lt;i&gt;styleClass&lt;/i&gt; and then add the &lt;i&gt;dijit.Dialog&lt;/i&gt; module. A button with the following client side javascript code on click, will show the Panel and it's content as a dijit-Dialog.&lt;br /&gt;&lt;br /&gt;dijit.byId(&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #663366;"&gt;&lt;span class="Apple-style-span" style="font-family: georgia;"&gt;"#{id:panelname}"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: georgia;"&gt;).show()&lt;br /&gt;&lt;br /&gt;I don't intend to repeat the steps in setting a panel as a dijit-dialog here as it is explained already by several other bloggers. The topic that I want to talk about here is the issue in using the dialog inside a partial refreshing custom control and the ways to overcome that.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Issue:&lt;/span&gt;&lt;/b&gt; The following is that familiar error that we come across when partial refreshing a panel/custom control that has a dijit.Dialog.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5491684890580139010" src="http://3.bp.blogspot.com/_5pKOCGyU4hQ/TDZiHx7TkFI/AAAAAAAAI7c/ffdvcjUib5o/s1600/screen1.jpg" style="cursor: hand; cursor: pointer;" /&gt;&lt;br /&gt;&lt;br /&gt;The widget can be registered only once and any subsequent refresh of the custom control tries to register the widget again that results in the above error.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution 1:&lt;/b&gt; Put another panel inside the panel that is set as dialog, and then refresh that inner panel instead of refreshing the custom control itself.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution 2:&lt;/b&gt; Destroy and re-create the dijit.Dialog control using javascript whenever the custom control gets refreshed. Let me explain this solution with the help of an example.&lt;br /&gt;&lt;br /&gt;Here is what I am trying to do. I want to create a custom control, which will open an attachment inside the dijit-dialog while clicking a link in a XPage. The idea is to keep all related code inside the custom control so that it can be re-used wherever needed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1:&lt;/b&gt; Created a custom control with name "ccOpenAttachment".&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt; Drag and dropped an Output Script and added the code as shown below.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5491684890580139010" src="http://1.bp.blogspot.com/_5pKOCGyU4hQ/TDZiMGK4jWI/AAAAAAAAI7k/2vtVb-LNeMg/s1600/screen2.jpg" style="cursor: hand; cursor: pointer;" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt; Added a Computed field with the code as shown below.The Content-type of the computed field is set as HTML.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5491684890580139010" src="http://2.bp.blogspot.com/_5pKOCGyU4hQ/TDZiPMJlwBI/AAAAAAAAI7s/bevpCIJPuCE/s1600/screen3.jpg" style="cursor: hand; cursor: pointer;" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4:&lt;/b&gt; Drag and dropped this custom control on the XPage where I want to open an attachment.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 5:&lt;/b&gt; Added a link to the XPage with the onClick event code as shown below.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5491684890580139010" src="http://3.bp.blogspot.com/_5pKOCGyU4hQ/TDZiRnO4hZI/AAAAAAAAI70/FoyVtAN4oTY/s1600/screen4.jpg" style="cursor: hand; cursor: pointer;" /&gt;&lt;br /&gt;&lt;br /&gt;When the "XPages Tutorial.pdf" link is clicked, it sets the viewScope variable, and then it partial refreshes the ccOpenAttachment custom control. The custom control executes the server side javascript written on the computed field, builds the url. When the page is rendered to the browser, it then calls the client side javascript function "openFile". This function will try to get the widget handle, if it finds the widget, it first destroys it before trying to create again. That is pretty much soultion #2.&lt;br /&gt;&lt;br /&gt;Having explained this, here is something for thoughts. As you see in the screenshot below, there is a dojoParseOnLoad property for the Custom Control itself. If I can use it to stop the attempts to register the dijit.Dialog widget on subsequent custom control refresh, then that could be a 3rd solution.&lt;br /&gt;&lt;br /&gt;I am thinking of turning this flag to false after the first time the custom control is loaded. But from what I have seen, the onLoad javascript event of a Custom Control fires only the first time the custom control is loaded. So, that kind of stopping me from trying this (The onLoad function added to the custom control using XSP.addOnLoad executes only the initial time when the custom control is loaded on the browser)&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5491684890580139010" src="http://4.bp.blogspot.com/_5pKOCGyU4hQ/TDZiT9FovAI/AAAAAAAAI78/iKQrGfGxjck/s1600/screen5.jpg" style="cursor: hand; cursor: pointer;" /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-2454210583212738411?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/2454210583212738411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/07/dijitdialog-inside-partial-refreshing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/2454210583212738411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/2454210583212738411'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/07/dijitdialog-inside-partial-refreshing.html' title='dijit.Dialog inside a partial refreshing Custom Control'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_5pKOCGyU4hQ/TDZiHx7TkFI/AAAAAAAAI7c/ffdvcjUib5o/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6032286075039821028.post-8588525091865184483</id><published>2010-07-06T22:52:00.000-04:00</published><updated>2010-10-21T20:02:40.105-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Repeat Control'/><title type='text'>Using Index name property in a Repeat control effectively - An Example</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;I was researching about the &lt;span class="Apple-style-span" style="color: #990000;"&gt;&lt;i&gt;Index name&lt;/i&gt;&lt;/span&gt; property of the Repeat Control to find how it can be useful for me at all. I read in other blogs that it could be used if we ever needed to display the row numbers of each repeated row inside the repeat control. Great!! But can I use the index name to access a member of the collection represented by the repeat control?? I am sure any developer that noticed this property would have had the same thought in their mind too.&lt;br /&gt;&lt;br /&gt;I have the index name, but I do not have the collection's name defined anywhere on the control to do something like &lt;span class="Apple-style-span" style="color: #660000;"&gt;&lt;i&gt;Collection[IndexName]&lt;/i&gt;&lt;/span&gt;. Well, there is a property called "Collection name" on the control (Picture below). But is that actually the collection's name? No. That property/variable represents just the member of the collection. Meaning, it can be thought of as the "row" in the statement &lt;span class="Apple-style-span" style="color: #993399;"&gt;&lt;b&gt;for&lt;/b&gt;&lt;/span&gt; (row &lt;span class="Apple-style-span" style="color: #993399;"&gt;&lt;b&gt;in&lt;/b&gt;&lt;/span&gt; arrRows) {}.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490962055989769954" src="http://2.bp.blogspot.com/_5pKOCGyU4hQ/TDPQ5cZrNuI/AAAAAAAAI6I/IJT8wyw50nw/s400/Screen1.jpg" style="cursor: hand; cursor: pointer; height: 193px; width: 400px;" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is how I got this Index name to do the job for me. The following code explains how to hide a table row based on a field value of the next document in the collection.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490963572114430146" src="http://1.bp.blogspot.com/_5pKOCGyU4hQ/TDPSRsZ9mMI/AAAAAAAAI6s/VNqJaHVgBCo/s1600/Screen2.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;The hightlighted "getValue()" method of the repeat control, will return the actual collection used by the control. This is the only way that I know of currently to access a collection member using the index name (This even works outside of the repeat control). If you know of any other way to do this, please feel free to mention.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6032286075039821028-8588525091865184483?l=www.mydominolab.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.mydominolab.com/feeds/8588525091865184483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.mydominolab.com/2010/07/using-index-name-property-in-repeat.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8588525091865184483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6032286075039821028/posts/default/8588525091865184483'/><link rel='alternate' type='text/html' href='http://www.mydominolab.com/2010/07/using-index-name-property-in-repeat.html' title='Using Index name property in a Repeat control effectively - An Example'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/18142596532731861660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://1.bp.blogspot.com/_5pKOCGyU4hQ/THWbzdgg-FI/AAAAAAAAJLA/oVx5bcQNxTQ/S220/Me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_5pKOCGyU4hQ/TDPQ5cZrNuI/AAAAAAAAI6I/IJT8wyw50nw/s72-c/Screen1.jpg' height='72' width='72'/><thr:total>1</thr:total></entry></feed>
