Skip to content

Commit 5601a5c

Browse files
committed
GRAILS-6598 fixed javadoc, added line breaks and escaped < and >
1 parent 0921e64 commit 5601a5c

File tree

9 files changed

+123
-122
lines changed

9 files changed

+123
-122
lines changed

src/java/org/codehaus/groovy/grails/plugins/web/taglib/ApplicationTagLib.groovy

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class ApplicationTagLib implements ApplicationContextAware, InitializingBean {
104104
}
105105

106106
/**
107-
* Get the declared URL of the server from config, or guess at localhost for non-production
107+
* Get the declared URL of the server from config, or guess at localhost for non-production.
108108
*/
109109
String makeServerURL() {
110110
def u = ConfigurationHolder.config?.grails?.serverURL
@@ -118,7 +118,7 @@ class ApplicationTagLib implements ApplicationContextAware, InitializingBean {
118118
}
119119

120120
/**
121-
* Check for "absolute" attribute and render server URL if available from Config or deducible in non-production
121+
* Check for "absolute" attribute and render server URL if available from Config or deducible in non-production.
122122
*/
123123
private handleAbsolute(attrs) {
124124
def base = attrs.remove('base')
@@ -140,25 +140,25 @@ class ApplicationTagLib implements ApplicationContextAware, InitializingBean {
140140
}
141141

142142
/**
143-
* Creates a link to a resource, generally used as a method rather than a tag.
143+
* Creates a link to a resource, generally used as a method rather than a tag.<br/>
144144
*
145-
* eg. <link type="text/css" href="${createLinkTo(dir:'css',file:'main.css')}" />
145+
* eg. &lt;link type="text/css" href="${createLinkTo(dir:'css',file:'main.css')}" /&gt;
146146
*/
147147
def createLinkTo = { attrs ->
148148
GrailsUtil.deprecated "Tag [createLinkTo] is deprecated please use [resource] instead"
149149
out << resource(attrs)
150150
}
151151

152152
/**
153-
* Creates a link to a resource, generally used as a method rather than a tag.
153+
* Creates a link to a resource, generally used as a method rather than a tag.<br/>
154154
*
155-
* eg. <link type="text/css" href="${resource(dir:'css',file:'main.css')}" />
155+
* eg. &lt;link type="text/css" href="${resource(dir:'css',file:'main.css')}" /&gt;
156156
*
157157
* @attr base Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.x≈
158158
* @attr contextPath the context path to use (relative to the application context path). Defaults to "" or path to the plugin for a plugin view or template.
159159
* @attr dir the name of the directory within the grails app to link to
160160
* @attr file the name of the file within the grails app to link to
161-
* @attr absolute If set to "true" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:<port> if no value in Config and not running in production.
161+
* @attr absolute If set to "true" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.
162162
* @attr plugin The plugin to look for the resource in
163163
*/
164164
def resource = { attrs ->
@@ -195,17 +195,17 @@ class ApplicationTagLib implements ApplicationContextAware, InitializingBean {
195195
}
196196

197197
/**
198-
* General linking to controllers, actions etc. Examples:
198+
* General linking to controllers, actions etc. Examples:<br/>
199199
*
200-
* <g:link action="myaction">link 1</gr:link>
201-
* <g:link controller="myctrl" action="myaction">link 2</gr:link>
200+
* &lt;g:link action="myaction"&gt;link 1&lt;/gr:link&gt;<br/>
201+
* &lt;g:link controller="myctrl" action="myaction"&gt;link 2&lt;/gr:link&gt;<br/>
202202
*
203203
* @attr controller The name of the controller to use in the link, if not specified the current controller will be linked
204204
* @attr action The name of the action to use in the link, if not specified the default action will be linked
205205
* @attr uri relative URI
206206
* @attr url A map containing the action,controller,id etc.
207207
* @attr base Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.
208-
* @attr absolute If set to "true" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:<port> if no value in Config and not running in production.
208+
* @attr absolute If set to "true" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.
209209
* @attr id The id to use in the link
210210
* @attr fragment The link fragment (often called anchor tag) to use
211211
* @attr params A map containing URL query parameters
@@ -249,16 +249,16 @@ class ApplicationTagLib implements ApplicationContextAware, InitializingBean {
249249
/**
250250
* Creates a grails application link from a set of attributes. This
251251
* link can then be included in links, ajax calls etc. Generally used as a method call
252-
* rather than a tag eg.
252+
* rather than a tag eg.<br/>
253253
*
254-
* <a href="${createLink(action:'list')}">List</a>
254+
* &lt;a href="${createLink(action:'list')}"&gt;List&lt;/a&gt;
255255
*
256256
* @attr controller The name of the controller to use in the link, if not specified the current controller will be linked
257257
* @attr action The name of the action to use in the link, if not specified the default action will be linked
258258
* @attr uri relative URI
259259
* @attr url A map containing the action,controller,id etc.
260260
* @attr base Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.
261-
* @attr absolute If set to "true" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:<port> if no value in Config and not running in production.
261+
* @attr absolute If set to "true" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.
262262
* @attr id The id to use in the link
263263
* @attr fragment The link fragment (often called anchor tag) to use
264264
* @attr params A map containing URL query parameters
@@ -336,12 +336,12 @@ class ApplicationTagLib implements ApplicationContextAware, InitializingBean {
336336
}
337337

338338
/**
339-
* Helper method for creating tags called like:
340-
*
341-
* withTag(name:'script',attrs:[type:'text/javascript']) {
342-
*
343-
* }
344-
*
339+
* Helper method for creating tags called like:<br/>
340+
* <pre>
341+
* withTag(name:'script',attrs:[type:'text/javascript']) {
342+
* ...
343+
* }
344+
* </pre>
345345
* @attr name REQUIRED the tag name
346346
* @attr attrs tag attributes
347347
*/

src/java/org/codehaus/groovy/grails/plugins/web/taglib/CountryTagLib.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class CountryTagLib {
287287
* @attr id the DOM element id - uses the name attribute if not specified
288288
* @attr keys A list of values to be used for the value attribute of each "option" element.
289289
* @attr optionKey By default value attribute of each <option> element will be the result of a "toString()" call on each element. Setting this allows the value to be a bean property of each element in the list.
290-
* @attr optionValue By default the body of each <option> element will be the result of a "toString()" call on each element in the "from" attribute list. Setting this allows the value to be a bean property of each element in the list.
290+
* @attr optionValue By default the body of each &lt;option&gt; element will be the result of a "toString()" call on each element in the "from" attribute list. Setting this allows the value to be a bean property of each element in the list.
291291
* @attr multiple boolean value indicating whether the select a multi-select (automatically true if the value is a collection, defaults to false - single-select)
292292
* @attr noSelection A single-entry map detailing the key and value to use for the "no selection made" choice in the select box. If there is no current selection this will be shown as it is first in the list, and if submitted with this selected, the key that you provide will be submitted. Typically this will be blank - but you can also use 'null' in the case that you're passing the ID of an object
293293
* @attr disabled boolean value indicating whether the select is disabled or enabled (defaults to false - enabled)
@@ -306,7 +306,7 @@ class CountryTagLib {
306306
}
307307

308308
/**
309-
* Take a country code and output the country name, from the internal data
309+
* Take a country code and output the country name, from the internal data.<br/>
310310
* Note: to use message bundle to resolve name, use g:message tag
311311
* @attr code REQUIRED the ISO3166_3 country code
312312
*/

src/java/org/codehaus/groovy/grails/plugins/web/taglib/FormTagLib.groovy

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class FormTagLib {
173173
}
174174

175175
/**
176-
* A general tag for creating textareas
176+
* A general tag for creating textareas.
177177
*
178178
* @attr name REQUIRED the name of the textarea
179179
* @attr value the text of the textarea; if not specified renders the body as the text
@@ -223,7 +223,7 @@ class FormTagLib {
223223
}
224224

225225
/**
226-
* Dump out attributes in HTML compliant fashion
226+
* Dump out attributes in HTML compliant fashion.
227227
*/
228228
void outputAttributes(attrs) {
229229
attrs.remove('tagName') // Just in case one is left
@@ -234,7 +234,7 @@ class FormTagLib {
234234
}
235235

236236
/**
237-
* Same as <g:form>, except sets the relevant enctype for a file upload form.
237+
* Same as &lt;g:form&gt;, except sets the relevant enctype for a file upload form.
238238
*
239239
* @attr action the name of the action to use in the link, if not specified the default action will be linked
240240
* @attr controller the name of the controller to use in the link, if not specified the current controller will be linked
@@ -250,10 +250,10 @@ class FormTagLib {
250250
}
251251

252252
/**
253-
* General linking to controllers, actions etc. Examples:
253+
* General linking to controllers, actions etc. Examples:<br/>
254254
*
255-
* <g:form action="myaction">...</gr:form>
256-
* <g:form controller="myctrl" action="myaction">...</gr:form>
255+
* &lt;g:form action="myaction"&gt;...&lt;/gr:form&gt;<br/>
256+
* &lt;g:form controller="myctrl" action="myaction"&gt;...&lt;/gr:form&gt;<br/>
257257
*
258258
* @attr action the name of the action to use in the link, if not specified the default action will be linked
259259
* @attr controller the name of the controller to use in the link, if not specified the current controller will be linked
@@ -313,13 +313,13 @@ class FormTagLib {
313313
}
314314

315315
/**
316-
* Creates a submit button that submits to an action in the controller specified by the form action
316+
* Creates a submit button that submits to an action in the controller specified by the form action.<br/>
317317
* The name of the action attribute is translated into the action name, for example "Edit" becomes
318-
* "_action_edit" or "List People" becomes "_action_listPeople"
319-
* If the action attribute is not specified, the value attribute will be used as part of the action name
318+
* "_action_edit" or "List People" becomes "_action_listPeople".<br/>
319+
* If the action attribute is not specified, the value attribute will be used as part of the action name.
320320
*
321-
* <g:actionSubmit value="Edit" />
322-
* <g:actionSubmit action="Edit" value="Some label for editing" />
321+
* &lt;g:actionSubmit value="Edit" /&gt;<br/>
322+
* &lt;g:actionSubmit action="Edit" value="Some label for editing" /&gt;<br/>
323323
*
324324
* @attr value REQUIRED The title of the button and name of action when not explicitly defined.
325325
* @attr action The name of the action to be executed, otherwise it is derived from the value.
@@ -345,12 +345,12 @@ class FormTagLib {
345345
}
346346

347347
/**
348-
* Creates a an image submit button that submits to an action in the controller specified by the form action
348+
* Creates a an image submit button that submits to an action in the controller specified by the form action.
349349
* The name of the action attribute is translated into the action name, for example "Edit" becomes
350-
* "_action_edit" or "List People" becomes "_action_listPeople"
351-
* If the action attribute is not specified, the value attribute will be used as part of the action name
350+
* "_action_edit" or "List People" becomes "_action_listPeople".<br/>
351+
* If the action attribute is not specified, the value attribute will be used as part of the action name.<br/>
352352
*
353-
* <g:actionSubmitImage src="/images/submitButton.gif" action="Edit" />
353+
* &lt;g:actionSubmitImage src="/images/submitButton.gif" action="Edit" /&gt;
354354
*
355355
* @attr value REQUIRED The title of the button and name of action when not explicitly defined.
356356
* @attr action The name of the action to be executed, otherwise it is derived from the value.
@@ -383,9 +383,9 @@ class FormTagLib {
383383
}
384384

385385
/**
386-
* A simple date picker that renders a date as selects
387-
* eg. <g:datePicker name="myDate" value="${new Date()}" />
388-
*
386+
* A simple date picker that renders a date as selects.<br/>
387+
* e.g. &lt;g:datePicker name="myDate" value="${new Date()}" /&gt;
388+
*
389389
* @attr name REQUIRED The name of the date picker field set
390390
* @attr value The current value of the date picker; defaults to now if not specified
391391
* @attr precision The desired granularity of the date to be rendered
@@ -572,8 +572,8 @@ class FormTagLib {
572572
}
573573

574574
/**
575-
* A helper tag for creating TimeZone selects
576-
* eg. <g:timeZoneSelect name="myTimeZone" value="${tz}" />
575+
* A helper tag for creating TimeZone selects.<br/>
576+
* eg. &lt;g:timeZoneSelect name="myTimeZone" value="${tz}" /&gt;
577577
*
578578
* @attr name REQUIRED The name of the select
579579
* @attr value An instance of java.util.TimeZone. Defaults to the time zone for the current Locale if not specified
@@ -601,9 +601,9 @@ class FormTagLib {
601601
}
602602

603603
/**
604-
* A helper tag for creating locale selects
604+
* A helper tag for creating locale selects.<br/>
605605
*
606-
* eg. <g:localeSelect name="myLocale" value="${locale}" />
606+
* eg. &lt;g:localeSelect name="myLocale" value="${locale}" /&gt;
607607
*
608608
* @attr name REQUIRED The name of the select
609609
* @attr value The set locale, defaults to the current request locale if not specified
@@ -621,9 +621,10 @@ class FormTagLib {
621621
}
622622

623623
/**
624-
* A helper tag for creating currency selects
624+
* A helper tag for creating currency selects.<br/>
625+
*
626+
* eg. &lt;g:currencySelect name="myCurrency" value="${currency}" /&gt;
625627
*
626-
* eg. <g:currencySelect name="myCurrency" value="${currency}" />
627628
* @attr from The currency symbols to select from, defaults to the major ones if not specified
628629
* @attr value The currency value as the currency code. Defaults to the currency for the current Locale if not specified
629630
*/
@@ -643,18 +644,18 @@ class FormTagLib {
643644
}
644645

645646
/**
646-
* A helper tag for creating HTML selects.
647+
* A helper tag for creating HTML selects.<br/>
647648
*
648-
* Examples:
649-
* <g:select name="user.age" from="${18..65}" value="${age}" />
650-
* <g:select name="user.company.id" from="${Company.list()}" value="${user?.company.id}" optionKey="id" />
649+
* Examples:<br/>
650+
* &lt;g:select name="user.age" from="${18..65}" value="${age}" /&gt;<br/>
651+
* &lt;g:select name="user.company.id" from="${Company.list()}" value="${user?.company.id}" optionKey="id" /&gt;<br/>
651652
*
652653
* @attr name the select name
653654
* @attr id the DOM element id - uses the name attribute if not specified
654655
* @attr from The list or range to select from
655656
* @attr keys A list of values to be used for the value attribute of each "option" element.
656-
* @attr optionKey By default value attribute of each <option> element will be the result of a "toString()" call on each element. Setting this allows the value to be a bean property of each element in the list.
657-
* @attr optionValue By default the body of each <option> element will be the result of a "toString()" call on each element in the "from" attribute list. Setting this allows the value to be a bean property of each element in the list.
657+
* @attr optionKey By default value attribute of each &lt;option&gt; element will be the result of a "toString()" call on each element. Setting this allows the value to be a bean property of each element in the list.
658+
* @attr optionValue By default the body of each &lt;option&gt; element will be the result of a "toString()" call on each element in the "from" attribute list. Setting this allows the value to be a bean property of each element in the list.
658659
* @attr value The current selected value that evaluates equals() to true for one of the elements in the from list.
659660
* @attr multiple boolean value indicating whether the select a multi-select (automatically true if the value is a collection, defaults to false - single-select)
660661
* @attr valueMessagePrefix By default the value "option" element will be the result of a "toString()" call on each element in the "from" attribute list. Setting this allows the value to be resolved from the I18n messages. The valueMessagePrefix will be suffixed with a dot ('.') and then the value attribute of the option to resolve the message. If the message could not be resolved, the value is presented.
@@ -829,7 +830,7 @@ class FormTagLib {
829830
}
830831

831832
/**
832-
* A helper tag for creating radio button groups
833+
* A helper tag for creating radio button groups.
833834
*
834835
* @attr name REQUIRED The name of the group
835836
* @attr values REQUIRED The list values for the radio buttons

src/java/org/codehaus/groovy/grails/plugins/web/taglib/FormatTagLib.groovy

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import org.springframework.web.servlet.support.RequestContextUtils as RCU
2929

3030
/**
3131
* The base application tag library for Grails many of which take inspiration from Rails helpers (thanks guys! :)
32-
* This tag library tends to get extended by others as tags within here can be re-used in said libraries
32+
* This tag library tends to get extended by others as tags within here can be re-used in said libraries.
3333
*
3434
* @author Jason Rudolph
3535
* @author Lari Hotari
@@ -64,12 +64,12 @@ class FormatTagLib {
6464
/**
6565
* Outputs the given boolean as the specified text label. If the
6666
* <code>true</code> and <code>false</code> option are not given,
67-
* then the boolean is output using the default label.
67+
* then the boolean is output using the default label.<br/>
6868
*
69-
* Examples:
69+
* Examples:<br/>
7070
*
71-
* <g:formatBoolean boolean="${myBoolean}" />
72-
* <g:formatBoolean boolean="${myBoolean}" true="True!" false="False!" />
71+
* &lt;g:formatBoolean boolean="${myBoolean}" /&gt;<br/>
72+
* &lt;g:formatBoolean boolean="${myBoolean}" true="True!" false="False!" /&gt;<br/>
7373
*
7474
* @attr boolean REQUIRED the boolean to output
7575
* @attr true text label for boolean true value
@@ -99,12 +99,12 @@ class FormatTagLib {
9999
}
100100

101101
/**
102-
* Outputs the given <code>Date</code> object in the specified format. If
102+
* Outputs the given <code>Date</code> object in the specified format. If
103103
* the <code>date</code> is not given, then the current date/time is used.
104104
* If the <code>format</code> option is not given, then the date is output
105-
* using the default format.
105+
* using the default format.<br/>
106106
*
107-
* e.g., <g:formatDate date="${myDate}" format="yyyy-MM-dd HH:mm" />
107+
* e.g., &lt;g:formatDate date="${myDate}" format="yyyy-MM-dd HH:mm" /&gt;<br/>
108108
*
109109
* @see java.text.SimpleDateFormat
110110
*
@@ -197,9 +197,9 @@ class FormatTagLib {
197197
/**
198198
* Outputs the given number in the specified format. If the
199199
* <code>format</code> option is not given, then the number is output
200-
* using the default format.
200+
* using the default format.<br/>
201201
*
202-
* e.g., <g:formatNumber number="${myNumber}" format="###,##0" />
202+
* e.g., &lt;g:formatNumber number="${myNumber}" format="###,##0" /&gt;
203203
*
204204
* @see java.text.DecimalFormat
205205
*

0 commit comments

Comments
 (0)