Wednesday, July 26, 2006

Can I Give Penicillin To My Dog?

AJAX - Rico Accordion: The views categorized

The accordion class of RICO provides a very simple solution representing the views categorized as an accordion.


The data structure must be represented in the following format:
  \u0026lt;div id="un_identifiant_de_bloc_pour_rico"> 
\u0026lt;div>
\u0026lt;div> Title class \u0026lt;/ div>
\u0026lt;div> Content panel \u0026lt;/ div>
\u0026lt;/ div>
...
\u0026lt;/ div>
Preparation Notes view

The Notes view can be defined as:
  • 1st column: categorized with the formula
      "\u0026lt;/ div> \u0026lt;/ div> \u0026lt;div> ; \u0026lt;div> "champ_categorie + +" \u0026lt;/ div> ";  
  • columns:
     " \u0026lt;span> " Valeur_affichée + + "\u0026lt;/ span>"  
The \u0026lt;span> just allows to separate the values shown in this example. We can replace any other tag.
must also check "Treat contents as HTML" fifth tab from the Properties view.

Preparing mask for
The mask associated with the previous view must be called $ $ For ViewTemplate nom_de_la_vue. Even if we can encode the mask entirely in HTML by checking Content-type: HTML "from the second tab of the properties of the mask I'll porfiter the opportunity to not in this example.

First we must include the Javascript libraries. This is normally done between the bales HEAD of the HTML page. The equivalent Lotus Notes is the reference "content as HTML" present from the panel submitted under the mask. Fautindiquer it as a formula: {
  src="prototype-1.4.0.js" \u0026lt;script type="text/javascript"> \u0026lt;/ script> 
\u0026lt;script src = "rico.js" type = " text / javascript "> \u0026lt;/ script>}
Beware path Booksellers Javascript.

Then you instantiate the accordion in case it specifies the ID transformed to the element. This is usually done at the OnLoad event of the page. Also since the panel of reference present in the mask, you must click on "OnLoad" and enter the Javascript code:
  new Rico.Accordion ($ ('identifiant_bloc'));  

Finally, in the mask, it remains to incorporate the view by adding the statement block accordion like this:
  \u0026lt;div id="identifiant_code"> 
\u0026lt;div>
inserting the embedded view
here \u0026lt;/ div> \u0026lt;/ div>
\u0026lt;/ div>
Do not forget to declare the HTML code to insert as HTML relay by selecting it and clicking the menu item text \\ HTML Relay. An example

online can view the result by presenting the articles of this blog by topic. Furthermore you can find other examples of using this class on the Malaysian blog (but in English) Lotus Notes on Web 2.0 .

Saturday, July 22, 2006

Price List Jcpenney Hair Salon

AJAX - Rico LiveGrid: Customizing Lotus Notes

Using Firebug, we can see that Rico sends an Ajax request in the format: data.xml? Openview & id = data_grid & page_size = 70 & offset = 149 & title1 = & sort_col sort_dir = ASC & _ =. It is necessary to change the format of this query to take into account the parameters of standard URL Appeal Notes views.

reminder these parameters are:
  • Start: to set the starting line. It is equivalent to offset. Beware, the offset starts at 0 while the start begins at 1.
  • Count: number of rows to display. It's the equivalent of page_size.
  • ResortDescending = xx or ResortAscending = xx: to force a descending or ascending sort on the column xx. This is equivalent to & & title1 = sort_col sort_dir = CSA. Warning, Rico takes into account the title of the column while Notes expects the number of the column.
For more information about the format of URL for Domino, refer to "Domino URL cheat sheet " of IBM Lotus.

Function prototype object.extend

The URL parameters are encoded in the function of class fetchBuffer RICO.LiveGrid in file rico.js. Not wishing to change the file rico.js I preferred using the function prototype Object.extend. Object.extend
to redefine the function fetchBuffer without having to touch the file rico.js.
To use this function with Rico at the moment must be applied on an instance of the class. This should be corrected in the next version of prototype.

in practice this will give:
  PobreLiveGrid var = new Rico.LiveGrid ("data_grid", 18, 445, 
"data.xml? Openview", opts);
Object.extend (PobreLiveGrid, {
. ..
});
Customizing Notes for RICO.LiveGrid

