Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Introduction

The Ephox EditLive! for Java ASP .NET Server Control has been designed to allow easy integration of the WYSIWYG HTML editing capabilities of EditLive! for Java into ASP.NET Web Forms. The EditLive! for Java ASP.NET Server Control has been designed to allow for seamless interaction between the ASP.NET architecture and the EditLive! for Java applet. Once the required files have been included in an ASP.NET Web project EditLive! for Java can be easily included in any of your ASP.NET Web Forms.

Installing the EditLive! for Java ASP.NET Server Control

When using the EditLive! for Java ASP.NET Server Control there are several steps that must be followed. The server control file, EditLiveJavaControl.dll, must be installed in the relevant project. In addition to this the EditLive! for Java source files and libraries must be deployed on the same Web server as the relevant project. Finally, to provide IntelliSense (popup context menu) support for the EditLive! for Java Server Control in the HTML view of the Web Forms editor an XML schema file must be placed in a specific directory.

Installing the EditLive! for Java Server Control with the Toolbox

The EditLive! for Java Server Control may be added to the Microsoft Visual Studio .NET Toolbox to allow developers to create an instance of the EditLive! for Java Server Control on a page via the drag-and-drop mechanism. To use the EditLive! for Java Server Control in this manner the following steps must be followed:

  1. In the Microsoft Visual Studio .NET IDE select the Tools > Customize Toolbox... menu item.
  2. Select the .NET Framework Components tab of the Customize Toolbox dialog.
  3. Click Browse...
  4. Browse to the location of the EditLiveJavaControl.dll file. This file can be found in the EditLiveControl_INSTALL/webfolder/aspnet/servercontrol/

...

  1. directory,

...

  1. where

...

  1. EditLiveControl_INSTALL

...

  1. represents

...

  1. the

...

  1. location

...

  1. you

...

  1. installed

...

  1. the

...

  1. control

...

  1. to.

...

  1. With

...

  1. the

...

  1. EditLiveJavaControl.dll

...

  1. file

...

  1. selected,

...

  1. click

...

  1. Open

...

  1. .

...

  1. Ensure

...

  1. that

...

  1. the

...

  1. EditLiveJava

...

  1. control

...

  1. is

...

  1. now

...

  1. available

...

  1. in

...

  1. the

...

  1. list

...

  1. of

...

  1. .NET

...

  1. Framework

...

  1. Components

...

  1. and

...

  1. that

...

  1. the

...

  1. box

...

  1. next

...

  1. to

...

  1. the

...

  1. name

...

  1. of

...

  1. the

...

  1. control

...

  1. is

...

  1. checked.

...

  1. Click

...

  1. OK

...

  1. .

...

  1. The

...

  1. EditLive!

...

  1. for

...

  1. Java

...

  1. Server

...

  1. Control

...

  1. should

...

  1. now

...

  1. be

...

  1. available

...

  1. as

...

  1. part

...

  1. of

...

  1. the

...

  1. Microsoft

...

  1. Visual

...

  1. Studio

...

  1. .NET

...

  1. Toolbox.

...

When

...

using

...

the

...

EditLive!

...

for

...

Java

...

Server

...

Control

...

via

...

the

...

Microsoft

...

Visual

...

Studio

...

.NET

...

Toolbox,

...

the

...

relevant

...

reference

...

will

...

automatically

...

be

...

added

...

to

...

the

...

project

...

when

...

the

...

first

...

instance

...

of

...

the

...

EditLive!

...

for

...

Java

...

Server

...

Control

...

is

...

created.

...

Installing the EditLive!

...

for

...

Java

...

Server

...

Control

...

as

...

a

...

Project

...

Reference

...

If

...

the

...

EditLive!

...

for

...

Java

...

Server

...

Control

...

cannot

...

be

...

made

...

available,

...

or

...

you

...

do

...

not

...

wish

...

to

...

make

...

it

...

available,

...

through

...

the

...

use

...

of

...

the

...

Microsoft

...

Visual

...

Studio

...

.NET

...

Toolbox

...

then

...

a

...

reference

...

to

...

it

...

can

...

be

...

added

...

directly

...

to

...

the

...

project.

...

To

...

use

