@grails.compiler.GrailsCompileStatic final class TaackUiSimpleService extends java.lang.Object implements grails.web.api.WebAttributes, grails.artefact.controller.support.ResponseRenderer, grails.web.databinding.DataBinder
Service responsible for rendering a web page or producing ajax parts of a web page.
taackUiSimpleService.show(new UiBlockSpecifier() {
modal {
ajaxBlock "showUser", {
show "${u.username
", crewUiService.buildUserShow(u), BlockSpec.Width.MAX
}
}
})}
Type | Name and description |
---|---|
org.grails.core.io.ResourceLocator |
assetResourceLocator |
grails.gsp.PageRenderer |
g |
org.springframework.context.MessageSource |
messageSource |
TaackPdfConverterFromHtmlService |
taackPdfConverterFromHtmlService |
TaackUiConfiguration |
taackUiPluginConfiguration |
Constructor and description |
---|
TaackUiSimpleService
() |
Type Params | Return Type | Name and description |
---|---|---|
<T extends GormEntity> |
final T |
ajaxBind(java.lang.Class<T> aClass) Retrieve hidden field passed with UiFilterSpecifier#ui(java.lang.Class, groovy.lang.Closure, taack.ast.type.FieldInfo[]). |
|
final void |
ajaxReload() Allow to reload the current page |
|
final void |
cleanForm() Clear all params elements not mandatory |
|
final java.lang.Object |
closeModal(java.lang.Long id, java.lang.String text) Shortcut method that call the show(UiBlockSpecifier) underneath. |
|
final java.lang.Object |
downloadCsv(UiTableSpecifier tableSpecifier, java.lang.String fileNamePrefix) Allow to upload a CSV version of a table to the client browser |
|
final java.lang.Object |
downloadPdf(UiPrintableSpecifier printableSpecifier, java.lang.String fileName, java.lang.Boolean isHtml, java.lang.String brutHtml) Allow to upload the PDF to the client browser |
|
final java.lang.String |
dumpAsset(java.lang.String assetName) Dump a Grails asset, typically an SVG file, in a text. |
|
final byte[] |
dumpAssetBin(java.lang.String assetName) Dump a binary Grails asset, typically an image. |
|
final java.lang.String |
dumpMailHtml(UiBlockSpecifier blockSpecifier, java.util.Locale locale) Dump a block in Mail HTML version. |
|
final boolean |
isProcessingForm() Return true if the action is called from a form |
|
final java.lang.Object |
show(UiBlockSpecifier block, UiMenuSpecifier menu) Render the block to the browser. |
|
final java.lang.Object |
show(UiFormSpecifier formSpecifier, java.lang.String i18n, UiMenuSpecifier menu) Shortcut method that call the show(UiBlockSpecifier) underneath. |
|
final java.lang.Object |
show(UiTableSpecifier tableSpecifier, java.lang.String i18nTable, UiFilterSpecifier filterSpecifier, java.lang.String i18nTableFilter, UiMenuSpecifier menuSpecifier) Shortcut method that call the show(UiBlockSpecifier) underneath. |
|
final java.lang.Object |
showModal(UiFormSpecifier formSpecifier, java.lang.String i18n) Build a modal from a form and shows it. |
|
final java.lang.Object |
showModal(UiTableSpecifier tableSpecifier, java.lang.String i18nTable, UiFilterSpecifier filterSpecifier, java.lang.String i18nTableFilter) Build a modal from a table and a filter and shows it. |
|
final java.lang.Long |
showOptions(java.lang.String i18n, java.util.List<java.lang.String> options, boolean isAjax) Helper displaying a dialog allowing to confirm before processing the action. |
|
final java.lang.String |
streamPdf(UiPrintableSpecifier printableSpecifier, java.io.OutputStream outputStream, java.util.Locale locale) Allow to get the HTML version of the PDF, also, render the PDF in the outputStream parameter. |
|
java.lang.String |
tr(java.lang.String code, java.util.Locale locale, java.lang.Object[] args) |
|
java.lang.String |
visit(UiBlockSpecifier blockSpecifier, boolean isAjaxRendering) Allows to retrieve the content of a block without rendering it. |
|
static java.lang.String |
visitMenu(UiMenuSpecifier menuSpecifier) Allows to retrieve the content of a menu without rendering it. |
|
static java.lang.String |
visitTable(UiTableSpecifier tableSpecifier) Allows to retrieve the content of a table without rendering it. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Retrieve hidden field passed with UiFilterSpecifier#ui(java.lang.Class, groovy.lang.Closure, taack.ast.type.FieldInfo[]). The latest parameter allow to pass additional data that will not be interpreted by TaackSimpleFilterService.list
Allow to reload the current page
Clear all params elements not mandatory
Shortcut method that call the show(UiBlockSpecifier) underneath.
Allow to return the selection to the parent form from a table in a many to many relationship..
Calling this method close the current modal, that contains usually a table. @return
id
- id of the object selectedtext
- label of the objectAllow to upload a CSV version of a table to the client browser @return
tableSpecifier
- table descriptorfileNamePrefix
- part of the filename before ".csv"Allow to upload the PDF to the client browser @return
printableSpecifier
- PDF descriptorDump a Grails asset, typically an SVG file, in a text.
Dump a binary Grails asset, typically an image.
Dump a block in Mail HTML version.
blockSpecifier
- block descriptorlocale
- languageReturn true if the action is called from a form @return
Render the block to the browser. Either the page is updated with the block content, either the full page is rendered if 'isAjax' params is true. @return
block
- page descriptormenu
- menu descriptorShortcut method that call the show(UiBlockSpecifier) underneath.
Allow to render a form directly. @return
formSpecifier
- form descriptori18n
- title of the formShortcut method that call the show(UiBlockSpecifier) underneath.
Allow to render a table and its filter directly. @return
tableSpecifier
- table descriptori18nTable
- label of the tablefilterSpecifier
- filter descriptori18nTableFilter
- label of the filtermenuSpecifier
- page menu if not ajax renderingBuild a modal from a form and shows it. @return
formSpecifier
- form descriptori18n
- title of the formBuild a modal from a table and a filter and shows it. @return
tableSpecifier
- table descriptorfilterSpecifier
- filter descriptorHelper displaying a dialog allowing to confirm before processing the action.
Long option = taackUiSimpleService.showOptions(tr('default.button.confirm.message'), ['Yes', 'No'])
if (option == 0) // do things
i18n
- content of the textoptions
- list of optionsisAjax
- set to true if the next action is ajaxAllow to get the HTML version of the PDF, also, render the PDF in the outputStream parameter.
printableSpecifier
- PDF descriptoroutputStream
- connection to the client browserlocale
- the language the PDF must be renderedAllows to retrieve the content of a block without rendering it.
blockSpecifier
- block descriptorisAjaxRendering
- if false a complete page will be generated, if true the ajax version is returnedAllows to retrieve the content of a menu without rendering it.
menuSpecifier
- menu descriptorAllows to retrieve the content of a table without rendering it.
tableSpecifier
- table descriptorGroovy Documentation