I copy the function code is defined in RICO only modifies the definition of QueryString in the case of a standard call and in the case a call with a sort column.

The final code is:
  Object.extend (PobreLiveGrid, 
{/ ** *
PobreLiveGrid: * fetchBuffer
LiveGrid for IBM Lotus Notes / Domino
* -------------------------------------------
---------------- * Change the setting of the URL call update
* Data from the table to suit the control URL
* Lotus Notes views. * *

page_size \u0026lt;=> count
* offset \u0026lt;=> start
sortcol * = x & sort_dir AUC = \u0026lt;=> x = ResortAscending
sortcol * = x = DESC & sort_dir \u0026lt;=> x = ResortDescending * * ----------------------------------------------

-------------
* Special thanks to Ross Lawley we Rico Forum

* ** /

fetchBuffer: function (offset) {
if (this.buffer.isInRange (offset) & &
! This.buffer.isNearingLimit (offset)) {
return;}

if (this . processing request) {
this.unprocessedRequest = new Rico.LiveGridRequest (offset);
return;}


was bufferStartPos = this.buffer.getFetchOffset (offset);
this.processingRequest = new Rico.LiveGridRequest (offset);
this.processingRequest.bufferOffset = bufferStartPos;
was fetchsize = this.buffer.getFetchSize (offset);
was partialLoaded = False;

was QueryString;
if (this.options.requestParameters)
QueryString = this._createQueryString (this.options.requestParameters, 0);

QueryString = (QueryString == null)? '': QueryString +'&';

QueryString = QueryString + 'id =' + this.tableId + '& Count =' +
fetchsize + '& start =' + (bufferStartPos +1) + '& offset =' + bufferStartPos;

if (this.sortCol) {
was kind notes =
(this.sortDir == "ASC"? "ResortAscending": "ResortDescending");
QueryString = QueryString +'&'+ varietal notes +'='+ escape (this.sortCol) ;
}

this.ajaxOptions.parameters = queryString;

$ (ajax_call). InnerHTML = queryString;
ajaxEngine.sendRequest (this.tableId + '_request' this.ajaxOptions)

this.timeoutHandler = setTimeout (this . handleTimedOut.bind (this),
this.options.bufferTimeout)

}})
I kept the standard references Rico offset used in the code. This poses no problem to Lotus Notes that ignores this setting.
still remains a problem. We want to retrieve the column number to sort and not its name. Heaureusement LiveGrid offers an option paraméttrage class of very interresting that will not only help address the latter concerns but also allows to restrict the number of columns you want sortable.

must modify the definition opts like this:
 var opts = { 
PrefetchBuffer: false,
onscroll: updateHeader,
sortAscendImg 'sort_asc.gif'
sortDescendImg 'sort_desc.gif'
columns: [ ["1", true], ["3", true], ["5", true], ["7", true], ["9", true]]}
;
parameter columns: [ ["column value ', sortable (true / false)]] should contain all references displayed in columns. He reference "column value" as an identifier for the column instead of its name.

Be very careful because the number of columns displayed on the webpage do not necessarily correspond to the column number of the Lotus Notes view. Thus in the example presented in the previous article ( AJAX - LiveGrid Rico to represent the views Lotus Notes), a two-column was used to define HTML tags which are then interpreted.
The columns contain the values are the odd columns in this case (1, 3, 5, 7, 9). That remains to be returned to Lotus Notes.

To see the code complete, I invite you to read the source code for the example online LiveGrid Rico.

Saran Wrap Weight Loss Preparation H

AJAX - LiveGrid Rico to represent the views of Lotus Notes

There are a number of increasingly important AJAX Javascript libraries. After much talk about Scriptaculous, it is time to introduce new ones. RICO, based on prototype.js as scriptaculous. It offers class LiveGrid I was particularly interrested after discovering the new Microsoft search engine, live.com . On this site, the navigation bar to access the pages disappeared. Farewell "next page" or "previous page". The search results are displayed in a long list that loads depending on the position of the elevator. Outside, what bothers me most about the views management notes on the web is just managing the navigation between pages. RICO would provide the answer?

Rico LiveGrid
LiveGrid The class is certainly not perfect, however the result seems interresting to follow. All views are not representative notes on this type of interface, like categorized views. It should be noted that the views are categorized in any case not really usable on the Web either natively.

Installing library RICO RICO

The library has only one javascript file. There will, for cons,
must also install the prototype.js library.
  1. 1.1.2 download library on the RICO download page Site
  2. Download 1.4.0 prototype library on site conio (select the link "Just the. Js, please").
  3. Integrating the two files into the resources of the Lotus Notes database.

class Rico.LiveGrid

LiveGrid To use, you will have to define a Web page calling bookstores and initializing a table for representing the view. This table will consist of two parts: a
  • header: for definition of column headings
  • data: to properly receive, the first lines of data must be initialized in the page. Subsequently these data will be extracted directly from an XML file.
Compared to other classes already presented Javascript, using LiveGrid is particularly restrictive. I hope this will be improved in version 2 of the library.
To represent a Lotus Notes view with LiveGrid, so I use an HTML page and a picture with a mask associated with the XML format. We could also use an agent to generate the XML stream, but as already explained, the use of a view saves server resources.

Defining the XML view

Data transmitted to the class LiveGrid should have the following XML format:
  \u0026lt;ajax-response> 
\u0026lt;RESPONSE type="object" id="data_grid_updater">
\u0026lt;ROW update_ui="true">
\u0026lt;td> Value 1 \u0026lt;/ td> \u0026lt;td> Value 2 ...\u0026lt;/ td> \u0026lt;/ tr>
...
\u0026lt;tr> ...\u0026lt;/ tr>
\u0026lt;/ rows>
\u0026lt;/ response>
\u0026lt;/ ajax-response>
To achieve such a representation I set my sight with the following parameters;
View Name: data.xml
Treat contents as HTML from the penultimate options tab view.
  • Column 1: "\u0026lt;td>"
  • Column 2: Field or formula to represent the grid
  • Column 3: "\u0026lt;/ td> \u0026lt;td>"
  • Column 4: Scope or formula to represent the grid
  • ...
  • Column n: "\u0026lt;/ td> \u0026lt;/ tr>"
Moreover, in order to use the sorting options to be ticked the "Click on column heading to sort" with value "The Couple for each column representing values to display.

must now declare a mask associated view
name mask: $ $ For ViewTemplate data.xml
Since the second tab of the properties of the mask, check "Content Type: Other" and give the value: application / xml
The content of the mask is:
  \u0026lt;ajax-response> 
\u0026lt;response type = "object" id = "data_grid_updater">
\u0026lt;ROW update_ui="true">
Added integrated view
data.xml \u0026lt;/ rows>
\u0026lt;/ response>
\u0026lt;/ ajax- response>
The number of rows displayed in the embedded view is irrelevant. To test your new XML file, open the data.xml view from a web browser. The XML format is very contraigant it is possible that you have an error message as the text displayed. It is not allowed, for example, display the character '&'. You can delete it or replace it automatically if necessary, through the formula of the column.

Web page

I declare the contents of my page as HTML in the page options. Furthermore, I voluntarily removed all references to the style in the code provided so you do not burdened. The content of the page should look like this:
  \u0026lt;body onload="javascript:bodyOnLoad();"> 

\u0026lt;table id = "data_grid_header" class = "fixedTable"
cellspacing = "0" cellpadding = "0" style = "width: 560px">
\u0026lt;tr>
\u0026lt;th class="first tableCellHeader"> Title Column 1 \u0026lt;/ th> \u0026lt;th
class="tableCellHeader"> Column 2 Title \u0026lt;/ th> \u0026lt;th
class="tableCellHeader"> Column 3 Title \u0026lt;/ th>
\u0026lt;/ tr>
\u0026lt; ; / table> \u0026lt;div

id="viewPort" style="float:left">
\u0026lt;table id = "data_grid" class = "fixedTable"
cellspacing = "0" cellpadding = "0" style = float: left; width: 560px ">
is added here to view the integrated
data.xml \u0026lt;/ table>
\u0026lt;/ div>
\u0026lt;/ body>
\u0026lt;/ html>
note, the number of rows displayed in the embedded view is very important here. We need this number is slightly higher than the number of lines displayed.

It remains only to declare the header of the HTML file to initialize the LiveGrid.
  \u0026lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
\u0026lt;head>
\u0026lt;title> Domino & Web 2.0 : LiveGrid Rico \u0026lt;/ title>
src="prototype.js" \u0026lt;script type="text/javascript"> \u0026lt;/ script>
src="rico.js" \u0026lt;script type="text/javascript"> \u0026lt;/ script> \u0026lt;script language="javascript">



bodyOnLoad function () {var opts = {

PrefetchBuffer: false,
onscroll: updateHeader
}
new Rico.LiveGrid ("data_grid", 18, 445, "data.xml? openview", opts);}


function updateHeader (LiveGrid, offset) {}


\u0026lt;/ script>
\u0026lt;/ head>
options LiveGrid statements are
  • "datagrid" ID picture which will represent the values
  • 18: number of rows to display on the screen
  • 445: number of lines of sight. This value should be calculated
  • "data.xml? Openview": URL of the XML stream
  • opts: options further. For the moment it does not serve

page so defined does not sort the view by clicking on a column or manage data download in the background. The call parameters of the XML view are coded in the library rico.js. Outside these parameters are obviously not call syntax views Lotus Notes. This will be fixed in the next section.

In the meantime, here is a complete example online. Having been unable to test the application on all platforms, thank you to leave a comment if you find an incompatibility.

Tuesday, July 18, 2006

Non Warrantable Condo Financing

SITE - The PDF Blog

As an experiment, I uploaded a PDF file containing all the articles related to the integration of Google Maps and Google Earth in Lotus Notes / Domino.


For the moment the file is accessed by clicking on the heading GOOGLE API from the right panel. If I continue to see the experience I place the links more visible.

Update:
The PDF is now truly accessible.

Sunday, July 16, 2006

L-arginine, What Does It Do?

AJAX - Read a file Outside the field

As previously indicated, AJAX applications can not access files outside the internet domain of the calling page (it should be noted however that this limitation does not seem to affect Microsoft Internet Explorer). The preferred method to exceed this limit, whatever the browser used, is through a "Cross-Domain Proxy".

Cross-Domain Proxy

A "cross-domain proxy" is nothing more than an application hosted in the area, which will download the file outside desired and return to the AJAX application. This technique is used by NetVibes . By opening NetVibes with Firefox extension Firebug , we see that the son's RSS page is called through a URL like: http://www.netvibes.com/xmlProxy.php?url=http% 3A / / swww.acme.com / rss.xml

PHP Application xmlProxy.php simply retrieve the XML file and transmit to the Web browser. It does not include information prior to shipment. This helps avoid overloading the server, leaving that task to the client.

Lotus Domino Cross-Domain Proxy

To do the same thing with Lotus Notes I started by using the method "ALAXA" presented in the article " Seeking information on the Internet from a Lotus Notes client . Unfortunately it appears the responseText property mismanaging, if at all, charset other than UTF-8. The main sources of information are encoded in French ISO-8859-1 I could use this method.

So I decided to take the opportunity to develop an agent in Lotus Notes Java.
The agent must retrieve the target URL as an argument and return the contents of that URL.
cross domain proxy
The source code of the agent is :
   import lotus.domino.*; 
import java.io.*;
import java.net.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();

// Récupération de l'URL passé en argument de l'agent
Document doc = agentContext.getDocumentContext();
String newurl = doc.getItemValueString("Path_Info_Decoded");
newurl = newurl.substring(newurl.indexOf("url=") + 4);
URL url = new URL (newurl);

/ / Initialize the result to return
String result = "";

/ / The information will be sent to the browser as XML
PrintWriter pw = getAgentOutput ();
pw.println ("Content-type: text / xml" )

/ / Get the contents of the target page
BufferedReader in = new BufferedReader (new InputStreamReader (url.openStream ())); String
inputLine;
while ((inputLine = in.readLine ())! = null ) {result + =
inputLine.toString ();}


/ / Send the result to the Web browser
pw.println (result);
doc.recycle ();

} catch (Exception e) {e.printStackTrace
();}


}}
To call the agent must use a URL Type: http://serverlocal/path/base.nsf/agent?openagent&url=http% 3A / / sitecible / path / file

