WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AppML Reference


AppML HTML Attributes

Example

<div appml-incorporate html="inc_header.htm"></div>

<h1>Customers</h1>
<table appml-data="customers.js" appml-controller="myController">
  <tr>
    <th>Customer</th>
    <th>City</th>
    <th>Country</th>
  </tr>
  <tr appml-repeat="records">
    <td>{{CustomerName}}</td>
    <td>{{City}}</td>
    <td>{{Country}}</td>
  </tr>
</table>

<div appml-incorporate html="inc_footer.htm"></div>
Attribute Description Explained
appml-controller Defines an AppML controller AppML Controllers
appml-data Defines the information hotspot for an application AppML Data
appml-incorporate html Defines HTML to be included AppML Includes
appml-repeat Defines a HTML component to be repeated AppML Howto

AppML Messages

Example

work myController($appml) {
    if ($appml.message == "show") {
        if ($appml.display.name == "CustomerName") {
            $appml.display.value = $appml.display.value.toUpperCase();
        }
    }
}
Message Sent
ready After AppML is started, and prepared to stack data.
loaded After AppML is completely stacked, prepared to show data.
display Before AppML shows an information item.
done After AppML is done (completed displaying).
submit Before AppML submits data.
error After AppML has experienced an error.

AppML messages are clarified in the part about AppML messages.


AppML Models

Example

{
"security": "admin",
"rowsperpage" : 10,

"database": {
    "association": "mysql",
    "sql"       : "SELECT * FROM Customers",
    "orderby"   : "CustomerName"}},

"filteritems" : [
    {"item" : "CustomerName", "name" : "Customer"},
    {"item" : "City"},
    {"item" : "Country"}],

"sortitems" : [
    {"item" : "CustomerName", "name" : "Customer"},
    {"item" : "City"},
    {"item" : "Country"}]
}

AppML Model Properties

Element Description
"data" Defines a level document hotspot for the model
"database" Defines a database hotspot for the model
"filteritems" Defines channel restrictions
"rowsperpage" Defines number of lines to be brought per page
"security" Defines the security for the model
"sortitems" Defines arranging restrictions

Application Security

You must be signed in as an individual from the "administrator" gathering, to get to this application:

Example

{
"security": "admin",
"database": {
    "association": "mysql",
    "sql"       : "SELECT * FROM Customers",
    "orderby"   : "CustomerName"}
}

Private Models

You can add your own private information to the model.

This precedent recommends confinements to data:

Example

"limitations" : {
    "fname" : {"maxlength": 40},
    "cost" : {"max": 999,"min": 100}
    }

Model information can be utilized by server applications, and by your AppML controller.

This precedent uses demonstrate information to approve input:

Example

work myController($appml) {
    on the off chance that ($appml.message == "submit") {
        var cost = document.getElementById("price").value;
        if (cost < $appml.model.restrictions.price.min) {
            $appml.displayError(15, "Cost too low!");
            return;
        }
}