Skip to content

Commit 62eb6cb

Browse files
author
Keith Donald
committed
Spring eval docs
1 parent 9c35130 commit 62eb6cb

File tree

2 files changed

+226
-2
lines changed

2 files changed

+226
-2
lines changed

org.springframework.web.servlet/src/main/resources/META-INF/spring.tld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@
379379
<rtexprvalue>true</rtexprvalue>
380380
</attribute>
381381
<attribute>
382-
<description>Set HTML escaping for this tag, as boolean value. Overrides the
382+
<description>Set HTML escaping for this tag, as a boolean value. Overrides the
383383
default HTML escaping setting for the current page.</description>
384384
<name>htmlEscape</name>
385385
<required>false</required>

spring-framework-reference/src/spring.tld.xml

Lines changed: 225 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
<listitem>
4040
<xref linkend="spring.tld.transform"/>
4141
</listitem>
42+
<listitem>
43+
<xref linkend="spring.tld.url"/>
44+
</listitem>
45+
<listitem>
46+
<xref linkend="spring.tld.eval"/>
47+
</listitem>
4248
</itemizedlist>
4349
<section id="spring.tld.bind">
4450
<title>The <literal>bind</literal> tag</title>
@@ -737,4 +743,222 @@
737743
</tgroup>
738744
</table>
739745
</section>
740-
</appendix>
746+
<section id="spring.tld.url">
747+
<title>The <literal>url</literal> tag</title>
748+
<para>
749+
Creates URLs with support for URI template variables, HTML/XML escaping, and Javascript escaping.
750+
Modeled after the JSTL c:url tag with backwards compatibility in mind.
751+
</para>
752+
<table id="spring.tld.url.table">
753+
<title>Attributes</title>
754+
<tgroup cols="3">
755+
<colspec align="center" colname="Attribute"/>
756+
<colspec align="center" colname="Required"/>
757+
<colspec align="center" colname="Runtime.Expression"/>
758+
<colspec align="left" colname="Description"/>
759+
<thead>
760+
<row>
761+
<entry align="center">Attribute</entry>
762+
<entry align="center">Required?</entry>
763+
<entry align="center">Runtime Expression?</entry>
764+
<entry align="left">Description</entry>
765+
</row>
766+
</thead>
767+
<tbody>
768+
<row>
769+
<entry>
770+
<para>url</para>
771+
</entry>
772+
<entry>
773+
<para>true</para>
774+
</entry>
775+
<entry>
776+
<para>true</para>
777+
</entry>
778+
<entry>
779+
<para>The URL to build. This value can include template {placeholders}
780+
that are replaced with the URL encoded value of the named parameter. Parameters
781+
must be defined using the param tag inside the body of this tag.</para>
782+
</entry>
783+
</row>
784+
<row>
785+
<entry>
786+
<para>context</para>
787+
</entry>
788+
<entry>
789+
<para>false</para>
790+
</entry>
791+
<entry>
792+
<para>true</para>
793+
</entry>
794+
<entry>
795+
<para>Specifies a remote application context path. The default is the
796+
current application context path.</para>
797+
</entry>
798+
</row>
799+
<row>
800+
<entry>
801+
<para>var</para>
802+
</entry>
803+
<entry>
804+
<para>false</para>
805+
</entry>
806+
<entry>
807+
<para>true</para>
808+
</entry>
809+
<entry>
810+
<para>The name of the variable to export the URL value to.
811+
If not specified the URL is written as output.</para>
812+
</entry>
813+
</row>
814+
<row>
815+
<entry>
816+
<para>scope</para>
817+
</entry>
818+
<entry>
819+
<para>false</para>
820+
</entry>
821+
<entry>
822+
<para>true</para>
823+
</entry>
824+
<entry>
825+
<para>The scope for the var. 'application', 'session', 'request' and
826+
'page' scopes are supported. Defaults to page scope. This attribute has no
827+
effect unless the var attribute is also defined.</para>
828+
</entry>
829+
</row>
830+
<row>
831+
<entry>
832+
<para>htmlEncoding</para>
833+
</entry>
834+
<entry>
835+
<para>false</para>
836+
</entry>
837+
<entry>
838+
<para>true</para>
839+
</entry>
840+
<entry>
841+
<para>Set HTML escaping for this tag, as a boolean value. Overrides the
842+
default HTML escaping setting for the current page.</para>
843+
</entry>
844+
</row>
845+
<row>
846+
<entry>
847+
<para>javascriptEncoding</para>
848+
</entry>
849+
<entry>
850+
<para>false</para>
851+
</entry>
852+
<entry>
853+
<para>true</para>
854+
</entry>
855+
<entry>
856+
<para>Set JavaScript escaping for this tag, as boolean value.
857+
Default is false.</para>
858+
</entry>
859+
</row>
860+
</tbody>
861+
</tgroup>
862+
</table>
863+
</section>
864+
<section id="spring.tld.eval">
865+
<title>The <literal>eval</literal> tag</title>
866+
<para>
867+
Evaluates a Spring expression (SpEL) and either prints the result or assigns it to a variable.
868+
</para>
869+
<table id="spring.tld.eval.table">
870+
<title>Attributes</title>
871+
<tgroup cols="3">
872+
<colspec align="center" colname="Attribute"/>
873+
<colspec align="center" colname="Required"/>
874+
<colspec align="center" colname="Runtime.Expression"/>
875+
<colspec align="left" colname="Description"/>
876+
<thead>
877+
<row>
878+
<entry align="center">Attribute</entry>
879+
<entry align="center">Required?</entry>
880+
<entry align="center">Runtime Expression?</entry>
881+
<entry align="left">Description</entry>
882+
</row>
883+
</thead>
884+
<tbody>
885+
<row>
886+
<entry>
887+
<para>expression</para>
888+
</entry>
889+
<entry>
890+
<para>true</para>
891+
</entry>
892+
<entry>
893+
<para>true</para>
894+
</entry>
895+
<entry>
896+
<para>The expression to evaluate.</para>
897+
</entry>
898+
</row>
899+
<row>
900+
<entry>
901+
<para>var</para>
902+
</entry>
903+
<entry>
904+
<para>false</para>
905+
</entry>
906+
<entry>
907+
<para>true</para>
908+
</entry>
909+
<entry>
910+
<para>The name of the variable to export the evaluation result to.
911+
If not specified the evaluation result is converted to a String and written as output.</para>
912+
</entry>
913+
</row>
914+
<row>
915+
<entry>
916+
<para>scope</para>
917+
</entry>
918+
<entry>
919+
<para>false</para>
920+
</entry>
921+
<entry>
922+
<para>true</para>
923+
</entry>
924+
<entry>
925+
<para>The scope for the var. 'application', 'session', 'request' and
926+
'page' scopes are supported. Defaults to page scope. This attribute has no
927+
effect unless the var attribute is also defined.</para>
928+
</entry>
929+
</row>
930+
<row>
931+
<entry>
932+
<para>htmlEncoding</para>
933+
</entry>
934+
<entry>
935+
<para>false</para>
936+
</entry>
937+
<entry>
938+
<para>true</para>
939+
</entry>
940+
<entry>
941+
<para>Set HTML escaping for this tag, as a boolean value. Overrides the
942+
default HTML escaping setting for the current page.</para>
943+
</entry>
944+
</row>
945+
<row>
946+
<entry>
947+
<para>javascriptEncoding</para>
948+
</entry>
949+
<entry>
950+
<para>false</para>
951+
</entry>
952+
<entry>
953+
<para>true</para>
954+
</entry>
955+
<entry>
956+
<para>Set JavaScript escaping for this tag, as boolean value.
957+
Default is false.</para>
958+
</entry>
959+
</row>
960+
</tbody>
961+
</tgroup>
962+
</table>
963+
</section>
964+
</appendix>

0 commit comments

Comments
 (0)