Allows to store in the request a XSQL variable of any type.
1 http.request.setAttribute
<http.request.setAttribute name='name'>
<object /> !
</http.request.setAttribute>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Opening mode of the url [modal|new|self]. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eobject | Object | The address URL of the system will be opened in the following form load. |
Returns | |
---|---|
Type | Description |
boolean | Returns true or false depending on whether the XSQL processer is being processed by a web server and it has a valid adapter. |
Example
To obtain an attribute of the request, first it must be created. Two name attribute of id and name are created with the values 3 and 'This is my name' respectively. To check the function, it is asked to show the name attribute on the screen.
Copy
<xsql-script name='http_connection_getAttr'> <body> <http.request.setAttribute name='id'> 3 </http.request.setAttribute> <http.request.setAttribute name='name'> This is my name </http.request.setAttribute> <println> <http.request.getAttribute name='name'/> </println> </body> </xsql-script>