Integration into the RSS aggregator

can easily integrate this feature in the RSS aggregator previously presented.

ajax rss
  • Step 1: Integration of the agent on a base of the web domain. The agent may be declared in the database itself or from any other basis for the domain.
  • Step 2: Submitting URLs to open thread. Instead of directly indicating the URL of the target, it is preceded by the URL of the agent according to the format presented. We can also provide development to automatically this syntax to simplify the task of the user.
Attention javascript interpretation of RSS son presented does not support the ATOM format yet.

[Update] Added doc.recycle () following the remark Yogi Administrator dark Blog DarkBlog accessible without hesitation.

Wednesday, July 12, 2006

Neutrogena Face Cleanser Brush

AJAX - A customizable web page (4 / 4): A bit of interactivity

It is time to add some interactivity to this RSS aggregator. The user can add an RSS feed, delete, modify or update the contents of the thread.


All actions must be managed without refresh the window to preserve the fluid aspect of the application. The shares will be transmitted via AJAX (removing a thread or update) but also through a modal dialog box if a value is entered (adding and editing a feed).

Modal Dialog
For entry information I based on the library's Javascript subimages which can be found on this page . This library has the advantage of working on Internet Explorer, Firefox and Opera (I have not tested other browsers). In addition to being easy to integrate into the code I found from visual aesthetic result.
To use this library you should download the package , unzip it and then add in the structure of the Notes database files commons.js , maskBG.png , subModal.js and loading.html The stylesheet subModal.css and finally image close.gif . It should be noted that I considered maskPG.png as a file and not an image because Lotus Notes does not yet support the integration of PNG files in the library image.

