Software Development

Saturday, February 14, 2009

When using FCKEditor plugin with Grails (http://grails.org/FCKeditor+plugin), need to use .decodeHTML() for the value that you want to display as in the edit.gsp and show.gsp, else it will be shown as HTML-safe codes which is not what you want.

edit.gsp

<fckeditor:editor
name="description"
width="100%"
height="400"
toolbar="Standard"
fileBrowser="default">
${fieldValue(bean:eventInstance, field:'description').decodeHTML()}
</fckeditor:editor>

show.gsp


${fieldValue(bean:eventInstance, field:'description').decodeHTML()}

create.gsp

<fckeditor:editor
name="description"
width="100%"
height="400"
toolbar="Standard"
fileBrowser="default">
${fieldValue(bean:eventInstance, field:'description')}
</fckeditor:editor>

Sunday, February 08, 2009

Hibernate mapping for all-delete-orphan.

Batch contains Students.
When using all-delete-orphan, there was an error when a Student changes batch.



-delete-orphan" sort="unsorted" inverse="true">