Home

  

Product

  

Buy

  

Support

 First Line 
 FAQs 
 Tutorials 
 Registered Users 
 User Guide 
 Knowledge Base 

News

  

Press

  

Downloads

  

Contact

  

Company

  

Partners

  

Resources

 
 

User Guide - Web components

Index    Previous   <<>>  Next
  
10.1 Overview

10.2 View Set

   10.2.1 Adding a view set

   10.2.2 Editing a view set

   10.2.3 Removing a view set

10.3 View helper

   10.3.1 Adding a view helper

   10.3.2 Editing a view helper

   10.3.3 Removing a view helper

10.4 JSP

   10.4.1 Adding a JSP

   10.4.2 Editing a JSP

   10.4.3 Removing a JSP

10.5 Servlets

   10.5.1 Adding a servlet

   10.5.2 Editing a servlet

   10.5.3 Removing a servlet

10.6 Text Components

   10.6.1 Adding a text component

   10.6.2 Editing a text component

   10.6.3 Removing a text component

10.7 Resource Components

   10.7.1 Adding a resource component

   10.7.2 Editing a resource component

   10.7.3 Removing a resource component

  10.1  OverviewTo top of page

JCodeBox allows you to define different types of components in the web tier:

    • ViewSets
    • A ViewSet provides a set of basic views on a component (i.e. EJB). These views are implemented using JSP/servlets and the view helper pattern. The basic views provided by a ViewSet include create, read, update and delete. In addition, depending on the component the ViewSet is operating on, the following functionality may also be available - finders, creators, simple business methods (that use primitives or primitive wrappers only) and relationships.

      To define a ViewSet you need to complete the define View Set dialog. You can define more than one at a time (depending on available entities/EJBs) and bypass the define View Set dialog - default values will be provided based on the underlying entity/EJB name (see the Adding a view set section for further details). Once defined, you can preview your ViewSet to see the exact code that will be created.

    • View Helper (plus JSP)
    • A view helper implements the view helper pattern and allows you to add the main view helper class/bean and any number of JSP linked to that class (the JSP will contain a useBean action associating them with the view helper). You can also add methods to the view helper and link specific JSP to specific methods. To define a view helper you need to complete the define view helper dialog.

    • Java Server Pages (JSP)
    • You can also add individual JSP to the web tier to create additional functionality. To define a JSP you need to complete the define JSP dialog.

    • Servlets
    • You can add Java Servlets to the web tier by completing the define Servlet dialog.

    • Text components
    • Text components allow you to add text based components such as HTML pages to the web tier.

    • Resource components
    • Resource components allow you to add resources such as graphics (i.e. .gif, .jpg) to the web tier.

  10.2  View SetTo top of page

A JCodeBox ViewSet provides a set of basic views on a component.
These views are implemented using JSP/servlets in the web/presentation tier.

