Nexaweb Element Creation

The Element Creation tool bar, shown in Figure 71, includes the MCO and UI Files icons.

image\img00125.gif

Figure 71: Element Creating Toolbar

Managed Client Object (MCO)

image\img00126.gif

Managed Client Objects (MCOs) run on the Nexaweb client. They offer you the ability to use Java or JavaScript (Ajax) to create events handlers for a variety of purposes such as form validation, client side data processing, messaging handling, and more. You can reference MCOs from XAL files and use them to communicate with the server. For Java, the Managed Client Object wizard creates a new class that extends com.nexaweb.client.mco.AbstractMCO.

Nexaweb User Interface

image\img00127.gif

Figure 72: Nexaweb User Interface

Use the Nexaweb User Interface toolbar button to create new Nexaweb UI files.

Note: You must create all user interface files that will be visible to the user, including images and stylesheets, in the Web Content folder (or www folder prior to Studio 2.1) in the Nexaweb Application.

The following table lists the types of UI files you can create from here:

UI File Type

Description

Ajax/Java

Empty UI Markup file

Launches a wizard to step you through creating an empty Nexaweb UI file.

This generates a file containing the following XAL for Java or Ajax:

<xal xmlns="http://openxal.org/ui/java">

 <freePane width="300px" height="300px">  

 </freePane>

</xal>

or

<xal xmlns="http://openxal.org/ui/html">

 <freePane width="300px" height="300px">  

 </freePane>

</xal>

Both

Dialog UI File

Launches a wizard to create a dialog component with a free pane layout.

This generates a file containing a dialog container (Visual Editor) and the following XAL (Source):

<xal xmlns="http://openxal.org/ui/java">

 <dialog title="New Dialog" width="300px"  height="300px">

 <freePane width="300px" height="300px">

 </freePane>

 </dialog>

</xal>

Java

Window UI File

Launches a wizard to step you through creating a new Window UI file.

This generates a file containing a Window container (Visual Editor) and the following XAL (Source) for Java or Ajax:

xal xmlns="http://openxal.org/ui/java">

 <window title="New Window" width="300px"
 
height="300px">

  <freePane width="300px" height="300px">
  
</freePane>

 </window>

</xal>

Or

<xal xmlns="http://openxal.org/ui/html">

 <window title="New Window" width="300px"
 
height="300px">

  <freePane width="300px" height="300px">

  </freePane>

 </window>

</xal>

Both

Panel UI File

Launches a wizard to create a panel component with a free pane layout.

This generates a file containing the following XAL (Source) for Java or Ajax:

<xal xmlns="http://openxal.org/ui/java"> 

 <freePane width="300px" height="300px">

 </freePane>

</xal>

Or

<xal xmlns="http://openxal.org/ui/html"> 

 <freePane width="300px" height="300px">

 </freePane>

</xal>

Both

UI Stylesheet

Launches the Nexaweb Stylesheet Editor that facilitates the creation of a new UI Stylesheet file.

Upon launching the Nexaweb Stylesheet Editor, this generates a file containing the following XAL (Source):

XML code representation:

 This is an empty stylesheet

-->

<styleSheet/>

Java

Nexaweb JSP Page

Launches a wizard to step you through creating a new Nexaweb JSP page. This generates a file including a sample of how to use Nexaweb in a JSP page similar to the following:

<%@ page import="com.nexaweb.server.session.*" %>
<%@ page import="com.nexaweb.server.services.*" %>
<%@ page import="com.nexaweb.xml.*" %>

<%

 SessionManager smgr = ServiceManager.getSessionManager();
 ServerSession nxsession = smgr.findByRequest(request);
 DocumentRegistry docprovider = nxsession.getDocumentRegistry();
 Document uidoc = docprovider.getUiDocument();

//Get information from the Request object by using
//String parameterValue = request.getParameter("foo");

//or get the information from the DOM directly by
//Element  textBoxFoo = uidoc.getElementById("foo-element");
//String parameterValue = textBoxFoo.getAttribute("text");

%>

<xal xmlns="http://openxal.org/ui/java">

 freePane> </freePane>

</xal>

Both