On Sun, Aug 22, 2010 at 3:41 PM, Freddy Daoud <xf2...@fastmail.fm> wrote:
>> Anyone have an example of Stripes and Jmesa to display table data?
>
> I'm currently using JMesa with Stripes in a project, but I can't share
> the code.
>
> However, I can tell you that there's not much to integrate JMesa with
> Stripes. Meaning, if you follow the JMesa documentation to create
> tables, in Stripes all you need to do is display the table in the JSP.
>
> For example, say you create a class, MyTable, that generates the table
> with TableFacade, and you override toString() to return
> tableFacade.render(). Then, in your action bean, you create an
> instance of that class and return it from a getter method, such as
>
>  public MyTable getMyTable() {
>    return myTable;
>  }
>
> Displaying the table in your JSP is just a matter of
>
>  ${actionBean.myTable}
>
> That's all there is to it.
>
> You can also use JMesa's JSP tag library. Again, there's not much to
> integrating with Stripes. Just another tag library.
>
> Cheers,
> Freddy

i am trying to generate tables with JMesa v3. i am able to successfully
create such a table; however, i am having trouble with the filtering,
paging, and sorting that relies on javascript.

in my jsp, i have included the following:

       <script type="text/javascript">
            function onInvokeAction(id, action) {
                $.jmesa.setExportToLimit(id, '');
                $.jmesa.createHiddenInputFieldsForLimitAndSubmit(id);
            }
        </script>

i have wrapped the table with the following tag:

            <form name="personListForm" action="example.PersonListActionBean">
                ${actionBean.table}
            </form>

however, upon hitting any of the table buttons (for sorting,
paging, or filtering), i receive an error such as:

The requested resource (/admin/example/PersonListActionBean) is not available.

i don't fully understand the entire process at work. but, i'm assuming
that createHiddenInputFieldsForLimitAndSubmit() calls the form action
and attempts to retrieve the prescribed table information from the
specified (in the form 'action' field) controller.

following this logic, it appears that i am not providing the "form action"
field the appropriate path used to locate the controller. the controller
resides in src/example/PersonListActionBean.

the JSP, meanwhile, resides in a folder /admin, and thus i assume
this is the reason the path to the controller is prefixed with "/admin".
(i can't seem to suppress this prefix.)

does anybody have a simple, working example for which the
JMesa table controls (paging, sorting, filtering) work? or, for
that matter, suggestions on how to fix the above situation.

any advice would be greatly appreciated. thank you.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to