This is a sample document about how to write standard documentation using bootstrap XSLT templates.

1 Overview

This is an optional brief description of the task list

Date Module Title Description Status
06-11-2019 SD Ventas y distribución This is a brief description of the task Approved

This is an example with a status="Approved".

06-11-2019 SD Ventas y distribución This is a brief description of the task Approved

This is an example with a status="Approved".

06-11-2019 SD Ventas y distribución This is a brief description of the task Approved

This is an example with a status="Approved".

DEPRECATED ITEM

Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.

Text styles: bold deleted emphasized inserted italic keybord marked product sampleoutput small subscript superscript

DITAA

Todo

First

Second

TEST

45

21/08/2024

RELEASE TAG

FIRST LEVEL

$$ HELL WORLD $$

1.1 HTML5 doctype

Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

Copy
<!DOCTYPE html>
<html lang="en">
  ...
</html>

1.2 Graph

You can use graphs

Loading...

1.3 Mobile first

With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, Bootstrap is mobile first. Mobile first styles can be found throughout the entire library instead of in separate files.

To ensure proper rendering and touch zooming, add the viewport meta tag to your <head>.

Copy
<meta name="viewport" content="width=device-width, initial-scale=1">

You can disable zooming capabilities on mobile devices by adding >user-scalable=no to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall, we don't recommend this on every site, so use caution!

Copy
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

1.4 Typography and links

Bootstrap sets basic global display, typography, and link styles. Specifically, we:

  • Set background-color: #fff; on the body
  • Use the @font-family-base, @font-size-base, and @line-height-base attributes as our typographic base
  • Set the global link color via @link-color and apply link underlines only on :hover

These styles can be found within scaffolding.less.

1.5 Callouts

Callout samples

Using the compiled JavaScript

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

Using the compiled JavaScript

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

Using the compiled JavaScript

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

Using the compiled JavaScript

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

Using the compiled JavaScript

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

Using the compiled JavaScript

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

Copy
<callout title="Using the compiled JavaScript" type="default">
    <p>Both <em>bootstrap.js</em> and <em>bootstrap.min.js</em> contain all plugins in a single file. Include only one.</p>
</callout>
<callout title="Using the compiled JavaScript" type="primary">
    <p>Both <em>bootstrap.js</em> and <em>bootstrap.min.js</em> contain all plugins in a single file. Include only one.</p>
</callout>
...

2 Grid sytem

Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts.

2.1 Introduction

Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here is how the Bootstrap grid system works:

  • Rows must be placed within a .container (fixed-width) or .container-fluid (full-width) for proper alignment and padding.
  • Use rows to create horizontal groups of columns.

2.2 Media queries

We use the following media queries in our Less files to create the key breakpoints in our grid system.

2.3 Grid options

See how aspects of the Bootstrap grid system work across multiple devices with a handy table.

Extra small devices Phones (<768px) Small devices Tablets (?768px) Medium devices Desktops (?992px) Large devices Desktops (?1200px)
Grid behavior Horizontal at all times Collapsed to start, horizontal above breakpoints
Container width None (auto) 750px 970px 1170px
Class prefix .col-xs- .col-sm- .col-md- .col-lg-
# of columns 12
Column width Auto ~62px ~81px ~97px
Gutter width 30px (15px on each side of a column)
Nestable Yes
Offsets Yes
Column ordering Yes

3 Responsive utilities

For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.

Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.

3.1 Available classes

Use a single or combination of the available classes for toggling content across viewport breakpoints.

Extra small devices Phones (<768px) Small devices Tablets (?768px) Medium devices Desktops (?992px) Large devices Desktops (?1200px)
.visible-xs-* Visible
.visible-sm-* Visible
.visible-md-* Visible
.visible-lg-* Visible
.hidden-xs Visible Visible Visible
.hidden-sm Visible Visible Visible
.hidden-md Visible Visible Visible
.hidden-lg Visible Visible Visible

As of v3.2.0, the .visible-*-* classes for each breakpoint come in three variations, one for each CSS display property value listed below.

4 Multiple levels

This is a level 1

4.1 Level 2

This is a level 2

4.1.1 Level 3

This is a level 3

Level 4

This is a level 4

5 Tables

Parameter Value
PDQPRIORITY 100
MAX_PDQPRIORITYY 100
DS_TOTAL_MEMORYY 90% of SHMVIRTSIZE
DS_MAX_SCAN Usually left as default value

6 Images

6.1 Inline images

Inline images (for example, "Some Text") can be added to text with the following syntax:

Copy
<img align="inline" src="CrossIcon.png" />

6.2 Responsive images

Images in Bootstrap 3 can be made responsive-friendly via the addition of the .img-responsive class. This applies max-width: 100%;, height: auto; and display: block; to the image so that it scales nicely to the parent element.

