JSF server side examples?

JSF server side examples?

johnpalaganasjohnpalaganas Posts: 9Questions: 2Answers: 0

Hello,

If anyone can point me to a working JSF example for intergrating server side support? The JED website seems to be gone. All I can find is JSP. Searching this forum yields no actual answers from other people also looking for JSF examples.

I would appreciate any help.

Thank you!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,830Questions: 1Answers: 10,132 Site admin

    I'm not aware of any such examples, but the documentation required for the parameters DataTables sends and expects to receive is available here. If you create such a script I'm sure others would appreciate it if you were to post it up :-)

    Regards,
    Allan

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67
    Answer ✓

    IMO all you need to do is to write a servlet to deal with sending and receive data from ther server, its the same as using datatbles with plain jsp/servlet , the only difference is that you can make use of the <h:dataTable but you wont be able to render it from f:ajax , and just remember that in order to "init" the table upon refresh you can add something like the following to you js file

    jsf.ajax.addOnEvent(function (data) {
        if (data.status === "success") {
            if (data.source.id === "my-button-that-called-the-refresh") {
                //call your datatables init or reload code
            }
        }
    });
    

    otherwise if you render your <h:dataTable it will loose the datatables styling and will look as an ordinary table

  • johnpalaganasjohnpalaganas Posts: 9Questions: 2Answers: 0

    Thanks guys, hey if I was more than a front-end guy I would contribute a JSF examples :)

This discussion has been closed.