To use this library, you must first insert in the header of HTML files and javascript syle sheet:
  \u0026lt;head> 
\u0026lt;link rel = "stylesheet" type = "text / css "href =" subModal.css "/> \u0026lt;script type="text/javascript"
src="common.js"> \u0026lt;/ script>
\u0026lt;script type="text/javascript" src="subModal.js"> \u0026lt;/ script>
\u0026lt;/ head>

Then call the function showPopWin ('URL', width, height, fonction_javascript ). For example to open the dialog from a link:
  \u0026lt;a href="javascript:showPopWin('RSSFeed?openform&action=add', 600, 400, null); "> 
Add an RSS feed \u0026lt; ; / a>

To close the dialog box use the window.top.hidePopWin ();
Normally, if one uses this latter function with argurment true, a javascript function defined in the call for the dialog runs.

Remove RSS
To remove a feed, you must delete the document in the database and then delete the element on the page to avoid having to refresh the window.

To delete the item displayed in the page we'll use the DOM functions. The function will be:
  deleteDiv function (fieldname) {var obj 
;
var old;
if (obj = document.getElementById ('NewOrder')) {
if (old = document.getElementById (fieldname)) {
obj.removeChild (old);

}}}

where 'NewOrder' is the ID of the div containing all the RSS and son fieldname is the id of the block to delete 'NewOrder' passed as parameter.

To remove the Notes document can use the URL for http://serveur/path/base.nsf/vue/clé?deletedocument
Still do not have to refresh the window I run this url via AJAX. The delete function will be:
  DeleteEntry function (fieldname) {var 
myAjax = new Ajax.Request ('RSSByFieldname /' + fieldname + '? DeleteDocument');
deleteDiv (fieldname)}

where RSSByFieldname is a view sorted by 'fieldname'.

link to request removal of a wire is inserted into each block to display RSS feeds in the public loadRSS presented in Chapter 3 the form:
\u0026lt;a href = " javascript: DeleteEntry (\\''+ fieldName + '\\') "> Delete \u0026lt;/ a>

update an RSS feed
To update an RSS feed just recall the function specifying loadRSS the fieldname to reload. The link will also be integrated within each block to display RSS feeds from within function LoadRSS:
\u0026lt;a href="javascript:loadRSS(\\'' + url + + fieldname +'\\',\\'''\\',\\''+ nbentrees +'\\'); "> Refresh \u0026lt;/ a>

Creating and editing an RSS feed
For reasons of simplification of the code function of adding and editing of RSS feeds will be the same. To do this we will have:
  1. remove the faceplate of the RSS feed if it exists (in the case of a change)
  2. create a new block to display RSS feeds without displaying
  3. load RSS feed content in this block to appear
  4. Block
  5. destroy the object management & drag drop that does not support this new block
  6. rebuild a new object management & drag drop