It is also available to define footers to images.

6.3 Image shapes

To center images which use the .img-responsive class, use .center-block instead of .text-center. See the helper classes section for more details about .center-block usage.

This is an image footer defined by an attribute.

6.4 Image lightbox

Lightbox for Bootstrap 3. Utilizes Bootstraps modal plugin to implement a lightbox gallery (http://ashleydw.github.io/lightbox/).

7 Videos

7.1 Simple video

Video in the body content: How to download videos from the internet.

7.2 Video in table

Example of how to show video inside a table.

Name Video
Downlaoding videos from YouTube

8 Carousel

A sample carousel

9 Charts

 

10 SVG

SVG Sorry, your browser does not support inline SVG.

11 Writing math formulas

We use MathJax to include mathematical formulas in Axional Docs documents. LaTeX or AsciiMath notation can be used, and the mathematics will be processed using JavaScript to produce HTML for viewing in any modern browser.

For more information visit the reference document.

12 Buttons

For information on how to install and use Bootstrap for Sass, consult the GitHub repository readme. It's the most up to date source and includes information for use with Rails, Compass, and standard Sass projects.

Button default
Button primary
Button success
Button info
Button warning
Bootstrap danger

13 Tabs

Tab1 content

Tab2 content

14 List groups

14.1 Basic List Groups

  • First item
  • Second item
  • Third item

14.2 List Group With Badges

  • First item
  • Second item
  • Third item

15 Boxes

Box 1

This is a default box

Box 2

This is a success box

Box 3

This is a danger box

16 Checkboxes

  Checkbox checked   Checkbox not checked

17 Treeview

  • TECH
    • Company Maintenance
    • Employees
      • Reports
        • Report1
        • Report2
        • Report3
      • Employee Maint.
    • Human Resources
  • XRP
    • Company Maintenance
    • Employees
      • Reports
        • Report1
        • Report2
        • Report3
      • Employee Maint.
    • Human Resources
  • Test
    • java
    • util
      • map
        • HashMap
        • HashSet
      • locale
    • lang

18 Horizontal definition list

User Agent
An HTML user agent is any device that interprets HTML documents.
Client-side Scripting
Client-side scripting generally refers to the category of computer programs on the web that are executed client-side i.e. by the user's web browser.
Document Tree
The tree of elements encoded in the source document.

19 Example

Example

This is a simple example

Example
Copy
This is a code example with a result
This is the result text

20 Code Syntax

20.1 Using the 'code' tag

20.1.1 Example 1: HTML

Example

...

Copy
<code lang="html">
                        <!DOCTYPE html>
                        <![CDATA[
<html lang="en">
  ...
</html>
]]
                        >
</code>

Result:

Copy
<!DOCTYPE html>
<html lang="en">
  ...
</html>
 

20.1.2 Example 2: CDATA example

  • Edit docs and write the <code> tag
  • Select the COMPONENTS top drop-down menu
  • Select the CDATA embedded option. The system will include the following example text:
Copy
Start text
    <![CDATA[
    Text in printed CDATA
    ]]>
    Final text
  • Replace the start text, text in printed CDATA and the final text with the desired ones.
Example
Copy
<call>
           
            <![CDATA[
    
            <xsql-script name='bb_sii_f2_noidentificado'>
             
                <body>
                    <foreach>
                        <select prefix='m_'>
                            <columns>
                                essii_facturas.*
                            </columns>
                            <from table='essii_facturas'>
                                <join table='cwsi_messages'>
                                    <on>essii_facturas.id_ws_request = cwsi_messages.id_ws_request</on>
                                </join>
                            </from>
                            <where>
                                     essii_facturas.libro = 'FE'
                                AND essii_facturas.erp_estado = 'E'
                                AND essii_facturas.sii_estado = '3'
                                <!-- los errores relacionados con el NIF son estos códigos -->
                                AND essii_facturas.sii_errnum IN (1101, 1117, 4111)
            
                                <!-- error haya dado hace mas de 4 dias -->
                                AND DATE(essii_facturas.date_created) BETWEEN TODAY - 10 AND TODAY - 4
            
                                AND ABS(essii_facturas.importetotal) &lt;= 400  
                            </where>
                        </select>
                        <do>
                            <!-- Revocar mensaje y modificar tipo factura -->
                            <update table='essii_facturas'>
                                <column name='erp_estado'>P</column>           <!-- Pendiente de entrega -->
                                <column name='sii_estado'><null/></column>
                                <column name='sii_errnum'><null/></column>
                                <column name='sii_errmsg'><null/></column>
                                <column name='pro_errmsg'><null/></column>
                                <column name='id_ws_request'><null/></column>
            
                                <column name='tipocomunicacion' text='true'>(CASE WHEN sii_estado IN ('1', '2', '3')
                                                                                  THEN (CASE WHEN tipocomunicacion = 'A5' THEN 'A6'
                                                                                             ELSE tipocomunicacion
                                                                                        END)
                                                                                  ELSE tipocomunicacion
                                                                             END)
                                </column>
                                   
                                <column name='tipofactura'><string>F2</string></column>
                                <column name='user_updated'><system.user.getCode/></column>
                                <column name='date_updated'><date.current/></column>
                                <where>
                                        essii_facturas.facidx = <m_facidx/>
                                    AND abs(essii_facturas.importetotal)    &lt;= 400  
                                </where>
                            </update>
                           
                            <update table='cwsi_messages'>
                                <column name='status_message'><string>CA</string></column>
                                <where>
                                    id_ws_request = <m_id_ws_request />
                                </where>
                            </update>
                        </do>
                    </foreach>
            
                    <delete table='cwsi_messages'>
                         <where>
                            status_message = 'CA' AND
                            NOT EXISTS (SELECT a.id_ws_request FROM essii_facturas a WHERE a.id_ws_request = cwsi_messages.id_ws_request) AND
                            NOT EXISTS (SELECT a.id_ws_request FROM cwsi_messages_single a WHERE a.id_ws_request = cwsi_messages.id_ws_request) AND
                            NOT EXISTS (SELECT a.id_ws_request FROM essii_ageviaje       a WHERE a.id_ws_request = cwsi_messages.id_ws_request) AND
                            NOT EXISTS (SELECT a.id_ws_request FROM essii_bieninve       a WHERE a.id_ws_request = cwsi_messages.id_ws_request) AND
                            NOT EXISTS (SELECT a.id_ws_request FROM essii_cobmetal       a WHERE a.id_ws_request = cwsi_messages.id_ws_request) AND
                            NOT EXISTS (SELECT a.id_ws_request FROM essii_opesegur       a WHERE a.id_ws_request = cwsi_messages.id_ws_request) AND
                            NOT EXISTS (SELECT a.id_ws_request FROM essii_pagos          a WHERE a.id_ws_request = cwsi_messages.id_ws_request) AND
                            NOT EXISTS (SELECT a.id_ws_request FROM essii_pagos_sii      a WHERE a.id_ws_request = cwsi_messages.id_ws_request)
                        </where>
                    </delete>
                </body>
            </xsql-script>
        ]]>
        
    
            </call>

20.1.3 Example 3: Other formats

Example

HTML

Copy
<!DOCTYPE html>
<html lang="en">
  ...
</html>

Java

Copy
import java.sql.*;
public static void main(String[] args) {
    int a = 0;
    for (int idx = 0; idx < 100; idx++)
        a+= idx;
}

XML

Copy
<data>
   <node id='10'>
      <section />
   </node>
</data>

Other lang types supported: "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml", "xsl".

https://github.com/googlearchive/code-prettify

20.1.4 Example 4: Long fragments limited in height

Example

Example of a long code fragment and a long result output, both limited in height:

Copy
<code height="100px" lang="html">
                        <!DOCTYPE html>
                        <![CDATA[
<html lang="en">
  ...
  content
  ...
  more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
</html>
]]
                        >
</code>
<!DOCTYPE html>
<html lang="en">
   ...
  content
  ...
  more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
  and more content
  ...
</html>

20.2 XSQL

20.2.1 Select (DML)

This tag allows queries on tables in the database. It consists of the following attributes and tags:

<select
    first='first'
    intotemp='intotemp'
    log='y|yes'
    oracle='ansi'
    ansi='yes'
    iwa-accelerate='on|off'
    iwa-fallback='on|off'
>
    <optimizer-directives /> *
    <columns> !
        <cols> +
    </columns>
    <from
        table='table'
        alias='alias'
    /> !
    <join
        table='table'
        type='left'
        alias='alias'
        if-has-security-role='true'
    > ?
        <on> +
            <join_tables_condition> +
        </on>
    </join>
    <where> ?
        <condition> !
    </where>
    <group> ?
        <groupby> !
    </group>
    <having> ?
        <having> !
    </having>
    <order> ?
        <orderby> !
    </order>
    <orderofobject /> ?
</select>
Example

XML

Copy
<select>
        <columns>
            gcom_presupm.codnac,
            gcom_presupm.delega,
            gcom_presupm.tercer,
            gcom_presupm.codfam
        </columns>
        <from table='gcom_presupt'>
            <join table='gcom_presupm'>
                <on>gcom_presupt.codigo = gcom_presupm.tippre</on>
            </join>
        </from>
        <where>
            gcom_presupm.preid = <p_preid /> AND
            gcom_presupm.numrev &lt;= <p_numrev />
        </where>
    </select>

20.2.2 Procedure/Function (SPL)

<procedure/function name='name'>
    <test id='id' /> *
    <args> *
        <arg
            name='name'
            like='like'
            type='smallint|int|integer|float|smallfloat|decimal|char|varchar|date|datetime|interval'
            size='size'
            mode='in|out'
            dict='dict'
        /> +
    </args>
    <returns
        type='smallint|int|integer|float|smallfloat|decimal|char|varchar|date|datetime|interval'
        size='size'
        like='like'
        dict='dict'
    /> *
    <define> *
        <variable
            name='name'
            like='like'
            type='smallint|int|integer|float|smallfloat|decimal|char|varchar|date|datetime|interval'
            size='size'
            dict='dict'
        /> +
    </define>
    <body> *
        <insert /> *
        <delete /> *
        <update /> *
        <select /> *
        <set name='name' /> *
        <if> *
            <expr> !
                <cond> !
            </expr>
            <then> !
                <instructions> !
                <set> !
                <debug> ?
                <exception> ?
            </then>
            <else-if> *
                <expr> !
                    <cond> !
                </expr>
                <then> !
                    <instructions> !
                    <set> !
                    <debug> ?
                    <exception> ?
                </then>
            </else-if>
            <else> ?
                <instructions> !
            </else>
        </if>
        <while> *
            <expr> !
                <cond> !
            </expr>
            <do> !
                <instructions> !
                <while.exit /> *
            </do>
        </while>
        <for name='name'> *
            <var-in /> !
            <do> !
                <instructions> !
            </do>
        </for>
        <foreach> *
            <select> !
                <into /> *
                <columns /> *
            </select>
            <if> !
                <expr> !
                    <cond> !
                </expr>
                <then> !
                    <instructions> !
                    <set> !
                    <exit> ?
                </then>
            </if>
        </foreach>
        <set name='name'> *
            <function /> +
        </set>
        <execute-procedure name='name'> *
            <in> *
                <param /> *
            </in>
            <out> *
                <var name='name' /> *
            </out>
        </execute-procedure>
        <lock
            table='table'
            mode='mode'
        /> *
        <unlock table='table' /> *
        <return var='var' /> *
    </body>
</procedure/function>
Example

XML

Copy
<procedure name='cgcogesl_chk_codcli'>
        <args>
            <arg name='p_rowenl' like='cgcogesl.rowenl' mode='in' />
            <arg name='p_numero' like='cefectos.numero' mode='in' />
        </args>
        <define>
            <variable name='m_empcode'  like='cgcogesh.empcode' />
            <variable name='m_codges'   like='cgcogesh.codges' />
            <variable name='m_codcli'   like='cgcogesh.codcli' />
            <variable name='m_fecpro'   like='cgcogesh.fecpro' />
            <variable name='m_estges'   like='cgcogesh.estges' />
            <variable name='m_count'    type='integer' />
        </define>
        <body>
            <set name='m_count'>-1</set>
            <include name='before' />
            <if>
                <expr>m_count = -1</expr>
                <then>
                    <select>
                        <columns>
                            COUNT(*)
                        </columns>
                     <into>m_count</into>
                      FROM cgcogesh, cefectos
                     WHERE cgcogesh.apteid  = p_rowenl
                       AND cefectos.numero  = p_numero
                       AND cgcogesh.empcode = cefectos.empcode
                       AND cgcogesh.codcli  = cefectos.tercer
                    </select>
                </then>
            </if>
            <include name='after' />
            <if>
                <expr>m_count = 0</expr>
                <then>
                    <exception>
                        'cgcogesl_chk_codcli: Usuarios [' || <char>p_rowenl</char> || '/' || <char>p_numero</char> || '] Error cliente !'
                    </exception>
                </then>
            </if>
        </body>
    </procedure>
Example

XML

Copy
<function name='cempresa_get_placon'>
        <test>
            <unit id='1'>
               SELECT MIN(cempresa.empcode)
                 FROM cempresa;
            </unit>
        </test>
        <args>
            <arg name='p_empcode' like='cempresa.empcode' />
        </args>
        <returns like='cempresa.placon' />
        <define>
            <variable name='cempresa_placon'  like='cempresa.placon' />
        </define>
        <body>
            <if>
                <expr>p_empcode IS NULL</expr>
                <then>
                    <exception>'cempresa_get_placon: Codigo de sociedad no informado !'</exception>
                </then>
            </if>
            <select>cempresa.placon
              <into>cempresa_placon</into>
               FROM cempresa
              WHERE cempresa.empcode = p_empcode
            </select>
            <if>
                <expr>cempresa_placon IS NULL</expr>
                <then>
                    <exception>'cempresa_get_placon: [' || p_empcode || '] Plan de cuentas no encontrada en [cempresa] !'</exception>
                </then>
            </if>
            <return>cempresa_placon</return>
        </body>
    </function>

20.2.3 array.toVector

Retorna un Vector (java.util.Vector) a partir del array de objetos (java.util.ArrayList) original. Su función principal dentro del lenguaje xsql es facilitar la construcción de solicitudes SOAP en las que se requieran enviar como parámetro a una función un Vector de datos. En general, por su naturaleza, los script xsql no requeriran el uso de esta función fuera de este ámbito.

<array.toVector name='name'>
    <array> ?
</array.toVector>
Example

Generación de un vector de enteros.

Copy
<xsql-script name='test_arrayToVector'>
      <body>
        <array.toVector>
             <array>
                  <number type='integer'>10</number>
                  <number type='integer'>20</number>
                  <number type='integer'>30</number>
             </array>
        </array.toVector>
      </body>
    </xsql-script>

20.2.4 geo.fromText (XSQL-Script tag)

Retorna la geometria especficada a partir de la representacion WKT (Well-Known Text).

<geo.fromText>
    <type> *
        <type> *
    </type>
    <coords> *
        <coords> *
    </coords>
    <srid> *
        <coords> *
    </srid>
</geo.fromText>
Example

XML

Copy
<select>
        <columns>
            <geo.fromText type='LINESTRING'>
                <coords>1313 242, 0 0</coords>
                <srid>4326</srid>
            </geo.fromText>,
            <geo.fromText type='POINT'>
                <coords>1 4</coords>
                <srid>4326</srid>
            </geo.fromText>,
        </columns>
        <from table='cdataemp' />
    </select>

20.3 Functions

20.3.1 Javascript

1. getLabelMessage

string getLabelMessage(boolean code = false , string defmsg , string param1, param2, ... , paramN);
				

El contenido de la etiqueta puede contener referencias dinamicas, mediante la sintaxis {i}. Donde las referencias {0}, {1}, ..., {n} serán reemplazadas por los respectivos parametros que reciba la funcion, a partir del tercer parametro.

Obtiene una etiqueta definida en los diccionarios de la base de datos actual para el idioma del usuario. En caso de no encontrar la etiquieta devuelve el texto por defecto. Si no se define ningun texto por defecto devuelve codigo_de_idioma.codigo_etiqueta; por ejemplo: EN.LBL_NAME

De esta forma, un mensaje del tipo: "The value must be defined between {0} and {1}". Ante una llamada a la funcion como la siguiente: getLabelMessage("LBL_RANG", "Default message...", 1, 8); Devolvera: "The value must be defined between 1 and 8".

Parameters
NameTypeRequiredDescription
codeboolean Codigo de la etiqueta
defmsgstring Mensaje por defecto a devolver en caso de no encontrar la etiqueta para el idioma del usuario
param1, param2, ... , paramNstring Argumentos para ser reemplazados en el mensaje si se utilizan referencias del tipo {0}, {1}, ..., {N}
Example

Javascript

Copy
getLabelMessage('JS_OVERLAP_TARIFF',''Text');

2. setFieldExistValues

setFieldExistValues(string fieldName, string objdest, string coldest, string qrycond , boolean noCache = false);
				

Modifica las referencias de integridad de un campo. Generalmente, las referencias de integridad estan definidas, o bien por la existencia de una foreign key (Hard Reference), o bien se definen mediante el mantenimiento de relaciones de integridad wic_jdic_collist (Soft References). Esta funcion, permite definir relaciones dinamicas (Dynamic References), gestionadas va programa. consulta, define los posibles valores que puede adoptar el campo actual. El objeto aqui indicado debera estar definido en alguno de los diccionarios de la base de datos actual.

Parameters
NameTypeRequiredDescription
fieldNamestring Nombre del campo.
objdeststring Objeto destino de la referencia.
coldeststring Nombre de la columna que contiene los posibles valores que podra adoptar el campo.
qrycondstring Condicion SQL que, junto con la clausula SQL del objeto destino, delimita el numero registros validos.
noCacheboolean cada consulta se ejecuta en la base de datos. -false la consulta SQL se ejecuta en cache.
Example

Javascript

Copy
setFieldExistValues(field.name, "gdelegac", "codigo",
        (getFieldValue("gvenpedh.empcode") != "" ?
        "gdelegac.empcode = '" + getFieldValue("gvenpedh.empcode") + "' AND gdelegac.estado != 'B'" :
        "gdelegac.estado != 'B'")
    );

3. sqltableAddEvent

sqltableAddEvent(string|number boxid, string evtname, string callback);
				

Anade un evento a la tabla. Permite indicar la ejecucion de una funcion cuando se dispara un determinado evento. Los eventos contemplados son:

# onload Se ejecuta cada vez que se carga la tabla

# before_edit (rowid) Se ejecuta cuando la tabla pasa a modo edicion. Si la funcion del evento devuelve 'false' se previente la edicion de la fi.

# after_edit (rowid) Se ejecuta despues de poner la fila en modo edicion. Permite deshabilitar campos mediante la funcion sqltableSetFieldNoEntry

# before_insert (rowid) Se ejecuta antes de realizar la insercion de una nueva fila. Si la funcion del evento devuelve 'false' se previenteap insercion de la fila.

# after_insert (rowid) Se ejecuta despues de que la fila se ha insertado satisfactoriamente.

# before_update (rowid) Se ejecuta antes de modificar una fila. Si la funcion del evento devuelve 'false' se previente la modificacion de la filabpr

# after_update (rowid) Se ejecuta despues de que la fila se ha modificado satisfactoriamente.

# before_delete (rowid) Se ejecuta antes de eliminar una fila. Si la funcion del evento devuelve 'false' se previente el borrado de la fila.

# after_delete (rowid) Se ejecuta despues de que la fila se ha eliminado satisfactoriamente.

Parameters
NameTypeRequiredDescription
boxidstring|number Puede ser tanto el codigo nemotecnico de la caja(boxcode), como el identificador interno de la base de datos(boxid).
evtnamestring Nombre del evento para el que se desea añadir la funcion.
callbackstring Funcion a ejecutar cuando se dispare el evento.

4. getLabelMessage

string getLabelMessage(boolean code = false , string defmsg , string param1, param2, ... , paramN);
				

El contenido de la etiqueta puede contener referencias dinamicas, mediante la sintaxis {i}. Donde las referencias {0}, {1}, ..., {n} seran reemplazadas por los respectivos parametros que reciba la funcion, a partir del tercer parametro.

Obtiene una etiqueta definida en los diccionarios de la base de datos actual para el idioma del usuario. En caso de no encontrar la etiquieta devuelve el texto por defecto. Si no se define ningun texto por defecto devuelve codigo_de_idioma.codigo_etiqueta; por ejemplo: EN.LBL_NAME

De esta forma, un mensaje del tipo: "The value must be defined between {0} and {1}". Ante una llamada a la funcion como la siguiente: getLabelMessage("LBL_RANG", "Default message...", 1, 8); Devolvera: "The value must be defined between 1 and 8".

Parameters
NameTypeRequiredDescription
codeboolean Codigo de la etiqueta
defmsgstring Mensaje por defecto a devolver en caso de no encontrar la etiqueta para el idioma del usuario
param1, param2, ... , paramNstring Argumentos para ser reemplazados en el mensaje si se utilizan referencias del tipo {0}, {1}, ..., {N}
Example

Javascript

Copy
getLabelMessage('JS_OVERLAP_TARIFF',''Text');

5. Arguments vis configurator

Arguments vis configurator(string fieldName, string objdest, string coldest, string qrycond , boolean noCache = false);
				

Modifica las referencias de integridad de un campo. Generalmente, las referencias de integridad estan definidas, o bien por la existencia de una foreign key (Hard Reference), o bien se definen mediante el mantenimiento de relaciones de integridad wic_jdic_collist (Soft References). Esta funcion, permite definir relaciones dinamicas (Dynamic References), gestionadas va programa. consulta, define los posibles valores que puede adoptar el campo actual. El objeto aqui indicado debera estar definido en alguno de los diccionarios de la base de datos actual.

Parameters
NameTypeRequiredDescription
fieldNamestring Nombre del campo.
objdeststring Objeto destino de la referencia.
coldeststring Nombre de la columna que contiene los posibles valores que podra adoptar el campo.
qrycondstring Condicion SQL que, junto con la clausula SQL del objeto destino, delimita el numero registros validos.
noCacheboolean cada consulta se ejecuta en la base de datos. -false la consulta SQL se ejecuta en cache.
Example

Javascript

Copy
setFieldExistValues(field.name, "gdelegac", "codigo",
        (getFieldValue("gvenpedh.empcode") != "" ?
        "gdelegac.empcode = '" + getFieldValue("gvenpedh.empcode") + "' AND gdelegac.estado != 'B'" :
        "gdelegac.estado != 'B'")
    );

6. setInsertRequiresReset

setInsertRequiresReset ( )

Obliga al usuario a ejecutar el reset del formulario antes de una insercion.

20.4 Java

Example

Java

Copy
import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.atomic.AtomicInteger;
    public class MyThreadFactory implements ThreadFactory {
      private static final ConcurrentHashMap<String, AtomicInteger> POOL_NUMBER = new ConcurrentHashMap<String, AtomicInteger>();
      private final ThreadGroup group;
      private final AtomicInteger threadNumber = new AtomicInteger(1);
      private final String namePrefix;
      public MyThreadFactory(String threadPoolName) {
          if (threadPoolName == null) {
              throw new NullPointerException("threadPoolName");
          }
          POOL_NUMBER.putIfAbsent(threadPoolName, new AtomicInteger());
          SecurityManager securityManager = System.getSecurityManager();
          group = (securityManager != null) ? securityManager.getThreadGroup() :
                                                        Thread.currentThread().getThreadGroup();
          AtomicInteger poolCount = POOL_NUMBER.get(threadPoolName);
          if (poolCount == null) {
                namePrefix = threadPoolName + " pool-00-thread-";
          } else {
                namePrefix = threadPoolName + " pool-" + poolCount.getAndIncrement() + "-thread-";
          }
      }
      public Thread newThread(Runnable runnable) {
          Thread thread = new Thread(group, runnable, namePrefix + threadNumber.getAndIncrement(), 0);
          if (thread.isDaemon()) {
                thread.setDaemon(false);
          }
          if (thread.getPriority() != Thread.NORM_PRIORITY) {
                thread.setPriority(Thread.NORM_PRIORITY);
          }
          return thread;
      }
    }

21 Task List

This tag allows to write tasks lists. It consists of the following attributes and tags:

Copy
<taskList lang="">
    <p>This is an optional brief description of the task list</p>
    <taskItem date="06-11-2019" module="SD" title="Ventas y distribución" desc="This is a brief description of the task" status="Approved">
        <p>
            This is a long description that can be on display or hidden using the right button.
            You can write paragrafs, lists, links,...
        </p>
    </taskItem>
    <taskItem date="07-11-2019" module="FI" title="Finanzas" desc="This is a brief description of the task" status="Approval Pending">
        <p>
            This is a long description. You can write paragrafs, lists, links, buttons,...
        </p>
    </taskItem>
    <taskItem date="08-11-2019" module="CONS" title="Construcciones" desc="This is a brief description of the task" status="Proposed">
        <p>
            This is a long description. You can write paragrafs, lists, links, buttons,...
        </p>
    </taskItem>
</taskList>

taskList 'lang' attribute

By default 'lang' is set to ENG but the user can change it to ESP or CAT.

Extended description

Show/Hide the extended description by clicking the button at the end of each row.

This is an optional brief description of the task list

Date Module Title Description Status
06-11-2019 SD Ventas y distribución This is a brief description of the task Approved

This is an example with a status="Approved".

07-11-2019 FI Finanzas This is a brief description of the task Approval Pending

This is an example with a status="Approval Pending" and a ordered list in the description.

  1. Permitir en un acuerdo que la forma de pago, el tipo de efecto sean nulos. Esto indicará que se mantienen las condiciones originales pactadas con el cliente.
  2. Los campos de descuentos a nivel de cabecera, deben permitir nulos o elminarse. Esto indicará que el acuerdo no modifica las condiciones de descuentos generales del documento, o que se aplican las definidas para el cliente.
  3. A Nivel de lineas, el precio y los % de descuento deben ser nulables, a lo mejor solamente pactamos un precio, con el descuento que tenga la promocion en el momento de la venta, o solo pactamos un descuento, o ambos.
08-11-2019 CONS Construcciones This is a brief description of the task Proposed

This is an example with a status="Proposed" and an unordered list in the description.

  • Permitir en un acuerdo que la forma de pago, el tipo de efecto sean nulos. Esto indicará que se mantienen las condiciones originales pactadas con el cliente.
  • Los campos de descuentos a nivel de cabecera, deben permitir nulos o elminarse. Esto indicará que el acuerdo no modifica las condiciones de descuentos generales del documento, o que se aplican las definidas para el cliente.
  • A Nivel de lineas, el precio y los % de descuento deben ser nulables, a lo mejor solamente pactamos un precio, con el descuento que tenga la promocion en el momento de la venta, o solo pactamos un descuento, o ambos.

22 Permanent Links

To create a link use the following:

Copy
<a href="Here goes the link">Here goes the text to display</a>

To copy to clipboard a document's permanent link, click on the button 'Copy Link' located in the document's button panel (top right).

23 Api

This tag allows to documentate functions.

The api tag can have the attribute package. If infomed it will be displayed before the function name in the method information.

The param tag inside a function has the attribute configurator which can have the following values:

  • yes - the param will be passed to the configurator via general setter (setValue("paramName", paramValue))
  • setter - the param will be passed to the configurator via individual setter (setParamName(paramValue))
  • no or not informed - the param will be used as a normal param of the principal function

Class Ax.ext.db.schema


Method Summary

Modifier and Type
Method
Description
object[] 
modelStatus(string type, config => {})
Verify if the logic model (cataloged in the dictionary) corresponds with the physical model (database) of each one of the objects (table, index, check, etc).
resultset 
modelCreate(string type, config => {})
Executes the statements of creation of structure (DDL) over one or several databases.
string[] 
modelUpgrade(string type, config => {})
Verify if the logic model (cataloged in the dictionary) corresponds with the physical model (database) of each one of the objects (table, index, check, etc).
object 
modelDrop(string type, config => {})
Remove one or several object physically from the database as cataloged in the dictionary.

Method Detail

Ax.ext.db.schema.modelStatus

object[] Ax.ext.db.schema.modelStatus(
	string type,
	config => {
		setDict(string);
		setPattern(string);
		setDebug(boolean);
	}
)
Info:
Verify if the logic model (cataloged in the dictionary) corresponds with the physical model (database) of each one of the objects (table, index, check, etc). It not only verifies but also gives an idea of what should be execute so that the logical model corresponds to the physical model.
Parameters:
type - all|TABLE|INDEX|FOREIGN|CHECK|TLOAD
dict - Dictionary where the object is found. This attribute is optional, if the object is reported it is taken from this dictionary. If it is not reported, the system search it in all the dictionarys of the application and it will execute the one that is defined in the wic_dbms_dicts befor
pattern - Filter pattern
debug - Debug
Returns:
object[]

Example
Copy
let rs = Ax.ext.db.schema.modelStatus('all', config => {
	config.setPattern("studio_%");
	config.setDict("wic_iges");
	config.setDebug(true);
});

Ax.ext.db.schema.modelCreate

resultset Ax.ext.db.schema.modelCreate(
	string type,
	config => {
		setArgument("dict", string);
		setArgument("temp", string);
		setArgument("debug", boolean);
	}
)
Info:

Executes the statements of creation of structure (DDL) over one or several databases. In the creation of the structure you can differentiate different objects to create.

  • Table: Just the creation of the table with its columns.
  • Index: Index, primary keys, foreign keys, etc.
  • Check: Checks.
  • Data upload: There are tables in which you want that when the table is created the system automatically loads records on this table.
Parameters:
type - all|TABLE|INDEX|FOREIGN|CHECK|TLOAD
dict - Selection condition of the SQL object
temp - Filter pattern
debug - Debug
Returns:
resultset

Example
Copy
let rs = Ax.ext.db.schema.modelCreate('index', config => {
	config.setPattern("studio_%");
	config.setDict("wic_iges");
	config.setDebug(true);
});

Ax.ext.db.schema.modelUpgrade

string[] Ax.ext.db.schema.modelUpgrade(
	string type,
	config => {
		setArgument("dict", string);
		setArgument("temp", string);
		setArgument("debug", boolean);
	}
)
Info:
Verify if the logic model (cataloged in the dictionary) corresponds with the physical model (database) of each one of the objects (table, index, check, etc). It not only verifies but also gives an idea of what should be execute so that the logical model corresponds to the physical model.
Parameters:
type - all|TABLE|INDEX|FOREIGN|CHECK|TLOAD
dict - Dictionary where the object is found. This attribute is optional, if the object is reported it is taken from this dictionary. If it is not reported, the system search it in all the dictionarys of the application and it will execute the one that is defined in the wic_dbms_dicts befor
temp - Filter pattern
debug - Debug
Returns:
string[]

Example
Copy
let rs = Ax.ext.db.schema.modelUpgrade('table', config => {
	config.setPattern("studio_%");
	config.setDict("wic_iges");
	config.setDebug(true);
});

Ax.ext.db.schema.modelDrop

object Ax.ext.db.schema.modelDrop(
	string type,
	config => {
		setArgument("dict", string);
		setArgument("temp", string);
		setArgument("debug", boolean);
	}
)
Info:
Remove one or several object physically from the database as cataloged in the dictionary.
Parameters:
type - all|TABLE|INDEX|FOREIGN|CHECK|TLOAD
dict - Dictionary where the object is found. This attribute is optional, if the object is reported it is taken from this dictionary. If it is not reported, the system search it in all the dictionarys of the application and it will execute the one that is defined in the wic_dbms_dicts befor
temp - Filter pattern
debug - Debug
Returns:
object

Example
Copy
let rs = Ax.ext.db.schema.modelDrop('table', config => {
	config.setPattern("studio_%");
	config.setDict("wic_iges");
	config.setDebug(true);
});