META-INF.ajax.tld Maven / Gradle / Ivy
Tagria ajax library
Tagria ajax
1.0
ajax
http://tagrialib.jslsolucoes.com/tags/ajax
Renders an ajax function
Ajax
function
com.jslsolucoes.tagria.lib.tag.ajax.FunctionTag
scriptless
Indicates the type of return expected by ajax request. Default: json. Options: xml, json, script, html, jsonp, text
dataType
true
java.lang.String
It indicates whether the ajax function should be run to load the DOM. Default: false.
executeOnDocumentLoad
true
java.lang.Boolean
It indicates the name of the ajax function
name
true
true
java.lang.String
Indicates the url to be called by the Ajax request
url
true
true
java.lang.String
It indicates whether the component should be rendered. Default : true
rendered
true
java.lang.Boolean
<html:input name="input1" value="Valor 0"/>
<html:jsEvent attachTo="input1" event="blur">
dados();
</html:jsEvent>
<ajax:function name="dados" url="/app/ajax">
<ajax:parameters>
<ajax:parameter name="input1" src="input1" type="val" />
</ajax:parameters>
<ajax:onSuccess>
/*Nesse trecho está disponivel as variaveis javascript ( Anything data, String textStatus, jqXHR jqXHR )*/
alert('O valor enviado foi' + data.field);
</ajax:onSuccess>
<ajax:onError>
</ajax:onError>
</ajax:function>
Renders writing in a particular component
Ajax
target
com.jslsolucoes.tagria.lib.tag.ajax.TargetTag
scriptless
Indicates which attribute of the object must be used
data
true
true
java.lang.String
It indicates the type of iteration being used. Options: val, html
type
true
true
java.lang.String
Indicates the component name to be achieved
target
true
true
java.lang.String
<html:input name="input1" value="Valor 0"/>
<html:input name="input2" disabled="true"/>
<html:jsEvent attachTo="input1" event="blur">
dados();
</html:jsEvent>
<ajax:function name="dados" url="/app/ajax">
<ajax:parameters>
<ajax:parameter name="input1" src="input1" type="val" />
</ajax:parameters>
<ajax:onSuccess>
<ajax:target type="val" data="field" target="input2"/>
</ajax:onSuccess>
<ajax:onError>
</ajax:onError>
</ajax:function>
Renders the error block if they occur in ajax request
Ajax
onError
com.jslsolucoes.tagria.lib.tag.ajax.OnErrorTag
scriptless
<ajax:function name="dados" url="/app/url/nao/existe" executeOnDocumentLoad="true">
<ajax:onSuccess>
</ajax:onSuccess>
<ajax:onError>
/*Nesse trecho está disponivel as variaveis javascript ( jqXHR jqXHR, String textStatus, String errorThrown )*/
alert(textStatus);
alert(errorThrown);
alert(jqXHR);
</ajax:onError>
</ajax:function>
Renders success block if the ajax request run smoothly
Ajax
onSuccess
com.jslsolucoes.tagria.lib.tag.ajax.OnSuccessTag
scriptless
<html:input name="input1" value="Valor 0"/>
<ajax:function name="dados" url="/app/ajax" executeOnDocumentLoad="true">
<ajax:parameters>
<ajax:parameter name="input1" src="input1" type="val" />
</ajax:parameters>
<ajax:onSuccess>
/*Nesse trecho está disponivel as variaveis javascript ( Object data, String textStatus, jqXHR jqXHR )*/
alert(textStatus);
alert(data);
alert(jqXHR);
</ajax:onSuccess>
<ajax:onError>
</ajax:onError>
</ajax:function>
Renders the parameter block to be sent by ajax request
Ajax
parameters
com.jslsolucoes.tagria.lib.tag.ajax.ParametersTag
scriptless
<html:input name="input1" value="Valor 0"/>
<ajax:function name="dados" url="/app/ajax" executeOnDocumentLoad="true">
<ajax:parameters>
<ajax:parameter name="input1" src="input1" type="val" />
</ajax:parameters>
<ajax:onSuccess>
/*Nesse trecho está disponivel as variaveis javascript ( Object data, String textStatus, jqXHR jqXHR )*/
</ajax:onSuccess>
<ajax:onError>
</ajax:onError>
</ajax:function>
Renders a parameter that must be sent by ajax request
Ajax
parameter
com.jslsolucoes.tagria.lib.tag.ajax.ParameterTag
scriptless
Indicates the component of the name to be used as the source
src
true
true
java.lang.String
It indicates the type of iteration being used. Options: val, html
type
true
true
java.lang.Boolean
It indicates the name of the uploaded parameter
name
true
true
java.lang.String
It indicates if the value is optional preeenchimento occur to the function call. Default: false.
required
true
java.lang.Boolean
<html:input name="input1" value="Valor 0"/>
<html:input name="input2" value="" />
<html:jsEvent attachTo="input1" event="blur">
dados();
</html:jsEvent>
<ajax:function name="dados" url="/app/ajax">
<ajax:parameters>
<ajax:parameter name="input1" src="input1" type="val" />
<ajax:parameter name="input2" src="input2" type="val" required="false" />
</ajax:parameters>
<ajax:onSuccess>
alert('Executada');
</ajax:onSuccess>
<ajax:onError>
</ajax:onError>
</ajax:function>
Renders a mapping of an options list to select a component
Ajax
mapOptions
com.jslsolucoes.tagria.lib.tag.ajax.MapOptionsTag
scriptless
Indicates the component name to be achieved
target
true
true
java.lang.String
It indicates the contents of the option to be displayed
text
true
true
java.lang.Boolean
Indicates the value of the option to be filled
value
true
true
java.lang.String
<html:select name="input2">
<html:option value="">- - -</html:option>
</html:select>
<ajax:function name="dados" url="/app/ajax/list" executeOnDocumentLoad="true">
<ajax:onSuccess>
<ajax:mapOptions target="input2" value="id" text="nome" />
</ajax:onSuccess>
<ajax:onError>
</ajax:onError>
</ajax:function>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy