View RSS Feed

All Blog Entries

  1. JSF Action Events

    by
    JSF
    , 07-07-2012 at 04:54 PM
    For UI Command objects, emission of the action events takes place. When Command button is pressed by a user or a hyper link is clicked, generation of such events take place. Number of listeners could be attached to the source. For instance, let us consider the given code:

    Java Code:
    <h:commandButton value = "Test Action Listener"
    actionListener = "#{testActionListener.doSomeAction}" />
    An attribute known as actionListener is defined ...
    Categories
    Event
  2. JSF Event Classes

    by
    JSF
    , 07-07-2012 at 04:52 PM
    Interfaces which are related with JSF events are present in package'javax.faces.event'. All Events present in JSF shall be extending the javax.faces.event.FacesEvent. This class’s constructor has argument UIComponent that would be making it specific that this Event is for which UI component.

    Java Code:
    UIComponent someComponent = new UIComponent();
    MyFacesEvent event = new MyFacesEvent(someComponent);
    UIComponent sourceCompoenent = event.getComponent();
    ...
    Categories
    Event
  3. Handling Events in JSF

    by
    JSF
    , 07-07-2012 at 04:51 PM
    JSF event model is basically based upon the Event driven programming of Java that is available typically just along with the GUI applications. In case you have familiarity to the swing programming, this could be understood easily the event handling models present in JSF framework. Concept present behind this event model is that user interfaced objects have a listerner’s list. Such listeners get notified when an event is generated by the user interface objects. This shows that when a component is ...
    Categories
    Event
  4. Architecture of JSF Framework

    by
    JSF
    , 07-07-2012 at 04:50 PM
    Name:  1.jpg
Views: 814
Size:  28.3 KB

    Architecture of JSF Framework

    Framework of the JavaServer Faces is created at the MVC designed patterns. Basic advantage to use the MVS is to make separation b/w view tier and Model tier so that it could be made possible to do the extensions of the capabilities and also to do integration with some other frameworks, without any disturbance.

    Faces Servlet handles the communication that takes place b/w view tier and model. ...
  5. What is Java Server Faces(JSF) framework?

    by
    JSF
    , 07-07-2012 at 04:48 PM
    JSF is considered to be the application framework which creates the user interface. If you know about struts and swing then consider the JavaServer Faces to be the two framwork’s combination. Just like Struts, web app lifecycle management would be provided by JSF via controller servlet. And just like Swing, a rich “component model” is provided by the JSF along with component rendering and event handling.

    Web application development is eased by JSF because:

    • Allows
    ...
    Categories
    Frameworks
  6. JSF Life Cycle

    by
    JSF
    , 07-07-2012 at 04:47 PM
    JSF web application’s life cycle takes its start when a request is made by a user. When a page is submitted various other tasks would be performed, for example data validation given in the components, conversion of data etc. Therefore various steps are present which are followed by an application which is known to be the life cycle.

    Name:  1.jpg
Views: 719
Size:  59.3 KB

    JSF Life Cycle

    1. Restore view phase:
    When a JSF page is requested by a user by clicking ...
    Categories
    Tutorial
  7. JSF Architecture

    by
    JSF
    , 07-07-2012 at 04:45 PM
    When integration of the MVC designed pattern was done to create JSF so that greatly maintainable applications could be designed. For understanding of these facts, it is required to have the understanding that what is MVC pattern or how it assists in application designing so very well and how one could be making an application easily maintainable.

    An application design is split into 3 parts, by the help of MVC design pattern.

    Model : Model handles logic and data. ...
    Categories
    Tutorial
  8. JSF Components

    by
    JSF
    , 07-07-2012 at 04:44 PM
    Components present in JSF are elements, for example buttons, table, text box etc. which could be used for creation of UI of the applications of JSF. Such objects manage the user interaction. One may be creating:

    1. Simple components, for example button, text box and
    2. Compound components, like data grid, table etc.

    Various components that are present in a component is referred as a compound component. Developers are assisted by the components to make UIs when ...
    Categories
    Tutorial
  9. JSF Features

    by
    JSF
    , 07-07-2012 at 04:42 PM
    JSF is a framework that is considered to be very rich featured in Java technologies. Standard features that are provided by JSF which would be making it a standard and powerful thing among other technologies to develop the web applications. Few features are here so that this statement could be justified.

    1. JSF is considered to be a standardized web user interface framework, for Java.
    2. Developed at the Servlet API top.
    3. JSF is basically a component framework
    ...
    Tags: jsf features Add / Edit Tags
    Categories
    Tutorial
  10. What is JSF?

    by
    JSF
    , 07-07-2012 at 04:41 PM
    JSF is basically a new kind of standard framework that has been developed via JCP which makes it an easy task to make user interfaces, for web applications. This is usually done when reusable components which are present in a page are assembled. One might be thinking a JSF framework to be a toolbox which has ready-to-use components so that such components might be used multiple times for adding and reusing them. Therefore, JSF applications are considered to be event driven. Typically, you can embed ...
    Tags: what is jsf? Add / Edit Tags
    Categories
    Tutorial
  11. Why JSF?

    by
    JSF
    , 07-07-2012 at 04:35 PM
    First it shall be understood that what the reasons which initiate the JSF projects are. Why JSF has been considered to be very hot today? Reasons are there to develop the new frameworks rather than other many present already like Struts, JSP and Servlets. If a complexed web application has been developed in JSP, then this shall be kept in mind that certain complexities would be related.List of few problems related with certain technologies are given as following:

    • Tedious and repetitive
    ...
    Tags: why jsf? Add / Edit Tags
    Categories
    Tutorial
  12. JNDI Best Practices

    by , 07-07-2012 at 04:29 PM
    Remote JNDI lookup are considered as quite expensive sort of remote method call. For performance of JNDI lookup, applications will be doing it once. Hence home handles caching will be improving the performance in this kind of situation. It is also an expensive task to make a connection with JNDI. Caching of these context references will be improving the performance of applications.

    One class is used for abstraction of all usage of JNDI and also EJB home object lookup, initial context ...
    Categories
    Tutorial
  13. Using jndi in user authentication

    by , 07-07-2012 at 04:28 PM
    JNDI is used as naming service. It is commonly used to give security mechanism to make users authenticated to access the system resources. Credentials and user information is stored in directory services as entries. It is worthy to point it out that security model is not defined by JNDI however security model is used which has been defined in directory service.

    Default initialContext is involved in creation of new Context that is in use of anonymous clients.
    Java Code:
    // Connect
    ...
    Categories
    Tutorial
  14. JNDI Context Operations

    by , 07-07-2012 at 04:26 PM
    When connection of client is made with JNDI services and JNDI context i.e. usingInitialContext() is obtained then any interface method could be applied. Basic javax.naming.Context interface operations included are bind() usage so that an entry could be added, rebind() so that an entry name could be replaced, lookup() so that to locate or to find an object, & unbind() so that an entry could be deleted. Given below is a figure which illustrates such kind of operations. Logically it is said that ...
  15. LDAP Programming with JNDI

    by , 07-07-2012 at 04:24 PM
    Objects present in LDAP server could be manipulated by connecting with server. Also, you may require the authentication with server. For making connections with server get a reference of DirContext interface to an object. This is done with class InitialDirContext that would be taking hashtable.

    Given code could be used for authentication and connection of user with LDAP server. It shall be noted that simpler authentications are used over here. Simpler kind of authentications include ...
    Categories
    Tutorial
  16. RMI Registry Service Provider for JNDI

    by , 07-07-2012 at 04:23 PM
    Service providers like RMI registry permits the applications of JNDI so that remote objects could be accessed that are registered along with “RMI registry”. Once registry location is known, naming context is created by the provider for those objects that have been registered into registry. In some other JNDI namespace, like LDAP, it is possible to bind this context. Functionality that has been offered by class java.rmi.Naming gets subsumed by this new functionality.

    Major benefit ...
  17. JNDI and J2EE

    by , 07-07-2012 at 04:21 PM
    JNDI is considered to be the standardized service API, of J2EE platform. It gives a standard API to application components so that to refer to the resources as well as other components of other applications. A standard naming policy is defined by J2EE so that it could be used along with JNDI so that it could be made possible to write applications in “deployment” environment independent way. J2EE services could be referenced by just looking at them accordingly by considering logical names present ...
    Categories
    Tutorial
  18. The JNDI APIs

    by , 07-07-2012 at 04:20 PM
    Five packages are present in JNDI APIs:

    • javax.naming: Interfaces and classes are present to access the naming services. E.g., Context interface is defined by it that is considered as an entry point into naming so that lookup could be performed.
    • javax.naming.directory: Naming package is extended so that interfaces and classes could be provided to access the directory services. E.g, new classes are added for attributes and DirContext interface is provided that present
    ...
    Categories
    Tutorial
  19. Modifying JNDI Directory Entries

    by , 07-07-2012 at 04:19 PM
    Directory entry’s attribute values modification usually involves the usage of modifyAttributes() of DirContext. This method’s one variant would take the modification type, directory name entry and also anAttribute object which hold modified Attributes object. Other variant would be taking name as well as javax.naming.directory.

    E.g, let us assume that phone number “303 454 3365” is required to be removed from attribute telephonenumber of entry of a user and to be replaced with some ...
    Categories
    Tutorial
  20. Binding JNDI Objects

    by , 07-07-2012 at 04:17 PM
    Subordinates of Context are stored as Binding objects set. Binding is basically an association present b/w objects and name. Hence it has already been observed that Binding objects hold its name, object and its class. A newer Binding could be added to Context along with thebind() method. E.g, Addition of binding could be done to already existing Context as following:

    Java Code:
    java.io.File newfile = java.io.File("c:\temp\newfile");
    tempContext.bind("newfile",
    ...
    Categories
    Tutorial
  21. Listing the Bindings of a Context

    by , 07-07-2012 at 04:16 PM
    Context’s listBinding() method give out some alternate mean to access the Context children. It has been seen that aNamingEnumeration would be returned by the list(), of NameValuePair objects where access is being provided by every NameValuePair to the class name and name of every single child present in Context. A NamingEnumeration is also returned by listBinding() however in this particular case Binding objects are present in enumeration. NameValuePair has a subclass Binding. Actual child object ...
    Categories
    Tutorial
  22. How JNDI Names Work

    by , 07-07-2012 at 04:15 PM
    Children name of any Context is being allowed to be listed by list() method. It has just been seen that children name could be listed of a Context when list() method is called by usage of empty string, as a parameter. Now let us assume again that Contextobject is there for naming the subdirectories which are present under javax.
    Java Code:
    NamingEnumeration childrenOfNaming = namingContext.list("");
    Result that would come out would be NamingEnumeration which holds objects ...
    Tags: jndi names Add / Edit Tags
    Categories
    Tutorial
  23. Listing the Children of a JNDI Context

    by , 07-07-2012 at 04:13 PM
    One common operation of JNDI is name’s list retrieval of the children. E.g, Enterprise JavaBeans names could be obtained by an application to check if one of them is running or childer names list of InitialContext so that Swing JTree component could be populated. Object’s children names are listed by the help of list() method.
    Java Code:
    NamingEnumeration children = initialContext.list("");
    Javax.naming.NameClassPair object’s javax.naming.NamingEnumeration is returned ...
    Tags: jndi context Add / Edit Tags
    Categories
    Tutorial
  24. Looking Up Objects in a JNDI Context

    by , 07-07-2012 at 04:12 PM
    By name retrieval of an object from naming or directory system is known as looking up object. This is lookup() method’s job. Lookup performance is considered analogous to obtain a friend’s number from some phone book by his name. JNDI could be used so that to look up or retrieve EJB components from remote object or application server, from remote “RMI” registry.

    When lookup() is called, child’s name is specified of the required context.A java.lang.Object is returned by lookup() which ...
    Tags: jndi context Add / Edit Tags
    Categories
    Tutorial
  25. Using the JNDI InitialContext Class

    by , 07-07-2012 at 04:10 PM
    Context interface is implemented by Class javax.naming.InitialContext and is considered as enterance point in a naming system. InitialContextobject shall be created first for using JNDI so that objects could be accessed. Set of properties are taken by the InitialContext constructor in a form like java.util.Hashtable and other subclasses, like a Properties object. In lookup e.g, InitialContext is created as following:

    Java Code:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    ...
  26. Introducing the JNDI Context

    by , 07-07-2012 at 04:08 PM
    Names are associated with objects by a naming servie. Association b/w an object and a name is known as binding. Such binding set is known as a context. Name present in one context could possibly be made bound with other context which utilizes similar naming conventions. Bound context is known as subcontext. For instance directory present in a filesystem is those contexts which hold binding b/w objects and filenames which are used for manipulation of files by the system. If a binding is present ...
    Tags: jndi context Add / Edit Tags
    Categories
    Tutorial
  27. A JNDI Example

    by , 07-07-2012 at 04:06 PM
    In naming systems, an object could be accessed by creating initial context for sake of a naming system so that an entry point could be gained into a naming system. Once initial context is present, an object could be looked up by name.

    Java Code:
    import java.util.Properties;
    import javax.naming.*;
    
    public class Lookup {        
      public static void main(String[] args) {        
        String name = "";
        if (args.length > 0)
    ...
    Tags: jndi example Add / Edit Tags
    Categories
    Tutorial
  28. Naming and Directory Concepts

    by , 07-07-2012 at 04:03 PM
    Directory and naming concepts would be explored deeply so that to give a little introduction of JNDI. It will also be discussed that how directory or naming services would be used by Java programs.

    Naming services are the concepts by which an association is made b/w names and objects. Objects founds are based upon the names. Naming service’s basic function is to map down those names which are people friendly to the objects like identifiers, addresses or objects which are required ...
    Categories
    Tutorial
  29. JNDI Architecture

    by , 07-07-2012 at 04:02 PM
    JNDI architecture and JDBC architecture is somewhat similar. Both of them are involved in providing standardized API which is protocol independent created at the protocol specific driver’s top or the provider implementations. Data source in use will be insulating the application, for example, this doesn’t really matter whether LDAP or NDS directory services will be accessed by the application.

    Both SPI as well as API are included in JNDI architecture as it has been given in figure. ...
    Categories
    Tutorial
  30. JNDI Context and InitialContext

    by , 07-07-2012 at 04:00 PM
    In JNDI, Context interface has a very important and central role. A set of bindings are presented by a context within a naming service in which similar naming convention is being shared. Methods are provided by the context object to bind the names with objects and unbind them from objects and also to list down the bindings.

    Subcontext functionality is also provided by few naming services. This is same as a directory which is present in some filesystem. Basically, subcontext is that ...
Page 4 of 48 FirstFirst ... 2345614 ... LastLast