Monthly Archives: August 2013

Using HTML5 pattern attribute in XPages

While going through some new form additions in HTML5 I came across a new attribute pattern. This attribute lets you add regular expression in markup itself to validate the contents of your input field. For e.g. pattern=”[A-Za-z]{5}” would mean that the input field accepts only uppercase and lowercase alphabets with 5 exactly characters.

Continue reading

Share:

Using JSF Framework Development Standards for your XPages Project (Part Five: The View)

In the previous installment of this series we completed our Model layer described in the Model-View-Controller (MVC) architecture. In that article we covered the façade (or service) layer:

  • EmployeeCRUDFacade: A service layer class to handle data manipulation and data business rules for access by client code that should not work directly with the model layer.

Examples of data manipulation code and data business rule code include:

  • Calculate the age of an employee. Your database holds a birthdate, but not an age.
  • Calculate the number of years an employee has worked for your company. Your database holds a hire date but not a length of time.
  • Calculate the number of approvals required for a time off request that exceeds a certain number of hours.

Examples of client code that should never access the model directly include:

  • Workflow processing code.
  • External system integration code.
  • UI code (a managed bean…covered in this article).

It may appear on the initial design of an application that this layer is just adding extra code. In other words, why not just let my view bean access the DAO? Continue reading

Share:

Implementing drag and drop in XPages using Dojo

Drag and drop can very useful for users and in case of Notes/Domino there are operations like moving documents to folder or trash which can utilize this technique. In this article I would be implementing drag and drop in XPage using Dojo.

In any drag and drop operation there are two elements – first the element which would be dragged and other are the containers where it would be dropped. Dojo provides dojo.dnd.Source to define element which would be dragged and dojo.dnd.Target as the containers.

Before we start we need to load the Dojo module dojo.dnd.Source and its appropriate style sheet. This can be done with below code: Continue reading

Share:


Fatal error: Call to undefined function bccl_full_html_license() in /var/sites/p/pipalia.co.uk/public_html/wp-content/themes/pipalia-ltd/archive.php on line 57