Example
A ViewSet on an entity EJB could include the following views:
  • Create (multiple if additional creators are defined)
  • Maintain (Incorporating read and Update
  • Delete
  • Finders (primary key and additional)
  • Relationships
  • Business methods

        10.2.1  Adding a view setTo top of page

  1. Adding a view set
    • Right mouse click on Web Tier in the define application dialog
    • Select Add View Set from the popup menu
    • Or

    • Select the Action=>Tier menu option from the main menu in the define application dialog
    • Select Web Tier and press next
    • Select Add View Set and press finish
    • The define view set dialog is displayed.

    • Press the Select button. The select modelsource dialog is displayed.
    • Select a modelsource from the list
    • Press OK. The view set dialog will be populated from the selected modelsource.
    • Modify the view set name, view helper class name or view helper class package if required
    • Press OK to save your view set
    • Your view set is now displayed in the Web Tier of the define application dialog.

  2. Adding multiple view sets
    • Right mouse click on Web Tier in the define application dialog
    • Select Add multiple View Sets from the popup menu
    • Or

    • Select the Action=>Tier menu option from the main menu in the define application dialog
    • Select Web Tier and press next
    • Select Add multiple View Sets and press finish
    • The select modelsource dialog is displayed.

    • Select the required modelsources from the list (use the shift key to select multiple modelsources).
    • Press OK. Your view sets will be automatically defined and displayed in the Web Tier of the define application dialog.

        10.2.2  Editing a view setTo top of page

  • Right mouse click on the view set in the define application dialog
  • Select Edit from the popup menu
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the view set you would like to edit and press next
  • Select Edit and press finish
  • The define view set dialog is displayed.

  • To change the modelsource of your view set press the select button. This will display the select modelsource dialog. Select the new modelsource. Press OK.
  • To modify the view set name, view helper class name or view helper class package type the new values in the corresponding text fields
  • Press OK to save your view set
  • Your view set has now been updated and is displayed in the Web Tier of the define application dialog.

        10.2.3  Removing a view setTo top of page

  • Right mouse click on the view set in the define application dialog
  • Select Remove from the popup menu
  • Press Yes if the remove component dialog is displayed
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the view set you would like to remove and press next
  • Select Remove and press finish
  • Press Yes if the remove component dialog is displayed
  • The view set will be removed from the Web Tier of the define application dialog.

  10.3  View helperTo top of page

        10.3.1  Adding a view helperTo top of page

  • Right mouse click on Web Tier in the define application dialog
  • Select Add View Helper (+JSP) from the popup menu
  • Or

  • Select the Action=>Tier menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select Add View Helper (+JSP) and press finish
  • The define View Helper dialog is displayed.

  • Enter a name and package for the View Helper in the View Helper name and View Helper Package text fields.
  • Use the methods buttons to add/edit/remove methods for the View Helper
  • Use the imports buttons to add/edit/remove imports for the View Helper The application button allows you to add imports for other components in your application.
  • Use the JSP buttons to add/edit/remove individual JSP that will be attached to this View Helper. Templates are provided for standard JSP and for JSP forms
  • Use the class variables buttons to add/edit/remove variables for the View Helper
  • Press OK to save your View Helper
  • Your View Helper is now displayed in the Web Tier of the define application dialog.

        10.3.2  Editing a view helperTo top of page

  • Right mouse click on the View Helper in the define application dialog
  • Select Edit from the popup menu
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the View Helper you would like to edit and press next
  • Select Edit and press finish
  • The define View Helper dialog is displayed.

  • To modify the name or package for the View Helper type the new value in the corresponding text field.
  • Use the methods buttons to add/edit/remove methods for the View Helper
  • Use the imports buttons to add/edit/remove imports for the View Helper The application button allows you to add imports for other components in your application.
  • Use the JSP buttons to add/edit/remove individual JSP that will be attached to this View Helper. Templates are provided for standard JSP and for JSP forms
  • Use the class variables buttons to add/edit/remove variables for the View Helper
  • Press OK to save your View Helper
  • Your View Helper has now been updated and is displayed in the Web Tier of the define application dialog.

        10.3.3  Removing a view helperTo top of page

  • Right mouse click on the View Helper in the define application dialog
  • Select Remove from the popup menu
  • Press Yes if the remove component dialog is displayed
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the View Helper you would like to remove and press next
  • Select Remove and press finish
  • Press Yes if the remove component dialog is displayed
  • The View Helper will be removed from the Web Tier of the define application dialog.

  10.4  JSPTo top of page

        10.4.1  Adding a JSPTo top of page

  • Right mouse click on Web Tier in the define application dialog
  • Select Add JSP from the popup menu
  • Or

  • Select the Action=>Tier menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select Add JSP and press finish
  • The define JSP dialog is displayed.

  • Enter a name for the JSP in the JSP name text field.
  • Enter a path for the JSP in the path text field.
  • Enter the JSP scripting code and HTML in the JSP script/HTML text area.
  • Add any imports required by the JSP using the add or application buttons. The application button allows you to add imports for other components in your application. Use the edit button to modify imports and the remove button to delete them.
  • Press OK to save your JSP
  • Your JSP is now displayed in the Web Tier of the define application dialog.

        10.4.2  Editing a JSPTo top of page

  • Right mouse click on the JSP in the define application dialog
  • Select Edit from the popup menu
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the JSP you would like to edit and press next
  • Select Edit and press finish
  • The define JSP dialog is displayed.

  • To modify the name for the JSP type the new value in the JSP name text field.
  • To modify the path for the JSP type the new value in the path text field.
  • To modify the JSP scripting code and HTML update the text in the JSP script/HTML text area.
  • Use the imports buttons to add/edit/remove imports for the JSP. The application button allows you to add imports for other components in your application.
  • Press OK to save your JSP
  • Your JSP has now been updated and is displayed in the Web Tier of the define application dialog.

        10.4.3  Removing a JSPTo top of page

  • Right mouse click on the JSP in the define application dialog
  • Select Remove from the popup menu
  • Press Yes if the remove component dialog is displayed
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the JSP you would like to remove and press next
  • Select Remove and press finish
  • Press Yes if the remove component dialog is displayed
  • The JSP will be removed from the Web Tier of the define application dialog.

  10.5  ServletsTo top of page

        10.5.1  Adding a servletTo top of page

  • Right mouse click on Web Tier in the define application dialog
  • Select Add Servlet from the popup menu
  • Or

  • Select the Action=>Tier menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select Add Servlet and press finish
  • The define Servlet dialog is displayed.

  • Enter a package for the servlet in the package text field.
  • Select the visibility for the servlet class.
  • Enter the servlet name in the servlet name text field
  • Enter the base/parent class for the servlet in the base/parent class text field
  • Enter a description for the servlet in the description text field
  • Add any imports required by the servlet using the add or application buttons. The application button allows you to add imports for other components in your application. Use the edit button to modify imports and the remove button to delete them.
  • Add any methods required by the servlet using the add button. Use the edit button to modify methods and the remove button to delete them.
  • Use the code tab to add/edit/remove modifiers, variables or implemented interfaces for your servlet
  • Press OK to save your servlet
  • Your servlet is now displayed in the Web Tier of the define application dialog.

        10.5.2  Editing a servletTo top of page

  • Right mouse click on the Servlet in the define application dialog
  • Select Edit from the popup menu
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the Servlet you would like to edit and press next
  • Select Edit and press finish
  • The define Servlet dialog is displayed.

  • To modify the package for the servlet type the new value in the package text field.
  • Select the visibility for the servlet class.
  • To modify the name for the servlet type the new value in the servlet name text field.
  • To modify the base/parent class for the servlet type the new value in the base/parent class text field.
  • To modify the description for the servlet type the new value in the description text field.
  • Use the imports buttons to add/edit/remove imports for the servlet.
  • Use the methods buttons to add/edit/remove methods for the servlet.
  • Use the add/edit/remove buttons on the code tab to add/edit/remove modifiers, variables or implemented interfaces for your servlet
  • Press OK to save your servlet
  • Your servlet has now been updated and is displayed in the Web Tier of the define application dialog.

        10.5.3  Removing a servletTo top of page

  • Right mouse click on the Servlet in the define application dialog
  • Select Remove from the popup menu
  • Press Yes if the remove component dialog is displayed
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the Servlet you would like to remove and press next
  • Select Remove and press finish
  • Press Yes if the remove component dialog is displayed
  • The Servlet will be removed from the Web Tier of the define application dialog.

  10.6  Text ComponentsTo top of page

        10.6.1  Adding a text componentTo top of page

  • Right mouse click on Web Tier in the define application dialog
  • Select Add Text Component from the popup menu
  • Or

  • Select the Action=>Tier menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select Add Text Component and press finish
  • The define Text Component dialog is displayed.

  • Enter a name for the text component in the name text field.
  • Enter a path for the text component in the path text field.
  • Enter the content (i.e. HTML) in the Content/HTML text area.
  • Press OK to save your text component
  • Your text component is now displayed in the Web Tier of the define application dialog.

        10.6.2  Editing a text componentTo top of page

  • Right mouse click on the Text Component in the define application dialog
  • Select Edit from the popup menu
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the Text Component you would like to edit and press next
  • Select Edit and press finish
  • The define Text Component dialog is displayed.

  • To modify the name for the text component type the new value in the name text field.
  • To modify the path for the text component type the new value in the path text field.
  • To modify the content update the text in the Content/HTML text area.
  • Press OK to save your text component
  • Your text component has now been updated and is displayed in the Web Tier of the define application dialog.

        10.6.3  Removing a text componentTo top of page

  • Right mouse click on the Text Component in the define application dialog
  • Select Remove from the popup menu
  • Press Yes if the remove component dialog is displayed
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the Text Component you would like to remove and press next
  • Select Remove and press finish
  • Press Yes if the remove component dialog is displayed
  • The text component will be removed from the Web Tier of the define application dialog.

  10.7  Resource ComponentsTo top of page

        10.7.1  Adding a resource componentTo top of page

  • Right mouse click on Web Tier in the define application dialog
  • Select Add Resource Component from the popup menu
  • Or

  • Select the Action=>Tier menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select Add Resource Component and press finish
  • The define Resource Component dialog is displayed.

  • Enter a name for the resource component in the name text field.
  • Enter a path for the resource component in the path text field.
  • Enter the location (i.e. local path) to the source file for the resource. You can press the browse button to display the open dialog which will allow you to navigate to the file.
  • Press OK to save your resource component
  • Your resource component is now displayed in the Web Tier of the define application dialog.

        10.7.2  Editing a resource componentTo top of page

  • Right mouse click on the Resource Component in the define application dialog
  • Select Edit from the popup menu
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the Resource Component you would like to edit and press next
  • Select Edit and press finish
  • The define Resource Component dialog is displayed.

  • To modify the name for the resource component type the new value in the name text field.
  • To modify the path for the resource component type the new value in the path text field.
  • To modify the source file location for the resource component type the new location in the source file text field or use the browse button.
  • Press OK to save your resource component
  • Your resource component has now been updated and is displayed in the Web Tier of the define application dialog.

        10.7.3  Removing a resource componentTo top of page

  • Right mouse click on the Resource Component in the define application dialog
  • Select Remove from the popup menu
  • Press Yes if the remove component dialog is displayed
  • Or

  • Select the Action=>Component menu option from the main menu in the define application dialog
  • Select Web Tier and press next
  • Select the Resource Component you would like to remove and press next
  • Select Remove and press finish
  • Press Yes if the remove component dialog is displayed
  • The resource component will be removed from the Web Tier of the define application dialog.

Index    Previous   <<>>  Next

[an error occurred while processing this directive]