Friday, January 20, 2012

Dijit.TabContainer Tutorial That Dynamically Selects The Opened Tab Even after Refreshing the Xpage

Using the native dijit.TabContainer in XPages entails a lot of Coding than the drag-and-drop Tabbed Panel control. Though we configure a lot using this, it has an advantage in loading and usability. We could choose tab that doesn't need to load/refresh the page. Because sometimes we use Full Refresh in Events, the dijit.TabContainer will go back to the first tab.

For this predicament, Ive searched the resolution. I save the selected tab and use it dynamically to select that tab when fully update is fired.

Here is the code for the XML of the Tab Container.

   
    
    
   
   
    
     
     
    
        
        
    
     
     
    
                       



var tabs = dijit.byId("tabsContainer");

//Select the dijit if the cookie is defined then we select the tab that is saved in our cookie

if(String(dojo.cookie("selectedTabID"))!="undefined"){

      var tabs = dijit.byId("tabsContainer");

      //If pane is existed then select the child(ContentPane) in TabContainer

      pane = dijit.byId(String(dojo.cookie("selectedTabID")))

      if(pane){

            tabs.selectChild(pane);

      }

}

//if child is selected using the selectChild then we save the child(ContentPane)’s id in the cookie name selectTabID

dojo.connect(tabs,"selectChild",function(child){

      dojo.cookie("selectedTabID", (child).attr("id"));    

});

Thursday, January 19, 2012

ibm.xsp.widget.layout.DateTextBox in Xpages


Sometimes in every software development we do, we often learn the hard way. Though we read plenty of forums and blogs, we often find something that is unique from the previous task we have done.

Date Time Picker in XPAGES


Cite for example is Calendar Date Time Picker, where dojoType ibm.xsp.widget.layout.DateTextBox is associated into after page load. Firefox, Google Chrome and Safari rendered the Calendar Date Time Picker properly. But in IE is sucks. Yes it sucks. Though we apply the Emulator for IE8 or IE9, still it doesn't work properly. But we can’t tell this to the client that they must use other browser other than IE because most of the end users comfortably utilizing the Internet Explorer. So we must find a workaround.
After spending time and effort in debugging what went wrong in Calendar Date Picker in IE, I finally found the workaround.

In Calendar Date Picker in XPage, it has ibm.xsp.widget.layout.DateTextBox dojoType. And when the browser launch the Xpage,  parseOnLoad is set to true even if you set it to false in Custom Control Properties ->All Properties ->dojo->dojoParseOnLoad.
So the parsing of the dijit will occur immediately but as IE as being "slow renderer", the Calendar Picker sometimes or most of the time does not parse properly.
To save you from headache, parsing  the dijits manually after page load. Doing so is calling one function away:
You could stipulate the code in Client Side javascript Library or in onClientLoad of custom control or XPage.

dojo.addOnLoad(function( ) {

                dojo.parser.parse(); //manually parse after the page loads

});


This will give you assurance that the Calendar Date Picker will load properly. Or you could load specific dijit component by supplying parent node as parameter for parsing such as dojo.parser.parse(document.getElementsByTagName("button")[0].parentNode);




You can find the reference for this code in Oreilly's Dojo: The Definitive Guide June 2008 page 258.


Another workaround that i found is without using the compatibity mode and can be found here

Monday, June 13, 2011

Update the Index of Database

Sometimes in properties in the Lotus Notes Database doesnt work to rebuilt the index by using the Delete and Create and Update. 

So to totally rebuilt the document's index, try to execute the following code in the Domino Administration in Server Console:



load updall databasepath -R
load updall databasepath -X



Wednesday, May 25, 2011

How to set up domino directory assistance

One of the problems I encountered was to set up directory assistance in my own server to test the other names2.nsf to work properly in my server or other server. And when I ask our Administrator, he guided me and return to my desk to document what he taught me. And here it is


1. Create new database named it names2.nsf using the template in Domino Directory(pubnames.ntf)
2. Then create new database da50.nsf using Domino Directory Assisstance template.
3. Then open the da50.nsf and click the Add Directory Assistance




4. And then click the Domino Tab And go back to the names2.nsf. Click the Edit->Copy As-> Application Link


5. And paste the link to Application links Box



6. Then open the Domino Administration and click the


7. Then enter the path of domino directory assistance


8. And you will notice in the Configuration that the database has been included in the Directory Information



9. Restart the server to take effect the configuration

Software Development



Plenty of things ive learned from reading the first chapter of the Head First Software Development - O'Reilly Media. It really amazed me because everything that has been discussed or tackled is very relevant with what ive been doing right now. And hopefully i will going to finish this wonderful book immediately.


And here is the brief summary of the First Chapter:




Sunday, May 22, 2011

How to set the values of Namepicker in to the main server instead of Local server(contact Directory) when accessing the XPAGES Application in lotus Notes Client


Set the value of the following:

dataProvider: DominoNABNamePicker
addressBookDB: {servername}!!{databasename}
addressBookSel: db-name

  Code:

       
                
     


Friday, May 20, 2011

How to set up/ install the extension Library in the Lotus notes Client



I have this problem that how to install the extension library in Lotus Notes Client because it requires to Install the extension in the Lotus Notes if the application will be accessing in LN aside from Web.But after searching the workaround such as installing the package as Widgets, i came across the Wildfire widgets. It explains in the installation how to enable the File->Application->Install.

See the Image below the application properties in the designer that requires extension library to be installed in LN Client.  


1.        Close you Lotus Notes client
2.       Browse to the plugin_customization.ini in the notes framework\rcp
a.       Add com.ibm.notes.branding/enable.update.ui=true
For more information about plugin_customization click here
3.        Save and close file and restart Lotus Notes
4.        You should now find the Install menu option available in Lotus Notes.
5.        Select File -> Application -> Install.

 6.       Add the Extension Library update site zip file:



7.        Reply to the questions and restart Client
8.        Open the application that uses the Extension Library and it works now properly




Locations of visitors to this page