Friday, 18 May 2012

                    javaScipt validation



<script type="text/javascript">
 function submitLeadForm()
 {
  var form = document.getElementById('leadForm');
  var regEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
        if(form.email.value=='' || !regEmail.test(form.email.value))
  {
   alert('Please fill your email address');
   form.email.focus();
   return false;
  }
  if(form.mobile.value=='' || isNaN(form.mobile.value))
  {
   alert('Please enter valid mobile no.');
   form.mobile.focus();
   return false;
  }

  if(form.mobile.value.length<10)
  {
   alert('Please enter 10 digit mobile no.');
   form.mobile.focus();
   return false;
  }

  return true;
 }
</script>

Tuesday, 15 May 2012

How to play you tube video in your web sites



http://www.youtube.com/watch?v=LHxcfW9et3w&feature=related            =(you tube link)
http://www.youtube.com/embed/LHxcfW9et3w                                             =(prepare this link as)

Tuesday, 8 May 2012


Liferay Poratl Introduction

Liferay Portal is a free and open-source enterprise portal written in Java and distributed under the GNU LGPL. Now in its eleventh year of development, the award-winning product is one of the most widely deployed portal technologies on the market, with an estimated 250,000 deployments worldwide. More than a portal, Liferay is a platform for creating effective  business applications and solutions. It offers a robust feature set, impressive scalability, time-saving development tools, support for over 30 languages, and a fexible, scalable architecture that is open-source developed and enterprise refned.
  • Created in 2000 and open sourced in 2002.
  • First portal to introduce Web OS
  • First portal to deploy AJAX enabled user interfaces
  • Members of the JSR 286 (Portlet Specification) & JSR 314 (Java ServerFaces Specifications) Committees
Liferay Portal is the world’s leading open source enterprise portal solution using the latest in Java and Web 2.0 technologies.
  • Built in Content Management System (CMS) and Collaboration Suite
  • usablility—choose from over 60 portlets and over 20 plus themes
  • development tools
  • Runs on all major application servers, databases and operating systems (over 700 deployment configurations)
  • Community-centric services for easy creation of extranets, intranets, and social networks
  • Familiar desktop UI and conventions
  • Delegable granular security and role based authorizations
  • Service Oriented Architecture (SOA) with web services support
  • LDAP support and integration
  • Portal as a Platform services for rapid portal development and deployment
  • Secure enterprise application integration framework
  • Ready integration:
  1. Pentaho
  2. Intalio
  3. Terracotta
  4. ICEfaces
  5. jQuer
  6. Business Intelligence
  7. Business Process Management
  8. Scalability and high availability
  9. Rich Internet applications
  10. Dynamic user experiences
Standards Compliant: JSR-286, JSR-170, JBI, WSRP
What is Liferay Portal?
  • Liferay Portal is the world’s leading open source enterprise portal solution using the latest in Java and Web 2.0 technologies.
  • Runs on all major application servers & servlet containers, databases, and operating systems with over 700 deployment combinations.
  • JSR 168 and JSR 286 compliant.
  • usability with over 60 portlets pre-bundled.
  • Built-in Content Management System (CMS).
  • Built-in Collaboration suite.
  • Personalized pages for all users.
  • Hot-Deployable Theme/Portlet Architecture with Online Software Catalog.
  • Freeform / WebOS layout.
  • Just-in-time Portlet rendering.
  • Fine-grained permissions system.
What are JSR 168 and JSR 286?
  • JSR 168 and JSR 286 are Portlet Specifications.
  • They were created out of a need to have a specification for displaying multiple applications on the same page.
  • The specs define the lifecycle of a portlet as well as its characteristics/look and feel.
  • They standardize the way portlets are developed.
What is a portlet?
  • A portlet is a web component that processes requests and generates dynamic content.
  • The content generated by a portlet is also called a fragment (e.g. HTML, XHTML, WML) and can be aggregated with other fragments to form a complete document.
  • Portlets as fragments of an HTML page:
Portlet Lifecycle
  • Portlets are different from servlets in that they have a 2 phase commit.
  • With servlets, the service() method processes all requests.
  • With portlets, the processAction() method processes the requests and the render() method draws the contents of the portlet on the page.
Methods()
  • init() – Initializes the Portlet.
  • processAction() – process input from a user action.
  • render() – Renders the content output.
  • destroy() – Cleans up the portlet
  • serveResource() – Allows a portlet to serve a resource.The serveResource() method can be used to implement AJAX use cases.
  • processEvent() – Perform events triggered by other portlets. (IPC)
Liferay Implementation
  • Portal RequestLifecycle (1)  -PortalRequestProcessor
  • Portlet RequestLifecycle (x)  - PortletRequestProcessor
These extend TilesRequestProcessor in Struts!
Portlet Characteristics
Portlets have additional characteristics that make them different from Servlets
  • Portlet Modes
  • Window States
  • Portlet Preferences
Portlet Modes
  • Each portlet has a current mode, which indicates the function the portlet is performing.
  • All JSR 168 compliant portals should support the View, Edit and Help modes.
Window States
  • Window states indicate the amount of portal page space that will be assigned to a portlet.
  • All spec compliant portals should support the minimized, maximized and normal window states.
Portlet Preferences
  • Portlets can be configured to provide a custom view or behavior for different users.
  • For example, a weather portlet can show the temperature in Chicago for one user and the temperature in LA for another user.
  • These configurations are represented as a persistent set of name-value pairs and are referred to as portlet preferences.
Portlet Development Strategy
  • Overview recommended best practices for developing portlets and extending Liferay Portal’s functionality.
  • Understand the compromises involved in each of the methods.
  • Evaluate how to combine the different methods for the needs of your organization.