hand79 / Hadoop

Hadoop 開發實作&筆記
0 stars 0 forks source link

two JMesa tag in same gsp page does'nt work #215

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. put two jmesa tag in same gsp page
2. create an grails action to prepare two list list1, list2

What is the expected output? What do you see instead?

i expect two different jmesa table :

whene i put tow jmesa table in the same gsp page  i got this situation :

Table 1
----------------------------
Caption : TEST1

Table1_col 1          Table1_col 2             Table1_col 3
100                         Test                        Test

Table : 2
-----------------------------
Caption : TEST2

Table2_Col1     Table2_Col2
200              kind

i see instead :

Table 1
----------------------------
Caption : TEST1

Table1_col 1          Table1_col 2             Table1_col 3
100                         Test                        Test

Table : 2
-----------------------------
Caption : TEST1

Table1_col 1   Table1_col 2   Table1_col 3  Table2_Col1     Table2_Col2
                                                200              kind

so look at Table 2, it include the column of Table 1, and it display the 
caption of Table 1

What version of the product are you using? On what operating system?
JMesa 0.8 / Grails 1.0.1 / Windows XP 

Please provide any additional information below.

Grails action example :
    def searchIs = {

        TableFacade tableFacade1 = new TableFacadeImpl("tag1",request)
        def ISList = []
        ISList = refBpiISService.getRefBpiISes()       
        tableFacade1.items = ISList
        Limit limit1 = tableFacade1.limit

        TableFacade tableFacade2 = new TableFacadeImpl("tag2",request)
        def rules = []
        rules = regleService.getRegles()     
        tableFacade2.items = rules
        Limit limit2 = tableFacade2.limit

        return [ISList : ISList,rules : rules]

    }   

GSP page :
<form name="iSForm" action="searchIs">
    <jmesa:tableFacade
        id="tag1"
        items="${ISList}"
        maxRows="100"
        exportTypes="csv,jexcel"
        stateAttr="restore" 
        var="bean1"
        autoFilterAndSort="true"
        >
        <jmesa:htmlTable
                caption="TEST1"
                width="100%"
        >
                <jmesa:htmlRow>
                    <jmesa:htmlColumn property="col1"  
title="Table1_Col1" sortable="true" filterable="true" 
cellEditor="org.jmesa.view.editor.BasicCellEditor" />
                    <jmesa:htmlColumn property="col2" 
title="Table1_Col2" sortable="true" filterable="true" />
                    <jmesa:htmlColumn property="col3"  
title="Table1_Col3" sortable="true" filterable="true" />
                </jmesa:htmlRow>
        </jmesa:htmlTable>
</jmesa:tableFacade>
        </form> 
<br />
<% 
request.removeAttribute("tableFacade");
%>
        <form name="ISForm2" action="searchIs">
            <jmesa:tableFacade
                id="tag2"
                items="${rules}"
                maxRows="100"
                exportTypes="csv,jexcel"
                stateAttr="restore" 
                var="bean2"
                autoFilterAndSort="true"
                >
        <jmesa:htmlTable
                caption="TEST2"
                width="100%"
        >
                <jmesa:htmlRow>
                    <jmesa:htmlColumn property="col1"  
title="Table2_Col1" sortable="true" filterable="true" 
cellEditor="org.jmesa.view.editor.BasicCellEditor" />
                    <jmesa:htmlColumn property="col2" 
title="Table2_Col2" sortable="true" filterable="true" />
                </jmesa:htmlRow>
        </jmesa:htmlTable>
            </jmesa:tableFacade>
        </form> 

Original issue reported on code.google.com by amraoui....@gmail.com on 7 Sep 2009 at 2:41

GoogleCodeExporter commented 9 years ago
I replied on the groups...

http://groups.google.com/group/jmesa/browse_thread/thread/c3c6caed831541b7

I will do what I can to help but I am really hoping that someone that uses 
Grails
helps to update the GSP tag. If I remember correctly I think a limitation of 
the GSP
tag is that there can only be one table on a GSP tag. That would be a 
limitation of
the GSP tag, not JMesa.

The only thing that you need to do for the JMesa API is to have a unique name 
for
each table on the page.

Original comment by jeff.johnston.mn@gmail.com on 8 Sep 2009 at 11:04

GoogleCodeExporter commented 9 years ago
I really need somebody to pick up the Grails support...

Original comment by jeff.johnston.mn@gmail.com on 9 Mar 2011 at 7:54