Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
Overview

Allows Grails applications to easily integrate  with the functionality. Utilizes Jmesa feature as an underlying
mechanism so serves managing representation of data in tabular form, filter,sort, paginate, export
your data.I recommend you read the Jmesa documentation before continuing to get a feel for how this plugin 
operates. 

Concepts
Sort: Allow sorting feature based on Domain class field name. 
Paginate: Provide the number of record need to be display.
Export/Import: Provide Export and Import of data in Pdf and Excel format.
Filter: Allowing filtering of data based on domain class field name.

Installation
Install the plugin by providing path to local file system where the plugin.zip file is located .
grails install-plugin jmesa

Simple Example

GSP :

{code}
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        ...
        <script language="javascript" src="<Js path>"></script>
        <link rel="stylesheet" type="text/css" href="<Css path>" />
        <script type="text/javascript">
        function onInvokeAction(id) {
            setExportToLimit(id, '');
            createHiddenInputFieldsForLimitAndSubmit(id);
        }
        function onInvokeExportAction(id) {
            var parameterString = createParameterStringForLimit(id);
            location.href = '../list?' + parameterString;
        }
        </script>
    </head>
    <body>
        .........
        
         <form name="modelForm" action="list">
                <jmesa:tableFacade id="tag" items="${modelsList}" maxRows="25" stateAttr="restore" var="modelInstance" autoFilterAndSort="true" maxRowsIncrements="25,50,100">
                    <jmesa:htmlTable style=" border-collapse: separate">
                        <jmesa:htmlRow highlighter="true">
                            <jmesa:htmlColumn property="name" sortable="true" filterable="true" cellEditor="org.jmesa.view.editor.BasicCellEditor" nowrap>
								<g:link action="show" id="${modelInstance.id}">${modelInstance.name}</g:link>
							 </jmesa:htmlColumn>
    	                     <jmesa:htmlColumn property="description" sortable="true" filterable="true" cellEditor="org.jmesa.view.editor.BasicCellEditor">${modelInstance.description}</jmesa:htmlColumn>
                             <jmesa:htmlColumn width="50px" property="source" sortable="true" filterable="true" title="Source TDS">${modelInstance.source}</jmesa:htmlColumn>
                             <jmesa:htmlColumn width="50px" property="status" sortable="true" filterable="true" title="Model Status">${modelInstance.status}</jmesa:htmlColumn>
                        </jmesa:htmlRow>
                    </jmesa:htmlTable>
                </jmesa:tableFacade>
            </form>
            
            .........
            
      <body>

{code}
Controller :

{code}
		TableFacade tableFacade = new TableFacadeImpl("tag",request)
        tableFacade.items = modelsList  // list of records which you want to render
        Limit limit = tableFacade.limit
		if(limit.isExported()){
            tableFacade.setExportTypes(response,limit.getExportType())
            tableFacade.setColumnProperties(<properties you need to render in export file as ',' separated>)
            tableFacade.render()
        }else
            return [modelsList : modelsList]
{code}

Contributing
All contributions are welcome.
For code changes please ensure you supply working tests and documentation.
Requests for additional information to go along with this documentation are also welcomed.

Credits
Jmesa was written by jeff johnston and plugin build by Lokanada Reddy, Vivek Singh

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.