Let the function: function addEntry
  (url, fieldname, nbentrees) {
deleteDiv (fieldname);

var newDiv Builder.node = ('div', {id
: fieldname, className: 'rss', style: 'display: none;'});
$ ('NewOrder'). appendChild (newDiv)
loadRSS (url, fieldname, nbentrees)
Effect.Appear (newDiv.id)
Sortable.destroy ('NewOrder');
Sortable.create ('NewOrder ', {tag:' div ', onUpdate: UpdateOrder});
}

Builder.node feature allows to quickly build a new DOM object. This function is provided in the bookstore scriptaculous.
Effect.Appear can bring up the new block with an effect of 'gradual emergence'. This function is also provided in the scriptaculous library.

It remains only to call this function from a Notes form displayed in a modal dialog box.

Mask creation / modification
The mask should contain the URL field (url of the RSS feed) and inputs (the name maximum lines to add web). In addition, it will also have to be able to access the value of field fieldname to pass a parameter to the function.

The problem is that the field fieldname is based on the UniqueID of the Notes document. Off, if it does not pose a problem for the modification of existing documents, it is much more annoying when creating a document to add a new RSS feed. The UniqueID of the document will be defined after saving the document. There must be many ways to handle this problem.
The solution is not to call the function to create new RSS feeds that the unload event and if the URL and a field whose value fielldname_tmp fieldname were indicated. I own it a bit far fetched ...
The mask is defined as:
  • a $ PublicAccess field: text calculated for formula creation with "1" (this helps to allow public access)
  • a URL field:
  • editable text field entries : number changed
  • a statement field_tmp with HTML field value for field fieldname type text calculated with the formula @ If (@ IsNewDoc; "" "taglist" + @ Text (@ DocumentUniqueID))
HTML is the statement: [\u0026lt;input type = "hidden" value = "field> fieldname>" name = "fieldname_tmp">]
can either declare the contents as brackets above the line or report in HTML relay.


It adds three buttons to mask
  • Close (hide if: @ IsNewDoc) with the formula web / javascript:
    window.top.hidePopWin ();
  • Save with formula :
    @ Command ([FileSave]);
    FIELD fieldname: = "taglist" + @ Text (@ DocumentUniqueID)
    @ Command ([FileSave])
  • Cancel with formula for Web / javascript:
    document.forms [0]. fieldname_tmp.value = "";
    window.top.hidePopWin ();
And finally, the unload event of the mask:
  if (document.forms [0]. URL.value! & Document ='' . forms [0]. fieldname_tmp.value !=''){ 
window.top.hidePopWin ();
window.top.addEntry (document.forms [0]. URL.value,
document.forms [0]. fieldname_tmp.value, document.forms [0]. entrees.value);}

can see that the Cancel button field empty fieldname_tmp thereby not to execute the function call to add / modification.

Download and demo Online

You can download a Notes database to test all the features of this AJAX RSS aggregator. The base also contains a module for creating RSS feeds in order to test the application. Remember to sign the structure and define the ACL.

You can also test online version of this module clamped, the shares are visible but not recorded in the database. If you reload the window you return to the base environment. Moreover, the addition of new RSS is idle son.

Sunday, July 9, 2006

Poems To Mom In Russian Or Ukrainian

WEBSITE - New design for the Blog

I tried customizing Blogger templates. Even if it is fashion and it's very convenient for the management of screen resolutions, I do not waste unnecessary space in blocks of fixed width. This is particularly important when the content is presented voluminous as this blog.


compatibility tests should not be any major compatibility problems for browsers, I tested the new interface in Microsoft Internet Explorer 6 and 7 Beta 2, as evidently as in Firefox 1.5.0.4 and Opera 9.0. Browsershots no longer appears to meet, I also quickly checked the compatibility with Safari on iCapture and Safaritest and under Konqueror Dillo and Lynx site Scapture . This result shows a somewhat truncated.
If you have a problem, please post a comment stating your environment.

New Features
lacks two features are essential to me on Blogger:
  • Research
  • The message categorization
Simply sorting by date may be sufficient to make news but it shows very fast its limits when the contents have no temporal relationship.

Research
A search is now being available at the top of this blog. This is the Google Ajax Search API . It's very simple to implement and customize. In addition, the update of the index is almost immediate. I think the API should be based on results from Google Blog Search .



