WAJAF is the WebAbility Javascript Application Framework. It is a synchronized GO-Server <=> JS-Client framework to develop organized web applications.
GO manuals are available on godoc.org
The examples and tests show the working functions and the manual of them.
- The main core.
The main core contains:
- 2 attributes:
Examples & manuals: ![Go to attributes examples]
- zIndex method, used to set an unused zIndex to a node,
Examples & manuals: ![Go to core examples]
- Verification methods is*, used to know the type of JS objects. All the functions return true/false. True means the variable match the specified type by the is* method. -- isDefined: returns true if the variable is not undefined. -- isEmpty: returns true if the variable is empty: empty means undefined, null, empty array or empty string. -- isBool: returns true if the variable is a boolean. -- isNumber: returns true if the variable is number, integer or float. -- isString: returns true if the variable is a string or a String object. -- isArray: returns true if the variable is an array. -- isObject: returns true if the variable is an object. It includes String(), Date(), {}. etc. Note than Javasript consider null as an object too. -- isFunction: returns true if the variable is a function. -- isDate: return true if the variable is a Date object. -- isDOM: return true if the variable is a DOM node object.
Examples & manuals: ![Go to examples]
- Objects and nodes methods.
For objects:
- WA.extend: Will extends an object from another (inheritance).
- WA.clone: Will clone an object and all its children. -- If you dont care the type of object but only its attributes, you can use WA.clone(object, true) -- If you use the normal method WA.clone(object), it will clone the whole object with attributes and methods.
- WA.sizeof: Will calculates the size (number of attributes) of an object.
For DOM nodes:
- WA.createDomNode: Will create a DOM Node of specified type, and apply classname if defined.
- WA.getDomNode: Will get the DOM node of the specified Id.
- WA.toDOM: Will get the DOM node from a string ID or a node itself.
Examples & manuals: ![Go to examples]
- Node get() functions.
The get function lets you find a node or a set of nodes by rules, then apply some changes on the node.
The get() method works as followed:
- The code will search all the nodes corresponding to the filter you give it.
There are 3 posibilities:
a - No nodes were found. The subsequent operations will do nothing. b - There was only one node found. The subsequent operations will work directly on this node. c - There was more than 1 node found (from 2 to the whole DOM). The subsequent operations will work for each one of the found nodes.
-
The operation is applied to all the node(s).
-
The operations can be chained.
The parameter of get() method is a string used to search the nodes:
"#id": If you want to find a single node by its unique id, using the CSS syntax. ".class": If you want to find a list of nodes by their class, using the CSS syntax. "!name": If you want to find a list of nodes by their name (in a form). "tag": If you want to find a list of nodes by their tag type (example: 'div', 'a').
Examples & manuals: ![Go to examples]
- The browser core:
- Adds local specific functions to all the Containers, Elements, Zones, etc to improve tree programmation.
- Tests
- Added searcheabletextfieldElement, go and JS modified
- mmcFieldElement now supports multifile upload too, and a template to present information
- lovFieldElement now supports radio and checkboxes, and multiple select
- groupContainer now supports sub-forms for master-details administration screens with templates to format detail records
- Errors corrected con crowser getNodeDocumentLeft and getNodeDocumentTop to be correctly calculated with scroll offsets
- Added function findNodeByClass in browser class
- Added coretemplate.js to inject templates with data sets
- Added floatingContainer for floating windows in page
- Added resize of columns, order of columns and drag and drop for order into gridContainer
- Error corrected on tabContainer when unloading the instance
- TreeContainer now supports dragging and hover, sinchronized with server with the listener
- textfieldElement and textareafieldElement corrected to display correctly the number of words and letters
- New classes into css for new components
- Added listener option to AjaxRequest to follow the upload of request to the server
- Error corrected in the 4GL Manager, the node with an inner application was not linking the application attribute
- ggraphElement has been changed to control errors with try-catch when calling the google library
- mmcFieldElement has been modified to work as expected and be able to manage any kind of files
- gridContainer has been modified to be able to order the information by columns
- Added CodeNode.go to create a node of code.
- Added colorfieldelement.go to create a field to pick a color.
- Added config/wajaf.conf in examples to run the examples on a xamboo server if needed.
- The css for prettify is now absolute in the html code.
- Some correction in the example code.
- The go libraries now includes the new structures compatible with Xamboo 1.6
- The jsfile.go added to manage all the JS files on an embed filesystem.
- The js.go library now uses the GetJSFile into the wajaf library.
- go.mod modified to go 1.17 for embed filesystem needed.
- Some errors corrected into groupContainer.js and tabContainer.js to work better.
- The buttonElement now as a listener to send data to the server when clicked.
- lovFieldElement is now working correctly.
- textFieldElement now knows integer, float, text, masked types of fields, and correctly convert values to send to server.
- ajaxManager can now handle ajax promises.
- canvasManager create for test purpose.
- wa4glmanager modified to work on promises, capture errors and needed login requests.
- options.go added to manager lovfield list of options.
- resources directory removed, replaced by embed filesystem
- Correction of isEmpty function of the core, to give true is the Date is empty or the String() is empty.
- The simple javascript examples are now working on a Xamboo Go Server (Presentation, js.go corrected, all libraries working)
- gridContainer.js has been modified to support large list of daat and put correct information metada data.
- node.go enhanced to detect wrong XML formats and return an error
- Added xml.Comment into node XML unmarshall to consider it
- First build on GO, with all the necesary code to devel, test, publish and show live examples.
- Adds titleview parameter to buttonelement.js (missing)
- Separates coreext.js and coretemplate.js from core.js
- JS code is now embedded into GO code in resources directory. embed.go is added to generate embedded code, but is not compilable with the libraries.
- Correction on node: HELP as messages, not help children
- Correction on node: JSON Marshal, wrong ',' calculations (again)
- Correction on node: JSON Marshal, wrong ',' calculations
- Added parameters to creation of containers, zones, dataset and elements
- Added know child "code" to event
- Correction of event node so code is into code node.
- Correction of all the Types of containers and elements to put correct js library name (nameContainer and nameElement syntax)
- Added MarshalXML on Node to build XML code from nodes
- Correction on assigning the node data (concatened, only if some info into it: will ignore spaces and line formatting characters)
- Added UnmarshalXML
- Added MarshalJSON
- Added basic functions AddMessage, AddHelp, AddEvent to a Node, with auto creation of children nodes
- Removed messages, events, help attributes of Node
- Added AddZone() to SeparatorContainer as a new struct extended from DomDef interface to build upon specific functions for specific nodes (it works)
- All structures and Application tree implemented in GO
- Full wajaf JS available in js directory