Servis-Rhino 4211B Guia do Utilizador

Consulte online ou descarregue Guia do Utilizador para Software Servis-Rhino 4211B. Servis-Rhino 4211B User`s guide Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - September 2014

September 2014Never memorize what you can look up in books. - Albert EinsteinPage 1

Página 2 - Table of Contents

The Hello World app...254The JavaFX Hi

Página 3

Page 100

Página 4

6. Create the WORKLIGHT_INSTALL_DIR variable7. Define a new shared library entryPage 101

Página 5

8. d9. d10. d11. d12.13. s14. sOperationsAfter having installed and configure Worklight and built applications for distribution, it is likely that you

Página 6

Client Side API ProgrammingA JavaScript object called "WL" is created by the Worklight framework. This can then be used as the root or name

Página 7

WL.Client.connect(options)This method forms a connection to the Worklight Server. It must be executed before any other API calls from the client whic

Página 8

• WL.Environment.ANDROID• WL.Environment.EMBEDDED• WL.Environment.IPAD• WL.Environment.IPHONE• WL.Environment.MOBILE_WEB• WL.Environment.PREVIEW• WL.E

Página 9

• key – ???See also:• WL.Client.getUserPref(key)• WL.Client.setUserPref(key, value, options)• WL.Client.setUserPrefs(prefs, options)WL.Client.init(opt

Página 10

WL.Client.invokeProcedure(invocationData, options)Invoke a procedure exposed by an adapter.• invocationData – Data passed in to control the request to

Página 11

• realm – ???• options – ???WL.Client.logout(realm, options)A function which when called will logout the user.• realm – ???• options – ???WL.Client.mi

Página 12

WL.Client.setUserPrefs(prefs, options)Set multiple properties for a user in one single call.• prefs – A JavaScript object where the names of the prope

Página 13 - Mobile Applications

JavaFX TextField...277JavaFX ToggleBu

Página 14

var busy = new WL.BusyIndicator(null, { "text": "I'm Busy!"});busy.show();On an Android device this will show as:WL.Toast.sho

Página 15 - Architecture

WL.Client.hasUserPrefWL.Client.logActivityWL.JSONStoreThe WL.JSONStore functions provide access to the JSONStore APIs.WL.JSONStore.add(data, options)T

Página 16 - Application Center

WL.JSONStore.enhance(name, func)This function will add a named method to the prototype of Collections effectively extending their capabilities.• name

Página 17 - • Application Center

WL.JSONStore.getErrorMessage(errorCode)Retrieve a string representation of a JSONStore error described by the errorCode parameter.• errorCode – The er

Página 18 - Installation

◦ clear◦ localkeygen – If a password is supplied and encryption to be used, a token is obtained as part of the encryption process. Where the token is

Página 19 - C:\IBM\Worklight

WL.JSONStore.replace(doc, options)Replace documents within a collection with different versions.• doc – A single document or an array of documents• op

Página 20

WL.Logger.debugServer Side API ProgrammingServer side programming is building logic that is executed when a client invokes an adapter.See also:• Adapt

Página 21

◦ parameters – Any parameters required by the procedure.See also:• WL.Server.invokeSQLStoredProcedure(options)• WL.Server.createSQLStatement(statement

Página 22

supplied.• transformationUnusually the invokeHttp() method seems to execute synchronously. The result is a JavaScript object that contains the respon

Página 23 - • Worklight Studio

"name": "Ted Cruz", "office": "185 Dirksen Senate Office Building", "pa

Página 24

Apache HTTP Server...288Setting up

Página 25

This will open a dialog into which we can enter a JavaScript Object that will be passed as the parameters to the function. Note that experience seems

Página 26 - Installing Worklight Server

When the Run button is clicked, the invokeHttp function is executed by the Worklight server in the context of the deployed adapter. A further dialog

Página 27

See also:• HTTP Adapter Procedure implementationsWL.Server.readSingleJMSMessage(options)This API method reads a JMSText message from a JMS queue. The

Página 28

queue.• options – A description of how the message is to be read◦ destination – The JNDI name of the queue from which the message is to be read.◦ time

Página 29

If not supplied, the message will not expire.See also:• WL.Server.readSingleJMSMessage(options)• WL.Server.readAllJMSMessages(options)• WL.Server.requ

Página 30

Android DevelopmentInstalling the Android SDKThe Android SDK is required for building Android applications. It should be downloaded and installed int

Página 31

JavaScript FrameworksjQuery MobileDojo and Dojo MobileWhen creating a new app, we have the opportunity to select to include the Dojo library:When Dojo

Página 32

Local storage of dataIdeally, a Mobile App should also be able to operate when it is not currently connected to the network. In other words, it shoul

Página 33

Web ProgrammingWeb programming is the notion of writing applications that will exclusively run within the browser.The skills necessary for any web pro

Página 34

By creating a free userid, you can save your snippets for your own use or for sharing with others.Document Object Model – The DOMTypes of nodes found

Página 35

Mobile ApplicationsApplications are no longer limited to just running on a desktop PC or laptop. Instead, we now have a plethora of devices on which

Página 36

JavaScriptJavaScript is the native programming language for browsers. It is typically executed by including a script tag such as:<script type=&quo

Página 37

Calling JavaScript from JavaWith the arrival of Java 8, JavaScript has become a first class and pre-supplied addition to the Java environment.To call

Página 38

The {less} languageThe Less language is a preprocessor for CSS. This means that one can construct CSS much easier than hand crafting. For example, c

Página 39 - Installing WAS Liberty

• setInterval(function, interval) - Calls a function repeatedly every timer period• setTimeout(function, interval) - Calls a function once after a tim

Página 40

examine the state of variables and contexts within our program.One of the easiest ways to insert a breakpoint is the codding of the "debugger&quo

Página 41 - C:\IBM\Liberty

See also:• console.log• console.debug• console.info• console.warnconsole.infoThis method is a synonym for console.log.See also:• console.log• console.

Página 42

Dojo ProgrammingDojo is a completely open source JavaScript toolkit primarily designed for web programming. Its current release level is 1.9 (as of 2

Página 43

7. Create a "setenv.bat" file that adds the GIT/bin folder to the command path. In this exampleit was:C:\Program Files (x86)\Git\bin8. Add

Página 44

Dojo GUI DevelopmentDojo development can be performed in HTML or in JavaScript. Other alternative development environments include IBM's Integrat

Página 45 - Other Installation Tasks

to reveal the content.Asynchronous Module Definition (AMD)Dojo package loading is achieved through a technology called "Asynchronous Module Defin

Página 46 - Sources of Information

The patterns for designing user interfaces for mobile apps takes a different style from that for desktop.See also:• Designing for iOS 7Page 14

Página 47 - You Tube

• mapSee also:• Defining Modules• The Dojo Loader• sitepen: Dojo FAQ: How does passing a configuration object to require work? - 2014-01-22• sitepen:

Página 48 - Application Development

• xhr.post() - make an HTTP POST requestEach of these methods takes two arguments:• url – The target URL of the request• options – A JavaScript object

Página 49 - Anatomy of a Project

See also:• Deferred and asynchronous processing – dojo/Deferred• Ajax with Dojo• DojoToolkit: xhtGet• DojoToolkit: dojo/request/xhr (1.8)• Basic Acces

Página 50

• Dojo DOM Functionsdojo/domThis module provides some of basic DOM functions. These include:• byId(id) – Find the single DOM node with the given id.•

Página 51

E > F An F element that has an immediate parent of type E.E:linkE:visitedE:activeE:hoverE:focusE[foo] An E element with an attribute called foo.E[f

Página 52 - Adding targeted environments

dojo/dom-geometryThe dojo/dom-geometry class provides accessors for working with the geometry (sizes and positions) of DOM nodes. Convention maps thi

Página 53 - Worklight Development Server

◦ minute◦ second◦ millisecond◦ quarter◦ week◦ weekday• compare() - Compares two dates and returns 0 if they are the same, positive if the first is aft

Página 54

◦ milliseconds – A boolean. If selected, milliseconds will be included.See also:• Dates and times within JSONDijit WidgetsIn modern UI environments,

Página 55

instance of a button, nothing at all will be shown in the web page. We haven't told the button whereon the page it should appear. This is a cor

Página 56

page.• claro• tundra• noir• soria<style type="text/css">@import "http://.../dojo/resources/dojo.css";@import "http://..

Página 57

WorklightIBM Worklight is a development and runtime platform for building a variety of user interfaces including mobile.ReleasesThere have been a numb

Página 58

/// code here});Experience shows that the values can be:• "incomplete" – Missing required field not entered.• "error" – Data in

Página 59

text-align: center;background-repeat: no-repeat;}Here is an example. In the <head> of the HTML page, we define a new Style:<style type="

Página 60

<br /><input type="radio"data-dojo-type="dijit/form/RadioButton"name="drink"id="radioTwo"value="

Página 61 - Off-line Storage

• autoComplete – If set to true, characters entered are used to match with the pre-defined possible values as soon as possible.• hasDownArrow – Whethe

Página 62 - Push Notification

The date is accessed via the "value" property and is a JavaScript "Date" object with no time component of the date set. If the da

Página 63

Methods:• displayMessage(String) – displays the message associated with the text box. If no parameter is supplied, any existing message that is curre

Página 64

Amongst the properties of this widget are:• rows – the number of rows to show• cols – the number of columns to showSee also:• dijit/form/Textarea• dij

Página 65

Listsdijit/form/MultiSelectThe MultiSelect widget allows the user to select from a set of available options shown on a list.It can be used to select a

Página 66 - Artifact management

<option value="CA">California</option></select>By default, the Select changes its width to accommodate the selected it

Página 67

not. The default is true meaning that it should be initially shown open.dijit/FieldsetThis widget places content within a fieldset that may be collap

Página 68

• Worklight Studio – An integrated development environment (IDE) built on Eclipse used by a developer to build a mobile app.• Worklight Device Runtime

Página 69 - Adapters

See also:• Dojo docs – dijit.dialog – 1.10dijit/TooltipDialogVery similar to the dijit/Dialog, the dijit/TooltipDialog also shows a modal dialog. Howe

Página 70 - Creating a new Adapter

MenusDojo has extensive menu support. It provides both menu bar and context menus. Let us look first at menu bars.The code for the above looks as fo

Página 71 - Adapter Implementation

);A menu item can be disabled using its "disabled" property. Setting that to true disables the menu item.Images can be added to menu items

Página 72 - Adapter Types

• addChild()• bindDomNode()See also:• dijit/MenuItem• dijit/popupdijit/MenuBardijit/MenuItemThis widget represents an entry in a menu. Among its prop

Página 73

• popup – The widget to actually popup to the user (eg, an instance of Menu)• around – The dom node that will be the host of the popup• orient – A lis

Página 74 - Example HTTP Adapter

◦ horizontal – Show the list horizontally.◦ vertical – Show the list vertically.• effectUnits – The number of pixels to scale per mouse move increment

Página 75 - Returned data format

margin: 0 auto; text-align: center;}LayoutsDojo provides some powerful layout capabilities. In addition, we can always use the classic HTMLlayou

Página 76

"AccordionContainer" is part of dijit.layout. The "panels" in the accordion are added via the "addChild()" method. Typ

Página 77

◦ right-h• useMenu• useSliderSee also:• Dojo Docs – Tab Container – 1.9• dijit/layout/StackContainerdijit/TitlePaneSetting the toggleable property to

Página 78

The next image shows a sidebar design mode:As you can see, both contain the same number and types of panels but the width of top and bottom vs the hei

Página 79

Center can be thought of as a private app store however it provides more function than that. Developers within your own company can publish new versi

Página 80

the region is re-sizable in a single direction.The following JavaScript will create and add a Border Container with both left and center regions:var b

Página 81 - Database JDBC Drivers

◦ right – The right region◦ center – The center region• splitter – true or false. Can be set on any region except "center".• minSize – The

Página 82

• orientation – The location of the labels relative to the field. The choices are:◦ "vert" – The label is above the field.◦ "horiz&quo

Página 83 - Error Handling for Adapters

• nbZones – The number of columns (zones) in the grid.There are also a number of methods of interest on the GridContainer including:• setColumns() - S

Página 84 - Procedure:

dijit/ColorPaletteAmong the more interesting properties of this widget are:• palette – A string of either "7x10" or "3x4" describi

Página 85 - IBM Worklight Console

• selectionMode◦ none◦ single◦ multiple◦ extended• columnReordering• headerMenu• autoHeight◦ Not supplied – the height of the <div>◦ true – resi

Página 86

• hidden – A boolean. When set to true, the column is hidden.• classes – A set of CSS class names used to style the columnThe DataGrid also supports

Página 87

If double click for editing is too much, an option called "singleClickEdit" can be added so that only a single click will be needed to edit

Página 88

data store as input.eg.var store = new ObjectStore({"objectStore": new Memory({"data": data.caseHistories.items})});grid.setStore(

Página 89

columnIndex could be negative to indicate that the column is sorted descending. The first column is "1". Consider using Math.abs(columnInd

Página 90

InstallationThe installation of Worklight can be broken down into the installation of the distinct components associated with it. These include:• Wor

Página 91

• field – The identity of the field in a row of data that should be shown in cell.• name – The column name of the column• decorator – A function that

Página 92 - Performance

See also:• Object Stores and Data StoresGridX ModulesThe architecture of GridX is such that it has a set of optional plugins called "modules"

Página 93 - Security

called, it is the responsibility of the function to set the widget to contain the data value. Notice that in the widget description, we can add the d

Página 94 - • Off-line Storage

• props (String) - Set of properties defined on the Dijit Widget• fromEditor (function(storeData, gridData)) – Function to be called to return the val

Página 95 - Application Deployment

},editor: 'dijit/ColorPalette',editorArgs: {fromEditor: function(v, cell){return v || cell.data(); //If no color selected, use the original

Página 96

It is not expected that all properties are populated. Instead, the property populated will be a functionof the hookPoint attribute set in the menu opt

Página 97

Some of the more interesting properties of this module are:• multiple – A boolean. If false, only single selection is allowed. The default is true w

Página 98

Among its properties there are:• sizes – An array of numbers corresponding to the different sizes that can be supplied for paging. A negative number

Página 99

rowId Cell, Row, RowHeaderCellrowIndex Cell, Row, RowHeaderCellparentId Cell, Row, RowHeaderCellvisualIndex Cell, Row, RowHeaderCellcolumnId Cell, Hea

Página 100 - Page 100

First we can create a column in the grid to hold the button. { field: "name", name: "Actions", widgetsInCell: true,decorator: fun

Página 101 - Page 101

C:\IBM\Worklightto serve as the root of my Worklight installations. I then extracted the Eclipse distribution into a folder called "eclipse"

Página 102 - Programming References

• xstyle• put-selectorThe TreeDojo provides an elegant tree Widget that can show hierarchical data. The core of the tree is a Dijit widget called dij

Página 103 - Client Side API Programming

dijit/tree/ModelThis is an abstract interface that describes the methods and properties provided by a tree model. The dijit/tree/ObjectStoreModel is

Página 104 - WL.Client.getEnvironment()

dijit/tree/Model that owns the data shown in a dijit/Tree. What it does is map from a dojo/store to the tree model.Each element in the store must hav

Página 105 - WL.Client.getLoginName(realm)

Progress BarDijit provides a progress bar which shows a bar with optional text contained within it. Associated with the bar is a numeric value which

Página 106 - WL.Client.init(options)

column "column" and "matrix". A column style shows data for a period (eg. a day) in a single column. The matrix style shows a &q

Página 107 - Page 107

created, a property called "templateString" can be set to a fragment of HTML. This fragment defines the buttons. The default text looks as

Página 108 - Page 108

◦ "week" – Show dateIntervalSteps weeks. Here is a week calendar:◦ "month" – Show dateIntervalSteps months. Here is a month cale

Página 109

date/dateInterval option. See also endDate.• startTimeAttr – The name of a property (attribute) of an item in the store that will contain the start d

Página 110 - WL.Toast.show(message)

The function should return a new item that will be inserted into the calendar. If a return without data is executed, no new entry will be added.The w

Página 111 - Page 111

If we want to execute a method on the widget after it is created, we can add:<div data-dojo-type="module/MyWidget"><script type=&qu

Página 112 - WL.JSONStore.findById(id)

Table of ContentsMobile Applications...

Página 113 - WL.JSONStore.init()

2. Add a new repository to install.3. Select the ZIP file containing Worklight Studio. As 6.1.0, this is the file CIQ5PEN.zip.4. Select the features

Página 114 - Page 114

• getIdentity• queryEngine• transaction• getChildren• getMetadataThe query method is very interesting. It can be used to query a store which returns

Página 115 - WL.Device

maintained data that is held in memory.When constructed, it has a property called "data" that holds the initial data of the store.dojo/store

Página 116 - Server Side API Programming

answer that … but it appears that "out of the box", JavaScript doesn't have the concept of classes, inheritance or other common OO func

Página 117 - WL.Server.invokeHttp(options)

• create• postMixInProperties• buildRendering• postCreate – This is where most of the widget specification customization will occur.• startupThe filen

Página 118 - Page 118

• Dojo Documentation - Writing Your Own Widget• Understanding _WidgetBase – 1.9• Creating a custom widget – 1.9• Creating Dojo Widgets with Inline Tem

Página 119 - Page 119

<input type="radio"data-dojo-type="dijit/form/RadioButton"name="timeRangeMethod"id="${id}_rollingPeriod"val

Página 120 - Page 120

to define a setter function, we create a function with the name:_set<PropertyName>Attr: function(newValue) {…}The property name within the funct

Página 121 - Page 121

A chart object has three sets of primary attributes:• A plot• Axis• A series – the data to be drawnEach of these must be added to a chart.The Charting

Página 122 - See also:

◦ ClusteredBars◦ ColumnsPage 208

Página 123 - Page 123

The AMD packages Chart and Columns must be loaded. Special properties of this chart include:• gap – pixels between columns◦ Grid◦ Lines◦ Markers◦ Mar

Página 124 - Page 124

Note that it is essential that the Eclipse environment have Internet connectivity as installation of Worklight Studio will also require the installati

Página 125 - Android Development

◦ StackedBars◦ StackedColumnsPage 210

Página 126 - JavaScript Frameworks

◦ StackedLines◦ Pie chartThe data array supplied to the series may be either an array of numbers or an array of objects. If objects, these contain:•

Página 127 - Local storage of data

GaplinesareasmarkerstensionshadowshAxis/vAxisAreas Y Y Y Y YBars YClusteredBars YColumnsGridLines Y Y Y Y YMarkers Y Y Y Y YMarkersOnly Y Y Y Y YPieSc

Página 128 - Web Programming

• minorLabels – A boolean. If true, minorLabels are shown.• minorTicks – A boolean. If true, minorTicks are shown.• microTicks – A boolean. If true

Página 129 - Page 129

• sitepen - Zooming, Scrolling, and Panning in Dojo Charting – 2008-05-15• Dojo Docs – dojox.charting• Dojo tests – Charts• Developer Works – Customiz

Página 130 - JavaScript

The gauges have common properties that define their operation. Here is a list of some of the most important ones:• value – The value of the marker in

Página 131 - Cascading Style Sheets – CSS

Another, perhaps simpler solution is to hide the scrollbars with the style:overflow-x: hidden; overflow-y: hidden;• It is possible to remove the defau

Página 132 - Timer based functions

ri.set("start", 10);ri.set("value", 40);ri.set("radius", 60);this.gauge.getElement("scale").addIndicator("

Página 133 - Debugging in the browser

In addition to the value and range indicators, we also have the notion of a text indicator. This is responsible for showing a piece of text in the ga

Página 134 - • console.warn

See also:• Dojo GFX documentation – 1.9• Vector graphics with Dojo's GFX• Dive Into Dojo GFXDojo GFX Vector FontsVector fonts are fully scalable

Página 135

6. Accept the license agreementPage 22

Página 136 - Dojo Programming

// for us to do.var exists = query("link[href='" + path + "']", headNode);if (exists.length > 0) {return;}// Create t

Página 137 - Page 137

In the further configuration tab, we can define where we get our Dojo from:If we select a public CDN (Content Delivery Network), we get further option

Página 138 - Loading Dojo

http://download.dojotoolkit.org/Using the Web Preview Server runtimeThe IID Web Preview Server run-time can be thought of as a non-production Web Serv

Página 139 - Page 139

It is "tied in" to the IID environment and is manageable from within IID. One of the key features that it provides is the notion of proxyin

Página 140 - REST/Ajax calls

Clicking the "Configure Proxy URLs" link takes us to the proxy editor:From here we can define proxy definitions. A proxy definition is defi

Página 141 - Page 141

Here are some common settings when working with IBM BPM:Context path Target/teamworks/* http://localhost:9080/teamworksNote: as of 8.5, Dojo root can

Página 142 - DOM Access

Using a Source Dojo with IISTo use this with Dojo, consider the following:Download a source distribution of Dojo. The URL for the download is:http://

Página 143 - Page 143

Dojo MobileDojo provides a package specifically designed for building mobile apps. This package is called "dojox/mobile". This package pro

Página 144 - • Docs – dojo/query – 1.9

Dojo Mobile ThemesAn application running on Android needn't (and probably shouldn't) look exactly the same as the same application running o

Página 145 - Dojo Dates and Times

• transitionDir – A value of 1 means transition forward and a value of -1 means transition backwards• transition – The type of transition animation …

Página 146 - Page 146

IBM Worklight Studio will now install.7. Eclipse will now restart.See also:• Worklight StudioInstalling an Android SDK Eclipse PluginIf you are going

Página 147 - Dijit Widgets

dojox/mobile/ScrollableViewThe dojox/mobile/ScrollableView is also a View container but unlike the simple dojox/mobile/View it handles scrolling abili

Página 148 - Page 148

Its key characteristics are:• id – The identity of the view.• selected – True if this is the view to be shown at startup.dojox/mobile/TreeViewThis wid

Página 149 - Page 149

represents an item in the list. It has a set of visual parameters that are used to set its style:• icon• label• rightText• rightIcon2• rightIconWhen

Página 150 - Page 150

A closed pane's header has a visually distinctive look than that of an open pane.If a closed pane is opened, all the panes beneath it are pushed

Página 151 - Page 151

not have a label but normal HTML can added before or after it to add one.Some of the key properties of this widget include:• checked – The current che

Página 152 - Page 152

variety of other widgets such as Accordion, FixedSplitter and GridLayout.See also:• dojox/mobile/Accordiondojox/mobile/ContentPaneThis widget acts a c

Página 153 - Page 153

• dojox/mobile/RoundRectList• dojox/mobile/EdgeToEdgeCategorydojox/mobile/EdgeToEdgeStoreListThis widget provides a list whose content is determined f

Página 154 - Page 154

dojox/mobile/FixedSplitterThis widget is a container that shows its children side by side. The children can be laid out either horizontally or vertic

Página 155 - Page 155

• moveTo – The view that pressing the back button will take us to. If a "back" label is supplied then moveTo must also be specified.Child T

Página 156 - Page 156

• moveTo – The name of a view that will be shown if this icon is selected.See also:• dojox/mobile/IconMenudojox/mobile/ListItemThe list item is an ins

Página 157 - Page 157

4. Define the ADTAs of 2013-11-11 – the location for the plugin is:https://dl-ssl.google.com/android/eclipse/See the following web page for validation

Página 158 - Page 158

dojox/mobile/PageIndicatorThis widget shows a visual indication of which view from a set of views is currently being shown. Currently it is linked to

Página 159 - Page 159

See also:• dojox/mobile/CheckBoxdojox/mobile/RatingThis widget provides a rating icon which can be selected.Some of the key properties of this widget

Página 160 - Page 160

• query• queryOptions• labelProperty• queryProperty• transition – The type of animation to perform when transitioning from one selected child item to

Página 161 - Page 161

dojox/mobile/RoundRectListThe dojox/mobile/RoundRectList provides a container for list items. The corners of the list are displayed with a rounded ap

Página 162 - Page 162

dojox/mobile/SearchBoxTBDdojox/mobile/SimpleDialogThis widget provides a dialog container which can be popped up.Some of the key properties for this w

Página 163 - Page 163

• yearPattern – The coding for the year. The default is "yyyy".• monthPattern – The coding for the month. The default is "MMM".•

Página 164 - Page 164

The TabBar can also show itself in a variety of different styles through the "barType" property:tabBar (default)segmentedControlstandardTabs

Página 165 - Page 165

• icon1 – A URL of an icon to show when unselected.• icon2 – A URL of an icon to shown when selected.• badge – A badge to show associated with the but

Página 166 - Page 166

<input data-dojo-type="dojox/mobile/TextBox"></input>See also:• dojox/mobile/TextAreadojox/mobile/ToggleButtonThis widget provid

Página 167 - Page 167

◦ below-centeredA companion method called "hide()" will hide a previously shown tooltip.It also appears that to show correctly, a class call

Página 168 - Page 168

You may see a security warning similar to the following:This is expected and one should select "OK".6. After installation, we install the An

Página 169 - Page 169

The Value Picker seems to have display problems within the Rich Page Editor. When added, it does not appear to show in the visual canvas.See also:•

Página 170 - Page 170

See also:• dojox/mobile/ValuePickerdojox/mobile/ValuePickerTimePickerThis widget provides a visual for picking a time.• dojox/mobile/SpinWheelTimePick

Página 171 - Page 171

jQueryThe JavaScript library called "jQuery" is an alternative to Dojo (of course, one may also say that "Dojo" is an alternative

Página 172 - Page 172

Chrome Apps are a Google provided framework for building and running Chrome based applications that can be executed in the same fashion as native appl

Página 173 - Expando Pane

all the previous technologies.There are many books written on JavaFX and we aren't going to be exhaustive in our coverage of the technology. Rat

Página 174 - Page 174

javafx.stage.StageWe can loosely think of the stage object as being a representation of the top level window of the application. The stage ties to th

Página 175 - Page 175

FXML – The JavaFX Markup LanguageWe can create JavaFX applications using standard Java programming techniques such as creating instances of JavaFX obj

Página 176 - Editable cells

to achieve the same effect. Any property of a Java class can be set this way. All properties must start with a lower case letter. As an alternative

Página 177 - Replacing the data

The fx:id attributeMost nodes can have an "fx:id". This attribute names a Java variable of the same type of the node. When the FXML is par

Página 178 - Sorting columns

<Button text="My Button" onAction="#myHandler"/>Note that in the FXML, the special syntax of "#<function name>&qu

Página 179 - Cell events

this port number however it is easy to change.Installing Mobile Test Workbench for WorklightInstalling Worklight ServerThe Worklight Server runs on to

Página 180 - Page 180

Handling issues with Scene BuilderExperience has shown that from time to time, Scene Builder can get confused. When opening FXML files, they have bee

Página 181 - Page 181

select the Javadoc Location. We can now enter the path to the Javadoc URL on the web:http://docs.oracle.com/javafx/2/api/JavaFX Component SizingWhen

Página 182 - Page 182

can access this list through the node's "getStyleClass()" method which returns an ObservableList. We can add or remove class names fro

Página 183 - Page 183

Stage stage = (Stage) closeButton.getScene().getWindow();stage.close();}This will find the stage that contains the close button and close that stage.A

Página 184 - Page 184

The way to achieve this recipe can be broken down as as follows:When a request to run something expensive arrives on the main thread do the following:

Página 185 - Page 185

To create a new Task we would code:Task<String> taskInstance = new Task<String>() {@Overrideprotected String call() throws Exception {// D

Página 186 - Page 186

"javafxpackager" to package that code into a JAR file. This JAR has other artifacts injected into it also. We place this JAR and any other

Página 187 - Page 187

To add a listener to an ObservableList we can call:myObservableList.addListener(myListChangeListener);The ListChangeListener requires that you impleme

Página 188 - Adding and processing buttons

• Styling FX Buttons with CCSJavaFX CheckBoxThe CheckBox widget provides a selectable checkbox. The checkbox may be in one of three possible states:•

Página 189 - Installing Dgrid

JavaFX ComboBoxJavaFX HyperlinkA Hyperlink widget behaves like a button but looks like a browser link.JavaFX ImageViewThe ImageView widget (which is i

Página 190 - Page 190

suspect that everyone simply says "yeah yeah" and clicks next. Use your own judgment on how to proceed.Installation manager groups installe

Página 191 - Page 191

JavaFX ListViewThe ListView is a container for a list of items. If there are more items in the list than can be shown, the list scrolls.The items in

Página 192 - Page 192

JavaFX RadioButtonThe RadioButton provides a selectable button where only one from a group may be selected at one time.JavaFX SeparatorThe Separator w

Página 193 - Page 193

Callback<P, R>where P and R are Java class types. The "P" parameter is the type of data passed "into" the "call()"

Página 194 - Page 194

field as a parameter and uses "getFieldName()" and "setFieldName()" methods in the rows to get/setthe value of the cell.For exampl

Página 195 - Page 195

be set to any nodes you like which will then appear in the table.Again, a TableColumn has a CellFactory and a CellFactory returns a TableCell and a Ta

Página 196 - Page 196

Now, let us concentrate on just one column:Again, so far so good. Now let us remind ourselves that a table is a window onto the data and that it is v

Página 197 - Page 197

to set the table to be editable. By default, it is flagged as not editable. We can call:myTable.setEditable(true)to achieve this.There is a lifecycl

Página 198 - Parsing Dijit in HTML

TableView object, we can get an ObservableList of TableColumn items using the getColumns() method.JavaFX TextAreaThe TextArea widget provides an area

Página 199 - Object Stores and Data Stores

JavaFX ToggleButtonThe ToggleButton widget provides a button which can be in a "checked" or "unchecked" state with visualization o

Página 200 - Page 200

Associated with a WebView component is a parallel component called the WebEngine. It is the WebEngine that actually implements the browser and the We

Página 201 - Page 201

Next we have yet another confirmation page that we are installing Worklight Server.Page 28

Página 202 - Creating Custom Widgets

JavaFX MenuBarThe menu bar is a container for menus. It is typically seen at the top of an application. A property of this class called "menus&

Página 203 - Page 203

JavaFX CheckMenuItemJavaFX RadioMenuItemJavaFX CustomMenuItemJavaFX SeparatorMenuItemJavaFX ContextMenuThe ContextMenu is a menu container that can be

Página 204 - Page 204

JavaFX AnchorPaneJavaFX BorderPaneJavaFX FlowPaneJavaFX GridPaneThe GridPane allows us to layout components within cells. The grid contains rows and

Página 205 - Page 205

JavaFX TilePaneJavaFX TitledPaneJavaFX VBoxJavaFX Other classesJavaFX PopupJavaFX PopupWindowJavaFX Event HandlingEvent handling is the notion that wh

Página 206 - Dojo Charting

public void handle(MyEvent myEvent) {// Logic here ...}}And using lambda, this would be:myClass.addEventHandler(MyEvent.MYEVENT_A, event -> {// cod

Página 207 - Page 207

Scenic ViewThis is a JavaFX application that interrogates the data of a running Java Application.See also:• Scenic ViewSkeleton JavaFX FilesSample app

Página 208 - ◦ Columns

new components. Here is a skeleton class for just a component. This class both loads the FXML tocreate the meat of the component as well as acting a

Página 209 - Page 209

• masthead – An area that is optional and immediately below the title• graphic – A graphic image contained within the masthead• content – The primary

Página 210 - ◦ StackedColumns

2. Create a class that extends org.controlsfx.Dialog.3. Create a default constructor that calls load() (see following)◦ Call the super constructor – e

Página 211 - Page 211

#LoadModule proxy_module modules/mod_proxy.so#LoadModule proxy_http_module modules/mod_proxy_http.soReverse proxy is controlled by the "ProxyPass

Página 212

Now we are being offered the opportunity to configure our installation. The first question asks whether or not we wish to install the Application Cen

Página 213 - Page 213

transformationtype default, xslFilexslFile file nameTo invoke an adapter we create an object which contains an invocationsOptions object:adapter The n

Página 214 - Dojo Gauges – dojox/dgauges

The creation of a Worklight adapter adds some sample Procedures so we delete those. Next, in the Connection Policy we define the host-name and port o

Página 215 - Page 215

We can supply our security credentials next. These will be the credentials used to access the server:Next we define which type of Security protocol w

Página 216 - Page 216

Now we are ready to add our first procedure:We provide a name and a display name for our Procedure:Page 293

Página 217 - Page 217

We can now implement the code in the JavaScript implementation file that will "back" the Procedure. We edit the file called "BPMRest-i

Página 218 - Dojo GFX

Next we select the Procedure called "processApps" and run it:Page 295

Página 219 - Dojo and CSS

After a few moments, we will see the result of the REST query:What we are seeing is the JSON result from invoking the REST API against the IBM BPM run

Página 220 - Dojo Development with IID

Worklight SecurityThe model of Worklight security is that we define an "authentication realm". Think of this as a named set of steps to aut

Página 221 - Page 221

• What is the _WidgetBase "own()" method?Page 298

Página 222 - Page 222

Creating a new Adapter...70Adapter Imple

Página 223 - Page 223

We are now asked what kind of database we wish to use.Page 30

Página 224 - Page 224

We are now asked for information on how to connect to the database of the type we previously selected. This consists of entering the hostname and por

Página 225 - Page 225

In order to access the database, we need to specify a user we will use to connect.Page 32

Página 226 - Page 226

CREATE DATABASE APPCNTR COLLATE USING SYSTEM PAGESIZE 32768Page 33

Página 227 - Dojo Mobile

Now we specify which kind of application server will be used to host the Worklight Server.Page 34

Página 228 - Page 228

If installing into a WAS ND environment, you must select the Deployment Manager profile.Page 35

Página 232 - Page 232

The servers hosting Worklight Server should be restarted.Examination seems to show that the following major changes have been made to the App Server a

Página 233 - Page 233

WL.Client.invokeProcedure(invocationData, options)...107WL.Client.isUserAuthenticated(realm)...

Página 234 - Page 234

Next we are prompted to read, review and accept the license terms.Page 40

Página 235 - Page 235

Now we select where on the file system we wish to install the product code. In my example I used C:\IBM\LibertyPage 41

Página 236 - Page 236

Next we are asked for options to be included in the configuration.Page 42

Página 237 - Page 237

One final check before install continues.Page 43

Página 238 - Page 238

And at the end, we have installed the product.Page 44

Página 239 - Page 239

Other Installation TasksFollowing the installation of Worklight components, other installation tasks may be performed.• Java runtime for browsers – A

Página 240 - Page 240

Sources of InformationThe InfoCenterIBM's InfoCenter is the primary source for knowledge on Worklight. It is the on-line documentation for the p

Página 241 - Page 241

application with WebSphere Portal pages – 2013-08-07• Prototype mobile applications built with IBM Worklight for IBM Watson – 2013-08-05• Using the IB

Página 242 - Page 242

Application DevelopmentWorklight StudioWorklight Studio is the Eclipse based IDE for building Worklight projects. It can be launched by starting the

Página 243 - Page 243

See also:• Installing Worklight StudioCreating a Worklight ProjectOne of the first things we will do when building a new solution is create a new Work

Página 244 - Page 244

Android Development...125Installing

Página 245 - Page 245

Within the project we have a folder called "apps". It is within here that we will have a folder for each individual app within the project.

Página 246 - Page 246

There are:File Descriptioncommon/css/<App>.csscommon/images/icon.pngcommon/images/thumbnail.pngcommon/js/<App>.jscommon/js/initOptions.jsc

Página 247 - Page 247

Application DescriptorThe Application Descriptor is an XML file contained within the application portion of the project that has the file name "a

Página 248 - Page 248

From there, a dialog will be presented where one or more of the target environments can be added:Worklight Development ServerA copy of the Worklight S

Página 249 - Page 249

supplied and configured with Worklight Studio. It can be seen within the Servers view:The applications deployed to it are also shown.Developing UI –

Página 250 - Page 250

The editor is full of features and function. Let us try and break some of these down. The primary editing surface takes up the majority of the area.

Página 251 - This widget plays a video

The implementation of the Rich Page Editor relies on a browser being available on the OS running IBM Worklight Studio. Not all browser types are supp

Página 252 - Chrome Apps

The next page of the wizard allows us to set the name of the view and specify where within the HTML document the corresponding view will be inserted.P

Página 253 - Building a Chrome App

If we choose to set the view as the default, any previously selected default view will have its defaultattribute removed.Another important window in t

Página 254 - The Hello World app

Designing visuallyIn the Rich Page Editor's visual mode, a palette of available HTML and Widgets can be seen in the right hand side of the window

Página 255 - Page 255

dojo/dom...143dojo/dom-c

Página 256 - Page 256

item, the position within the document where the item will be inserted is shown. Releasing the mouse will insert the component. In addition to dragg

Página 257 - Page 257

Off-line StorageOne of the core architectural concepts that distinguish mobile apps from other types of app is that they are only transiently connecte

Página 258 - Page 258

Within a JSONStore one will find a set of "Documents". This might be a confusing name as they should not be considered documents such as PD

Página 259 - Scene Builder

Using the Mobile Browser SimulatorWorklight provides an application which runs in the browser that simulates a device. This can be used to test your

Página 260 - JavaFX and Eclipse

When a browser runs, it provides an identification of what kind of browser and what environment itis running upon to the hosted JavaScript application

Página 261 - JavaFX CSS

Clicking the "Install Browser Extension" will download the installer into the Downloadsfolder of your PC.To manually install this extension

Página 262 - JavaFX Dialogs

5. A new entry will appear in the Chrome Extensions listDebuggingconsole.log(...)WL.Logger.debug(...)WL.Logger.error(...)See Also• IBM Worklight Tutor

Página 263 - Page 263

You can now select the ZIP file that was previously exported.Page 67

Página 264 - Page 264

At the conclusion of this step, a new project can be found which will be the import of the previous export.Page 68

Página 265 - JavaFX Deployment

AdaptersIt is very common for a mobile app to interact with back-end systems to retrieve information, request actions to be performed or store new dat

Página 266 - JavaFX Data and Observables

dijit/layout/TabContainer...167dijit/TitlePane...

Página 267 - JavaFX Controls

returns JSON then that data is left as-is. If the data returned is something other than JSON then it isconverted into XML and then an XSL style sheet

Página 268 - Page 268

Adapter ImplementationAn adapter is implemented by a set of artifacts. To be specific:• An adapter configuration file in XML Within this file, a des

Página 269 - Page 269

commonly interacting with the back-end server through some other protocol.When we define the adapter, we define one or more procedures that can be cal

Página 270 - Page 270

• protocol – The network protocol used to connect to the back-end server. The choices areeither "http" or "https". Use http for

Página 271 - Page 271

Configuring the HTTP Adapter for SSLWhen the HTTP adapter connects to the back-end server it can utilize the HTTP protocol over either plain TCP or SS

Página 272 - Page 272

Security considerationsNoneReturned data formatXMLWe create a new adapter that we call Senators:We delete the sample procedures associated with it.Nex

Página 273 - CellFactory

At this point we have a defined adapter but no implementation for the server side procedure which calls the back-end service. We open up the "Se

Página 274 - Page 274

This completes our implementation. We can now test the adapter through Studio by selecting the adapter and running Run As > Invoke Worklight Proce

Página 275 - Editing a table cell

This shows a dialog in which the procedure name and parameters may be supplied.Clicking the Run button shows us the results of invoking the adapter on

Página 276 - Page 276

When a JMS adapter is defined, the connection policy looks as follows:In the jmsConnection settings we have entries for:• connectionFactory – The JNDI

Página 277 - Page 277

Progress Bar...193dojox/calen

Página 278 - Page 278

• WL.Server.writeJMSMessage(options)• WL.Server.requestReplyJMSMessage(options)SQL AdapterThe SQL adapter allows a Worklight client to execute SQL sta

Página 279 - JavaFX Menus

• Password – The password for the user used to connect to the database.The definitions for the adapter are saved in its XML configuration file called

Página 280 - Page 280

Calling an adapter from the ClientFrom the client side, we can invoke an adapter with Worklight provided API:WL.Client.invokeProcedure(invocationData,

Página 281 - JavaFX Containers

Error Handling for AdaptersSee also:• developerWorks – Error handling in IBM Worklight adapters - 2012-12-05Invoking Java code from an AdapterWhen an

Página 282 - Page 282

9. Define an adapter procedure called "getGreeting"10. In the Adapter2Java-impl.js JavaScript file, implement the "getGreeting" fu

Página 283 - JavaFX Event Handling

13. Examine the response:From the above output we see that the response now contains the text from the code that was executed in Java.See also:• devel

Página 284 - JavaFX Development

Application CenterAfter you have built your mobile application, your next puzzle will be how to get the application to your users and how to get feedb

Página 285 - Skeleton JavaFX Files

Installing the Application Center mobile clientPage 87

Página 287 - Page 287

The installer for Android can be found in the file called:<WorklightServer>/ApplicationCenter/installer/IBMApplicationCenter.apkPage 89

Página 288 - Apache HTTP Server

dojox/mobile/EdgeToEdgeStoreList...236dojox/mobile/ExpandingTextArea...

Página 290

See also:• Application Center• Redbook – Enabling Mobile Apps with IBM Worklight Application Center – REDP-5005-00 - 2013-06-11Page 91

Página 291 - "Authentication":

PerformanceThe performance of solutions built with Worklight can be improved via a number of different techniques.MinificationWhen a Worklight solutio

Página 292 - Page 292

• Remove white spaces and comments• Google Closure Compile Simple OptimizationIn addition you can specify while files to include and exclude from the

Página 293 - Page 293

Secure on-device stored dataThe nature of a mobile device is that … it is mobile. This means it can be carried around with you and, as such, can be l

Página 294 - Page 294

Cross site REST callsIf you are using the Chrome web browser, it has a command line option called "--disable-web-security" that switches off

Página 295 - Page 295

db2 SET CURRENT SCHEMA = 'WRKSCHM'db2 -vf <worklight_install_dir>/WorklightServer/databases/create-worklight-db2.sql -t4. Create a dat

Página 298 - Page 298

5. Create the Worklight Reports DatasourcePage 99

Comentários a estes Manuais

Sem comentários