The message categorization
Without going to implement a tag cloud, I find interresting can categorize messages by subject. To overcome this shortcoming, I developed what some might call a "gas factory". However, the result seems to work well and for minimum effort.
A LotusScript agent
will grab the blog feed and extract the title and first paragraph. It records the data on the Notes database examples. The category is automatically extracted from the title. Indeed, the current sytax tracks on this blog is CATEGORY - Title . It only remains to list the categories on the blog by inserting text via javascript. These categories link to a view of the Notes database that shows the titles and the first pargraphe items from a category.


surely I'll be back on the extractant which is a simple example of retrieving RSS feeds in Lotus Notes.

Friday, July 7, 2006

3 Dpo White Discharge

SITE - Creative Common and W3C

As you may have noticed in the right column, the information provided on this blog and based demonstrations are now under a Creative Common . This means that you can make any official information on the blog and in the demo database to the single condition to quote the author. This is not to flatter my ego but it seems that the French contract imposes this requirement.

Creative Commons License
Also I totally redevelop the demo database. It is not very visible but the homepage has successfully passed the tests XHTML 1.0 and CSS. Who said that Domino servers do not generate clean code?

Love Quotes Picnik 2010

AJAX - A customizable web page (3 / 4): Overview RSS

Now I can use the drag & drop and produce RSS son, remains to be assembled with two prototype, scriptaculous and a little DOM to the interpretation of the RSS file.

processing on the server or the client?
Recovery and Interpret RSS files can be done either on the server, either from the desktop. The solution outlined here is based on processing at the client. This helps avoid overloading the server, but causes strong constraints related to AJAX. Indeed, AJAX can not retrieve files outside the domain of the calling page (except for Microsoft Internet Explorer). Surely I would present later a method to overcome this problem but this is beyond the scope of this presentation.

For the occasion I made available three RSS feeds, since the test database , from views as described in the previous chapter. The blog feed is based on data recorded in the test database, not data BlogSpot, but again I return to this subject in a future article. Set

RSS feeds to get
Before displaying the RSS feeds you will have to store the list of URLs of RSS files to display. For that I rely on a Notes form similar to that shown during the presentation of the Drag & Drop
I need three fields:
  • The URL of the RSS feed: a free text field
  • Number entry to present: a field number or free text
  • position of the stream in the list: a field number calculated with the formula: 0

a view to presenting these son
The RSS page display RSS web son is actually a view. This view will be sorted from the field position. We do not want to display the URL of the wire but its content. The second column in the view will therefore present a call to a javascript function that displays the contents of the wire is clear:
  • first column (sort ascending): position
  • 2nd column: "\u0026lt;div id = \\ "taglist" + @ Text (@ DocumentUniqueID) + "\\" class = \\ "rss \\"> \u0026lt;script type=\\"text/javascript\\"> loadRSS ('"+ URL +"', 'taglist " + @ Text (@ DocumentUniqueID) + "'," + entries +");\u0026lt;/ script> \u0026lt;/ div> "
To recap, the definition of div containing the id of the document will be used for drag & drop. Function loadRSS takes three arguments, the URL of the RSS feed, ID div where to display the result and finally the number of entries to display. The view must be defined with the option "Treat contents as HTML" accessible from the third tab of the Properties view. The declaration of office and management of the drag & drop will be defined in the mask associated with this view.

mask to present the view
The mask should be named $ $ for ViewTemplate MaVueRSS where MaVueRSS is the name of the view created above. For simple reasons of simplification of presentation of the code I will define this mask with the option content type: HTML accessible from the second tab of the options mask.

Management drag & drop
As seen in the first section of this presentation, management drag and drop with Scriptaculous is really very simple.
 \u0026lt;head> 
\u0026lt;script src="scriptaculous/lib/prototype.js"> \u0026lt;/ script> \u0026lt;script
src="scriptaculous/src/scriptaculous.js"> \u0026lt;/ script> ;
\u0026lt;/ head>
\u0026lt;body>
\u0026lt;div id="NewOrder">
FOR INTEGRATED
\u0026lt;/ div> \u0026lt;script type="text/javascript">

Sortable.create ('NewOrder', {tag: 'div'});
\u0026lt;/ script>
\u0026lt;/ body>
Compared to the first section we can note the {tag: 'div'} which defines the drag & drop does not apply to a tag \u0026lt;li> as default but a \u0026lt;div> as defined in the view.

