Tech I Enjoy Logo
Custom Search
   Log In    OR    Register  


Home >> Miscellaneous >> Miscellaneous

Author: Tech I Enjoy !!!

Copyright Notice: All Rights Reserved with Author of this Page.

Example using Quartz Scheduler :
Example using Quartz Scheduler




Some Writings on Mule ESB as follows:
Mule ESB File Transport
Using Mule ESB File Transport Example
Discussed.

Mule ESB JMS Transport	
Using Mule ESB JMS Transport Example
Discussed.





Example on using JSF version 1.0:
JSF Example

JSF selectBoxes, selectItems, outputText, inputText, commandButton, JSF version 1.0

JSF example covering checkboxes, radio buttons and many more tags.

JSF example with many more JSF tags.

JSF example with dataTable JSF tag.

JSF example on input fields Validation.

Properties Resource Bundle using JSF

Using JSP Tag Library:
Example covering JSP basic Tag Library

Example using Apache Log4j:
Log4j Example

Example on using Log4J

Using Apache Commons Logging

Multiple logger configuration using Log4j API

JDBC Transaction Isolation Level Explained/Described :

JDBC Transaction Isolation Level - Short Description

DOJO - Toolkit for rapid User Interface development with lots of Widgets offering
Dijit's Dialog with an Example

Dijit's Tree with an Example

Google GWT and Example source code

When it comes to Unit testing a piece of Java code, I
prefer JUnit.

When it comes to check the coding style of my java code,
I prefer Checkstyle.

When it comes to check how much percentage of code is being
covered under unit testing while using JUnit framework,
I prefer Cobertura.

Let us explore an example of using GWT and EXT GridPanel
with Store from EXT.

GWT EXT - GridPanel and its usage using Store, MemoryProxy
and ArrayReader.

One has to obtain GWTEXT along with Google's GWT in order to
make this example work.

