
|
If you were logged in you would be able to see more operations.
|
|
|
Grails
Created: 21/May/08 09:31 PM
Updated: 21/May/08 09:31 PM
|
|
| Component/s: |
TagLib
|
| Affects Version/s: |
1.0.2
|
| Fix Version/s: |
None
|
|
|
Environment:
|
Firefox 3.0 RC1 on Mac OS 10.5
|
|
Passing the sort parameter to a list in a gsp select tag does not work if the value is wrapped in double quotes. For example, the following code results in no values being displayed in the dropdown other than the noSelection value.
<td valign="top" class="value ${hasErrors(bean: track, field: 'year', 'errors')}">
<g:select optionKey="id" from="${Year.list(sort:'releaseYear')}" name="year.id" value="${track?.year?.id}" noSelection="${['null':'Select One...']}"></g:select>
</td>
The following code works as expected. Please note, the only difference is that sort:'releaseYear' is now surrounded with single quotes as opposed to double. It's my understanding that double quotes should also be supported:
<td valign="top" class="value ${hasErrors(bean: track, field: 'year', 'errors')}">
<g:select optionKey="id" from="${Year.list(sort:'releaseYear')}" name="year.id" value="${track?.year?.id}" noSelection="${['null':'Select One...']}"></g:select>
</td>
|
|
Description
|
Passing the sort parameter to a list in a gsp select tag does not work if the value is wrapped in double quotes. For example, the following code results in no values being displayed in the dropdown other than the noSelection value.
<td valign="top" class="value ${hasErrors(bean: track, field: 'year', 'errors')}">
<g:select optionKey="id" from="${Year.list(sort:'releaseYear')}" name="year.id" value="${track?.year?.id}" noSelection="${['null':'Select One...']}"></g:select>
</td>
The following code works as expected. Please note, the only difference is that sort:'releaseYear' is now surrounded with single quotes as opposed to double. It's my understanding that double quotes should also be supported:
<td valign="top" class="value ${hasErrors(bean: track, field: 'year', 'errors')}">
<g:select optionKey="id" from="${Year.list(sort:'releaseYear')}" name="year.id" value="${track?.year?.id}" noSelection="${['null':'Select One...']}"></g:select>
</td> |
Show » |
| There are no comments yet on this issue.
|
|