...

the

...

EditLive!

...

for

...

Java

...

Server

...

Control

...

in

...

this

...

manner

...

the

...

following

...

steps

...

must

...

be

...

followed:

...

  1. In

...

  1. the

...

  1. Microsoft

...

  1. Visual

...

  1. Studio

...

  1. .NET

...

  1. IDE

...

  1. select

...

  1. the

...

  1. Project

...

  1. >

...

  1. Add

...

  1. Reference...

...

  1. menu

...

  1. item.

...

  1. Select

...

  1. the

...

  1. .NET

...

  1. tab

...

  1. of

...

  1. the

...

  1. Add

...

  1. Reference

...

  1. dialog.

...

  1. Click

...

  1. Browse...

...

  1. Browse

...

  1. to

...

  1. the

...

  1. location

...

  1. of

...

  1. the

...

  1. EditLiveJavaControl.dll

...

  1. file.

...

  1. This

...

  1. file

...

  1. can

...

  1. be

...

  1. found

...

  1. in

...

  1. the

...

  1. EditLiveControl_INSTALL/webfolder/aspnet/servercontrol/

...

  1. directory,

...

  1. where

...

  1. EditLiveControl_INSTALL

...

  1. represents

...

  1. the

...

  1. location

...

  1. you

...

  1. installed

...

  1. the

...

  1. SDK

...

  1. to.

...

  1. With

...

  1. the

...

  1. EditLiveJavaControl.dll

...

  1. file

...

  1. selected,

...

  1. click

...

  1. Open

...

  1. .

...

  1. Ensure

...

  1. that

...

  1. the

...

  1. EditLiveJavaControl.dll

...

  1. file

...

  1. appears

...

  1. in

...

  1. the

...

  1. Selected

...

  1. Components

...

  1. list.

...

  1. Click

...

  1. OK

...

  1. .

...

The

...

EditLive!

...

for

...

Java

...

Server

...

Control

...

is

...

now

...

available

...

to

...

reference

...

from

...

the

...

project.

...

Instances

...

of

...

the

...

control

...

can

...

now

...

be

...

created

...

using

...

the

...

tag

...

associated

...

with

...

it.

...

Warning

Installing the EditLive!

for

Java

IntelliSense

XML

Schema

* _


This

is

no

longer

required.

ASP.NET

2.0

and

later

can

infer

this

information

from

the

metadata

in

the

EditLiveJavaControl.dll

file.

_{warn} h3. Other Files Required to Use EditLive! for Java in an

Other Files Required to Use EditLive! for Java in an ASP.NET

...

Web

...

Application

...

In

...

addition

...

to

...

including

...

the

...

EditLiveJavaControl.dll

...

file

...

in

...

your

...

ASP.NET

...

project,

...

either

...

through

...

the

...

ASP.NET

...

Toolbox

...

or

...

a

...

project

...

reference,

...

the

...

EditLive!

...

for

...

Java

...

source

...

files

...

and

...

libraries

...

must

...

be

...

present

...

on

...

the

...

same

...

Web

...

server

...

as

...

the

...

relevant

...

project.

...

It

...

is

...

recommended

...

that,

...

in

...

order

...

to

...

ensure

...

that

...

these

...

files

...

are

...

present

...

on

...

the

...

same

...

Web

...

server

...

as

...

the

...

relevant

...

project,

...

that

...

they

...

be

...

added

...

to

...

the

...

project

...

itself.

...

These

...

files

...

can

...

be

...

found

...

within

...

the

...

redistributables/editlivejava

...

directory

...

and

...

its

...

subdirectories.

...

  • The redistributables/editlivejava

...

  • directory

...

  • contains

...

  • the

...

  • source

...

  • files

...

  • and

...

  • libraries

...

  • for

...

  • use

...

  • with

...

  • EditLive!

...

  • for

...

  • Java.

...

  • The

...

  • files

...

  • in

...

  • this

...

  • directory

...

  • must

...

  • be

...

  • present

...

  • on

...

  • the

...

  • Web

...

  • server

...

  • in

...

  • order

...

  • to

...

  • instantiate

...

  • EditLive!

...

  • for

...

  • Java.

...

  • This