Software environment used for this example as follows:
  • Eclipse 3.5
  • Java 5.0
  • GWT 2.0.3 Plugin for Eclipse
  • EXT 2.0.2
  • For creation of a GWT web application project, Steps include: 1. openning the GWT Web Application Project wizard, and filled all the required details such as project name, package, unchecked "Use Google App Engine", and used default checkbox "Use Google Web Toolkit" and using default SDK (GWT - 2.0.3) 2. On Finish, all the default folder structures including src, war, and test automatically created for me. 3. Most of the packages like client, shared, server folders appended to the initial package choosen for the project. 4. In this example the root package choosen/mentioned as example. So the Example.gwt.xml file will be automatically created in this "example" package, while the GWT Web Application Project is first created. 5. Initially Example.gwt.xml file has many such tags specific to this module. Before actually adding any more code or related files to make this Project uses EXT features, I thought to compile and run this project and see if it works with all default settings. 6. Using the toolbar and selecting the example project and then clicking the "GWT Compile Project" and running GWT compiler will all the default settings.....was able to compile this example project successfully, with the console output as follows:
       Compiling module example.Example
       Compiling 6 permutations
          Compiling permutation 0...
          Compiling permutation 1...
          Compiling permutation 2...
          Compiling permutation 3...
          Compiling permutation 4...
          Compiling permutation 5...
       Compile of permutations succeeded
    Linking into D:\GWT-Workspace\Example\war\example.
       Link succeeded
       Compilation succeeded -- 42.204s
    
    7. After successfully compiling the example project, then came
       the time to test it. So selected the Example.html under war
       folder, right clicked and selected "Run As"->"Web Application"
       with the "blue g icon" showing the GWT specific web application.
    
    8. Once the GWT Developement mode console started successfully
       without any errors, time came to test the Example.html file
       using a URL something like 
         "http://127.0.0.1:8888/Example.html"
    
    9. It was real good to see the final screen on browser and 
       a sense of satisfaction that everything is working so far.
    
    10. Then I started to integrate EXT with this example, by
        copying gwtext.jar file to the war\web-inf\lib folder.
    
    11. Then I created a JS folder under war folder and moved
        selected js files from the EXT zip file to the project
    	war folder.
        Please refer appropriate license before use
    	war->js->ext-all.js
    	war->js->ext-core.js
    	war->js->adapter (from the EXT 2.0.2)
    	war->resources (from EXT 2.0.2)
    
    12. The main HTML file that is used for testing is "Example.html"
        requires usage of js and css files as follows:
    
    <link rel="stylesheet" type="text/css" href="resources/css/ext-all.css"/>
    <script type="text/javascript" src="js/adapter/ext/ext-base.js">
    </script>
    <script type="text/javascript" src="js/ext-all.js"></script>
    
    13. After completing all the steps, I tried my code with the EXT
        specific api and try GridPanel, MemoryProxy and Store api.
    
    14. Written some code for testing a simple Grid Panel as follows:
    
            Object[][] obj = new Object[][]{
                    new Object[]{"testname", 38},
                    new Object[]{"testname1", 8}
            };
            RecordDef recordDef = new RecordDef(new FieldDef[]{new    
                                      StringFieldDef("Name"),
                                      new IntegerFieldDef("Age")});
            ArrayReader arrayReader = new ArrayReader(recordDef);
            MemoryProxy dProxy = new MemoryProxy(obj);
            Store store = new Store(dProxy, arrayReader);
            store.load();
            ColumnModel cm = new ColumnModel(new BaseColumnConfig[]{
                    new ColumnConfig("Name List","Name",130,true),
                    new ColumnConfig("Age List","Age",130,true)
            });
            GridPanel gridPanel = new GridPanel(store,cm);
            new Viewport(gridPanel);
    
    In this example, data is hardcoded as in Object[][].
    Record def has the definition of all the fields.
    ArrayReader is having the record def and the memory proxy
    has the Object[][] data.
    
    After creating Store with the memory proxy and array reader,
    a method "load" call loads all the data in the store.
    
    This store and the ColumnModel are passed to the GridPanel
    constructor.
    
    This GridPanel object is added to the Viewport for displaying
    on screen.
    
    15. While compiling this example, encountered some of the 
        exceptions/errors, then added following tag in the 
    	Example.gwt.xml file as follows;
    
    	  <;inherits name="com.gwtext.GwtExt"/>
    
    16. Again after compiling this project, I saw the output screen
        as expected...
    
        
    		
    

    Some of the other Articles you may would like to read :
    JSF example on validation :
    JSF Validation with example with source code 
    on Java Platform.
    ESB Interview Questions Answer :
    ESB Interview Questions Answer
    Google GWT Example :
    Example using GWT and some design patterns and various
    ways of implementing this example.
    DOJO Tree Widget Example :
    Example on using DOJO Tree Widget
    explained with a very simple scenario
    JSF example with source code :
    JSF example of Tags and checkboxes 
    with source code on Java Platform.
    JSF example with source code :
    JSF example of Tags and Data Table 
    with source code on Java Platform.
    Example of using Mule ESB File Transport :
    Example of using Mule ESB File Transport with simple
    to explain source code.
    List of Examples on Various Technologies :
    List of Examples on Various Technologies and Frameworks.
    JSF example on Resource Bundle :
    JSF example of Resource Bundle with source code 
    on Java Platform.
    JSF example with source code :
    JSF example with source code on Java Platform.
    JDBC Transaction Isolation Levels :
    A short write-up on JDBC Transaction
    Isolation showing ways to achieve
    various Isolation levels using JDBC.
    Using Different Logger Files :
    Example on using different log files 
    using Apache Log4j Framework.
    Using Quartz Scheduler Example :
    Example on how to use Quartz Scheduler.
    DOJO Dialog Example :
    Example on using DOJO Dialog
    explained with a very simple scenario
    JSF example with source code :
    JSF example of Tags and Code Walk-through 
    with source code on Java Platform.
    Log4j Interview Questions Answer :
    List of Interview Questions and answer on Apache Log4j
    Example using Tag Library :
    Example on how to code and use
    Custom Tag Library on Java Platform.
    JSF example with source code :
    JSF example of Tags and SelectBoxes 
    with source code on Java Platform.
    Example of using Log4J Part 2 :
    Log4j example with source code on Java Platform.
    Example of using Log4J Part 1 :
    Log4j example with source code on Java Platform.


    References :
    Tags: DOJO Example Dialog
    Tags: DOJO Example Tree Widget
    Tags: different logger file log4j
    Tags: JDBC Transaction isolation
    Tags: event handling java code
    Tags: example quartz scheduler
    Tags: example tag library web application
    Tags: Flex
    Tags: index
    Tags: inmemory image creation java awt
    Tags: JSF Example Main
    Tags: JSF Example Tags CheckBoxes
    Tags: JSF Example Tags dataTable
    Tags: JSF Example Tags SelectBoxes
    Tags: JSF Example Tags Walkthrough
    Tags: JSF Example Validation
    Tags: JSF Resource Bundle
    Tags: log4j example 1
    Tags: log4j example
    Tags: Miscellaneous
    Tags: Mule ESB File Transport
    Tags: Mule ESB JMS Transport
    Tags: stream download batch
    Tags: sychronized block wait notify
    Tags: thread wait notify example
    Tags: using apache commons log
    Tags: web load test
    Tags: Wizard Framework Idea Java
    

    
    For any of the content, if you would like to bring it to notice for removal from this web site, please write to this web site administrator @ EMAIL-ID,
    with appropriate concern and supporting proof(s). After thorough review and if found genuine concern, we would take appropriate action and 
    remove disputed content from this web site within 24 hours starting from the time it has brought to our notice.
    
    
    
    The content provided in this page is not warranted and/or guaranteed by techienjoy.com. techienjoy.com is not liable for any negative 
    consequences that may result/arise from implementing directly/indirectly any information covered in these pages/articles/tutorials.
    
    All contents of this site is/are written and provided on an "AS IS" basis, without WARRANTIES or conditions of any kind, either express
    or implied, including, without limitation, merchantability, or fitness for a particular purpose. You are solely responsible for determining 
    the appropriateness of using or refering this and assume any risks associated with this.
    
    This web site is optimized for learning and training. Examples might be simplefied to improve reading and basic understanding only. 
    This web site content are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. 
    In spite of all precautions taken to avoid any typo in these pages, there might be some issues like grammatical mistakes and typos 
    being observed in these pages, techienjoy.com extends sincerest apologies to all our visitors for the same.
    
    While using this web site, you agree to have read and accepted our terms of use and privacy policy.
    
    

    Android Examples || Android Training || Struts 1 || Spring Framework || Software Architecture || Servlet || Log4j Framework || JSP || JSF || JPA || JMS || Hibernate Framework || Enterprise Java || EJB || Design Patterns || Build Tools/Frameworks || Android Platform || ESB || Struts 2 || Core Java

    © Copyright 2010, TECHIENJOY®, All Rights Reserved.      Privacy Policy     Disclaimer & Terms & Conditions