row-attribute not working any more after changing to server-side processing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

row-attribute not working any more after changing to server-side processing

This post was updated on .
* some general information such as:
=> the version of Dandelion-Datatables you're using
    Dandelioncore/ JSP 1.1.1
=> the template engine you're using (JSP or Thymeleaf)
=> the app server (Tomcat, JBoss, Weblogic, ...) and the Servlet API version you're using (visible in the web.xml for example)
     JBoss EAP 7
=> the web browser you're using (Chrome, Firefox, IE, ...)
  IE + FF
=> whether you are using Spring/Spring MVC or another framework
  Spring, no MVW, Json-Plugin

* more specific things such as:
=> the kind of data source you're using (DOM, AJAX or AJAX + server-side processing)
   - server side processing
=> a code snippet that shows your usage of Dandelion-Datatables
=> a link to the data generated by the DataTables debugger


I changed my datatable to server side processing. From this point on the row attribute seem to not working any more.

This is my definition of the datatable within the JSP:

<datatables:table id="users" url="/user_User_Json_List_Dandelion.action" serverSide="true" row="user">
            <datatables:column titleKey="user.user.list.username" sortable="false" property="benutzername" />
            <datatables:column titleKey="user.user.list.prename" sortable="false" property="person.vorname" />
            <datatables:column titleKey="user.user.list.surname" sortable="false" property="person.nachname" />
            <datatables:column titleKey="" sortable="false" property="" />
            <datatables:column cssCellClass="img" sortable="false" cssCellStyle="width: 40px">
                bla<c:if test="${user.gesperrt}">
                    <img src="<%=request.getContextPath()%>/static/images/locked.gif" title="<s:text name="%{getText('user.user.list.locked')}"/>"
                        alt="<s:text name="%{getText('user.user.list.locked')}"/>" />
                <c:if test="${!user.aktiv}">
                    <img src="<%=request.getContextPath()%>/static/images/delete.gif" title="<s:text name="%{getText('user.user.list.delete')}"/>"
                        alt="<s:text name="%{getText('user.user.list.delete')}"/>" />
            <datatables:column cssCellClass="img" sortable="false" cssCellStyle="width: 20px">
                <c:if test="${!user.systemBenutzer}">
                    <s:url var="edit" action="user_User_Edit_Pre">
                        <s:param name="benutzerId">${user.benutzerId}</s:param>
                    <s:a href="%{edit}" title="%{getText('user.user.edit.header')}">
                        <img src="<%=request.getContextPath()%>/static/images/edit.gif" title="<s:text name="%{getText('user.user.edit.header')}"/>"
                            alt="<s:text name="%{getText('user.user.edit.header')}"/>" />
            <datatables:column cssCellClass="img" sortable="false" cssCellStyle="width: 20px">
                <s:url var="listRights" action="user_Auth_List_Pre">
                    <s:param name="benutzerId">${user.benutzerId}</s:param>                   
                <s:a href="%{listRights}" title="%{getText('user.user.list.listRights')}">
                    <img src="<%=request.getContextPath()%>/static/images/user_details.gif" title="<s:text name="%{getText('user.user.list.listRights')}"/>"
                        alt="<s:text name="%{getText('user.user.list.listRights')}"/>" />

all calls like e.g. '<c:if test="${user.gesperrt}">' do not work, theres no user-variable available since I turned server side processing on.

My Json Result from the Json WebService does look like:


So whats going wrong here?
How else can I access the data?

Thanks for any help.


just for testing I changed one of the columns to:

<datatables:column cssCellClass="img" sortable="false" cssCellStyle="width: 40px">

'hello' is never printed out in none of the about 2500 lines.


whenever setting to server side I only can access data via
<datatables:column property="...">

when not using server side I also can use row attribute and things like

Maybe its a bug?
Reply | Threaded
Open this post in threaded view

Re: row-attribute not working any more after changing to server-side processing

as described in a previous chapter in the doc

8.3. Customizing column contents

One only can use of column tags using the property-property and my use the renderFunction-property to call java script which then may processes some logics.
But in my observation these java script calls returning some html (like an img-tag) is slowing down the rendering.

I hope in the end server side processing will although make some benefits in speed.

My dandelion datatables column then looks like:

            <datatables:column property="aktiv" renderFunction="produceUserLockedIcon"/>

and my java script looks like:

    <script type="text/javascript"> function produceUserLockedIcon(data, type, full) { return "testString: " + '<a href="blaa">blaa</a>' + '<img src="<%=request.getContextPath()%>/static/images/locked.gif"\>'; } </script>