...

  • directory

...

  • must

...

  • be

...

  • available

...

  • on

...

  • the

...

  • same

...

  • Web

...

  • server

...

  • as

...

  • the

...

  • relevant

...

  • project

...

  • as

...

  • relative

...

  • links

...

  • to

...

  • it

...

  • must

...

  • be

...

  • able

...

  • to

...

  • be

...

  • created.

...

As

...

the

...

Microsoft

...

Visual

...

Studio

...

.NET

...

IDE

...

does

...

not

...

allow

...

directories

...

and

...

their

...

contents

...

to

...

be

...

recursively

...

added

...

to

...

a

...

project

...

the

...

following

...

method

...

describes

...

a

...

way

...

to

...

easily

...

add

...

the

...

EditLive!

...

for

...

Java

...

source

...

files

...

and

...

libraries

...

to

...

your

...

.NET

...

Web

...

Project:

...

  1. Copy

...

  1. the

...

  1. redistributables

...

  1. directory

...

  1. and

...

  1. all

...

  1. its

...

  1. subdirectories,

...

  1. which

...

  1. contain

...

  1. the

...

  1. EditLive!

...

  1. for

...

  1. Java

...

  1. source

...

  1. files

...

  1. and

...

  1. libraries,

...

  1. to

...

  1. the

...

  1. relevant

...

  1. Web

...

  1. project

...

  1. directory

...

  1. so

...

  1. that

...

  1. the

...

  1. redistributables

...

  1. directory

...

  1. is

...

  1. a

...

  1. sub

...

  1. directory

...

  1. within

...

  1. the

...

  1. Web

...

  1. project.

...

  1. Open

...

  1. the

...

  1. Solution

...

  1. Explorer

...

  1. window

...

  1. by

...

  1. selecting

...

  1. the

...

  1. View

...

  1. >

...

  1. Solution

...

  1. Explorer

...

  1. menu

...

  1. item.

...

  1. Once

...

  1. the

...

  1. Solution

...

  1. Explorer

...

  1. window

...

  1. is

...

  1. open

...

  1. select

...

  1. the

...

  1. Project

...

  1. >

...

  1. Show

...

  1. All

...

  1. Files

...

  1. menu

...

  1. item

...

  1. to

...

  1. reveal

...

  1. all

...

  1. the

...

  1. files

...

  1. within

...

  1. the

...

  1. Web

...

  1. project's

...

  1. directories.

...


  1. Note:

...

  1. If

...

  1. the

...

  1. Show

...

  1. All

...

  1. Files

...

  1. option

...

  1. is

...

  1. already

...

  1. selected

...

  1. before

...

  1. performing

...

  1. this

...

  1. step

...

  1. it

...

  1. may

...

  1. have

...

  1. to

...

  1. be

...

  1. unselected

...

  1. and

...

  1. then

...

  1. reselected.

...


  1. Image Added
  2. In the Solution Explorer select the root directory for the EditLive! for Java source files and libraries which has not yet been included in the project (files which are not included are represented as uncolored icons, as above). In the example above the relevant directory is the redistributables directory.
  3. With the relevant root directory selected (in the above example the redistributables directory) select the Project > Include In Project menu item.
  4. The Solution Explorer window should now have colored representations of the EditLive! for Java source files and libraries. It should look similar to the following figure.
    Image Added

Constraints

As EditLive! is an HTML editor, it will need to be able to edit HTML and send HTML text back to the server. This means that the .net request validation functionality will need to be disabled through setting the property validateRequest="false" in the page (through the Page directive: <%@ Page validateRequest="false" ...%>).

The server side code behind view exposes the EditLive! content through properties on the control. It is possible to access content at any stage in the life cycle through these attributes. Updates to content will only be visible in the control when they are made before rendering the applet. This means that content updated in the Page_Load event will be correctly reflected, but changes made in the event handlers for form events will not be reflected in the client control. In order to update content on a form event, the JavaScript APIs for EditLive! will need to be used.

In order to use multiple instances of EditLive! the "AppletName" of each control will need to be initialised in the Page_Load event. Each applet name should be set to a unique value, which can then be used to access content in the postbacks. A useful value for the applet name is the name of the control.