|
||||||||||||||||||||||||
Outline
|
||||||||||||||||||||||||
1. PrefaceThis document was written using Sun JDK 1.4.2, Eclipse 3.2.2 and MyEclipse 5.5. If you notice discrepancies between this document and the version of Eclipse/MyEclipse you are using that make it difficult to follow this guide, please see the User Feedback section for how to provide feedback to the MyEclipse documentation team. |
||||||||||||||||||||||||
2. RequirementsBelow is a list of software required before using this guide:
Note: visual design features are supported on the Windows and Linux platform only. |
||||||||||||||||||||||||
3. IntroductionThis document provides a quick overview of the concepts, features, and basic operating procedures for the MyEclipse HTML and JSP Web Designers. Both Designers have similar features and the same operations model but are specialized to their type of content. Note this document was created using the MyEclipse HTML Designer. Following is an overview of both Designers' key features:
Figure-1 is a screenshot of the HTML Web Designer in the Design/Source split-screen mode.
Figure 1: HTML Web Designer in DesignMode with Design/Source split, Properties and Outline Views |
||||||||||||||||||||||||
3.1 Content-Type Support (HTML, JSP)The MyEclipse HTML Web Designer is specialized towards the creation and editing of HTML files. The MyEclipse JSP Web Designer is geared towards the creation and editing of JSP files including Struts and JSF documents. During the Designer launch process the content of the file being loaded is inspected and the Eclipse platform selects the corresponding HTML or JSP Web Designer based on the document's content type. |
||||||||||||||||||||||||
3.2 Editor ModesThe Designer provides 2 edit modes to support any style of editing. They are:
|
||||||||||||||||||||||||
3.2.1 Changing Edit ModesA tab for each mode is displayed at the bottom-left of the editor panel (see Figure-2). To switch modes simply select the tab for the new mode and the editor will switch to that mode.
|
||||||||||||||||||||||||
3.3 Properties & Outline ViewsThe HTML and JSP Web Designer feature-sets include a custom form-based property editors for all HTML, JSP, JSF, and Struts tags and a structured Outline View. The Designer property editors are custom forms that accelerate viewing and editing of the most common attributes of each visual tag. Custom property editors are automatically activated and displayed in the Eclipse Properties View when a corresponding tag is selected in the Source panel, Design panel or Outline View. The Properties View is shown in Figure 3. The Outline View provides a structured tree view of the Designers content. Nodes in the Outline View can be added, deleted, expanded, and contracted. The contents of the Designer Outline View are displayed in the shared Eclipse Outline View. See Section 4 for instructions on how to open the Properties and Outline Views. The Outline View is shown in Figure 4.
|
||||||||||||||||||||||||
3.4 Synchronization between Editor Modes and Views
In order to present an accurate view of a web document's current
state across all edit modes and supporting views, two types
of information synchronization are maintained by the
Designer. The first is
selection synchronization . A common selection
context is maintained by the Designer between Source and Design
windows and the Outline View and Properties View. The second form
of synchronization, known as
Design-Source Synchronization
, is between the source code of the Source Mode and the WYSIWYG
rendered state of the Design Mode.
|
||||||||||||||||||||||||
3.4.1 Selection SynchronizationSelection synchronization enables you to select anywhere in Source window, Design window or Outline View and have all other corresponding views display the common selection context. Additionally, if the common selection involves an HTML, JSF or Struts tag, the Properties View will display a custom properties editor for that tag. Figure-5 below illustrates a user's selection of the Login button. This results in the Outline View scrolling to and highlighting the HTML <input> tag for the Login button and the Source panel scrolls to and highlights the source line containing the button source code.
|
||||||||||||||||||||||||
3.4.2 Design-Source SynchronizationThe Source panel is the master panel to which the Design panel, the Preview window and the Properties and Outline Views synchronize their state. When an edit operation is initiated in the Design panel, the Properties View or the Outline Views the operation is routed to the Source panel where it is applied and the source updated. The Source panel then signals the other panels, windows and views of the specific changes. This causes them to resynchronize their presentation state to that of the Source panel. You can observe the source code and rendered design updating and synchronizing in real-time. There are occasions when the Design panel is unable to automatically synchronize its state with the Source panel. When this happens you will see the following:
This indicates that no input into the design panel can be accepted at the moment.
|
||||||||||||||||||||||||
3.4.3 Refresh/Resynchronize Design Mode
Certain automatic and manually initiated Design-Source panel synchronization operations can be computationally intensive. When this occurs an informative dialog will pop-up to inform you of the operations progress. If large synchronizations are caused by your design edits, these can often be avoided or minimized by making the change in the source view instead.
The following edit operations will disconnect or unsychronize the design view in the current version of the Visual Web Designer.
|
||||||||||||||||||||||||
4 Launching the Web Designer, Related Views and Perspective |
||||||||||||||||||||||||
4.1 Launching the HTML and JSP Web DesignersTo launch the HTML or JSP Web Designer do the following:
|
||||||||||||||||||||||||
4.2 Opening Properties ViewThe Properties View displays convenient form editors for the current tag selected in the Designer. Do the following to open the Properties View:
|
||||||||||||||||||||||||
4.3 Opening the Outline ViewDo the following to open the Outline View:
|
||||||||||||||||||||||||
4.4 Resetting the MyEclipse Perspective
The view arrangement of the MyEclipse Workbench Perspective is
optimized for web development tasks. The MyEclipse
Perspective, shown in Figure 8 and identified by the
Users frequently modify the view organization of their workbench perspectives. To reset the MyEclipse Perspective to its default view organization do the following:
|
||||||||||||||||||||||||
5.0 WYSIWYG Design Editing Basics
The Design panel consists of a directly editable WYSIWYG web
design canvas, toolbar, and UI control palette. In this panel you
are able to directly insert, edit, delete and move HTML and
JSP UI controls and text.
Drag-and-drop operations are enabled to allow UI controls on the design canvas to be easily repositioned visually. Extended Copy/Paste operations enable text and HTML content from outside sources that have been placed on the system clipboard to be added to the design canvas. And the design canvas renders CSS styles and images that are located relative to the document being edited. These operations are defined in more detail in this section. |
||||||||||||||||||||||||
5.1 Working With Text - Using Text Operations and the Designer Toolbar ActionsThe Design Canvas text editing functions are similar to those of a word processor. They enable you to enter, delete, and revise text anywhere on a web page.
The Designer's toolbar includes actions for text styling and formatting. These toolbar actions are dynamically enabled/disabled according to their applicability to the current design or source selection context.
Figure-12 illustrates the toolbar when no selection exists. Note that the style and format buttons are disabled as there is no applicable selection context.
Figure 13 below illustrates how the toolbar's styling and formatting buttons are enabled when they are valid to operate on the current selection. Additionally note how the Italic, Underline and Center alignment buttons are depressed to indicate that current selection is already styled with these properties. Selecting any of these buttons will toggle the styling/formatting function on/off.
|
||||||||||||||||||||||||
5.2 Working with Web UI Controls - Using the Designer UI Palette
The Design Mode includes a UI Controls Palette for adding new UI
controls to the design canvas. The JSP Web Designer's UI Palette
includes HTML, Struts, and JSF controls. The HTML Web
Designer's palette is abbreviated to include only HTML UI
controls. When adding JSF or Struts UI controls to a web document,
you must ensure that the page includes the appropriate taglib
entry, e.g.,
|
||||||||||||||||||||||||
5.2.1 Adding Web UI Controls to the Design PanelTo add a UI control from the palette do the following:
|
||||||||||||||||||||||||
5.3 Built-in Edit Commands and Key BindingsTable-1 lists the Design Mode's built-in edit commands and key bindings.
|
||||||||||||||||||||||||
5.4 Working with Context-MenusWithin the Design panel, a mouse right-click will open the context-menu with actions that are valid for the current design selection. Below is an example of the selection in a table row. The context-menu shows the actions that are available for an HTML Table control.
|
||||||||||||||||||||||||
5.5 Working with ImagesThe Design Mode will render images if their href attribute value is a relative URL to the current document's location. If you use the Browse feature on the Image Selection Wizard to select an image, then it will constrain your browsing to the current project and will return a relative URL, see Figure 18.
|
||||||||||||||||||||||||
5.6 Working with CSSThe Design panel recognizes CSS styles defined using the LINK tag to stylesheet file, inline styles, and inline style attributes.
<link rel="stylesheet" type="text/css" href="./styles.css"/>
<STYLE type="text/css">
<div style="background: blue;"/> Note: editing a <LINK> tag or inline CSS styles will cause the Design Mode to discontinue auto-synchronization. Therefore you will have to manually refresh the Design Mode to view these CSS changes and to re-enable auto-synchronization between the Designer's edit modes and views. See Section 3.4.3 for more details. Changes to the inline style attributes will be rendered immediately without the need to refresh the Design Mode. |
||||||||||||||||||||||||
6. Designing JSP, JSF and Struts Web PagesVisual design of JSP documents using the JSP Web Designer differs from HTML page design in that:
The purpose for rendering JSP scripting elements and non-visual tags is to make the user aware of the scripting element's presence relative to UI controls within the source. These non-visual elements can be visually repositioned using Copy/Paste and drag-and-drop operations similar to any HTML or JSP UI control. Thus, dragging and dropping a scriptlet element is possible. Note: it is possible to delete non-visual elements directly by selecting and deleting its visual artifact or by deleting a multiple element selection that includes non-visual element. The JSP Web Designer has rendering support for many tag libraries including the JSF and Struts HTML tag libraries. JSTL tags and all custom user tags will not have specialized design-time rendering support. For these tags the default design-time rendering is a bordered box containing the tag name. Figure 18 illustrates the default design-time rendering of the JSTL core <c:if> tags.
|
||||||||||||||||||||||||
6.1 JSF and Struts Tag Library SupportThe JSP Web Designer has design-time rendering support for the following tag libraries:
The design-time rendering of JSF and Struts UI controls include a
unique annotation to distinguish them from basic HTML controls.
For example, Struts UI controls are overlaid with the Struts icon,
|
||||||||||||||||||||||||
7. Preview ModeThe Preview Mode enables you to quickly view the web document as it will be rendered at runtime. The Preivew Mode has an IE or Safari (Depending on platform) preview as well as a Mozilla preview. For JSPs that include Struts and JSF HTML tags, Preview Panel will evaluate and attempt to translate each tag into its runtime HTML form. In many cases the dynamic nature of these tags prevents an accurate translation as it is only possible at runtime when resources such as databases or web-services are available. The Struts and JSF tags that are supported by the Preview Panel are:
Figure 22 below illustrates the Preview Panel form of the Struts Login form shown in Figure 21.
|
||||||||||||||||||||||||
8. FAQ
Q1: When will the Design Mode
and Source/Design modes be available on the Linux and Mac
platforms?
Q2: Is there Snippets support?
Q3: Is JavaScript execution
supported in the Design Mode?
Q4: In the Design Mode can I
resize a UI control?
Q5: Is CSS absolute
positioning available in the Design Mode?
Q6: How is design performed
for JSP fragments that do not include <taglib> directives?
Q7: After a large design
edit, the synchronization back to the source takes several
seconds. What can I do?
|
||||||||||||||||||||||||
9. User FeedbackWe welcome all constructive feedback. If you have comments or ideas for how to improve this document please go to the Documentation Forum on our Support Site. MyEclipse Documentation Forum. |