Recovery RSS
Using prototype simplifies AJAX call to retrieve the RSS feed:
 loadRSS function (url, fieldname, nbentrees) 

{var = new Ajax.Request myAjax (
url

{method: 'get',
});}

Interpretation of Feed
The interpretive function of the RSS feed should be called when the file was recovered, either onComplete event. The function automatically receives as parameter the query result: OriginalRequest . A file

RSS is an XML file, like Google Maps . The advantage of not being able to exit the field is that one can master the syntax of this format and thus greatly simplify the code. An example of Javascript code to retrieve the information displayed is:
 loadRSS function (url, fieldname, nbentrees) 

{var = new Ajax.Request myAjax (
url

{method: 'get',
onComplete: function (OriginalRequest) {items =
originalRequest.responseXML;
if (parseInt (nbentrees) == 0) nbentrees = '5 ';
var items_count
= (parseInt (nbentrees) \u0026lt;items.getElementsByTagName (' item ' ). length)?
parseInt (nbentrees): items.getElementsByTagName ('item'). Length;

for (var i = 0; i \u0026lt;items_count; i + +) {
root_node items.getElementsByTagName = ('item') [i];
title
root_node.getElementsByTagName = ('title') [0]. firstChild.data;

root_node.getElementsByTagName link = ('link') [0]. firstChild.data;
publication =
root_node.getElementsByTagName ('pubDate') [0]. firstChild.data;

root_node.getElementsByTagName author = ('author') [0]. firstChild.data;

}}}
);}
Javascript Not being an expert, I agree happy all reviews for optimizing code.

Display result
To display the result in the \u0026lt;div> I use one of the most essential functions of the prototype to my taste: $ ('id ').
$ ('id') can simply retrieve the element with id 'id'. In the present case, 'id' is fieldname. To integrate HTML into the div I'll use innerHTML . The final code of the function is:
 loadRSS function (url, fieldname, nbentrees) 
{var
myAjax = New Ajax.Request (url
,

{method: 'get',
onComplete: function (original request) {
items = originalRequest.responseXML;
if (parseInt (nbentrees) == 0) nbentrees = '5 ';
was items_count
= (parseInt (nbentrees) \u0026lt;items.getElementsByTagName ('item'). length)?
parseInt (nbentrees): items.getElementsByTagName ('item'). length;

was feed = '\u0026lt;h1> ; '+
items.getElementsByTagName (' title ') [0]. firstChild.data +' \u0026lt;/ h1> ';

for (var i = 0; i \u0026lt;items_count; i + +) {
root_node = items.getElementsByTagName ('item') [i];

root_node.getElementsByTagName title = ('title') [0]. FirstChild.data;

root_node.getElementsByTagName link = ('link') [0]. FirstChild.data;
publication =
root_node.getElementsByTagName ('pubDate ') [0]. firstChild.data;

root_node.getElementsByTagName author = (' author ') [0]. firstChild.data;

feed + =' \u0026lt;h2> \u0026lt;a href = '+ link +' > '+ title +
' \u0026lt;/ a> \u0026lt;/ h2> \u0026lt;h3> '+ author +' '+
publication +' \u0026lt;/ h3> ';}

$ (fieldname). InnerHTML = feed;}

});}

By adding a few lines of CSS style you get the result shown on the demo database .

Wednesday, July 5, 2006

Run Sims 3 Fromdisc Image On Mac

son of AJAX - Autocompletion V3: Field multivalued

Digging a little in the Autocomplete options, I discovered the " tokens" that can define a separator value. This allows then to run a search on a field multivalued Lotus Notes.

The only things to change to manage research on a multivalued field are:
  1. Declare the Notes field with the option "Allow multiple values "
  2. In order to research, specify the column that displays the names of " Show multiple values as separate entries "
  3. Modify Autocomplete to the call by adding the optional tokens:
      new Ajax.Autocompleter ( "autocomplete", 
    "autocomplete_choices"
    "scriptaculous? createDocument" {tokens: ',' });
In this configuration I set the comma-separated values. We specify additional characters. For more information visit the using script.aculo.us.


To test the autocompletion on multivalued field is always on the same page.