Struts2+DTE

Struts2+DTE

djmm68djmm68 Posts: 20Questions: 7Answers: 0

I've been working on a Struts2 webapp (already finished). But now I'm thinking about improving its functionality via DTE, specifically, I would like to allow basic direct edition on data list (only accessed by profiled user). Can I do this easily, using "Editor JS+CSS only" package?
Formerly, I tried to get it thru the instantiation of DataTables (not Editor), and then putting a link pointing to my Struts2 ActionForm (making use of "fnRowCallback" parameter). And it's really worked, the only issue was, when the ActionForm performed its own action (editing data in this case) and returned control to data list (jsp), obviusly, the browser refreshed the page and changes were not reflected inmediately, that is, in the same view. To see these changes applied, was necessary browse thru DT until reaching desired page.

This question has an accepted answers - jump to answer

Answers

  • PaulusPaulus Posts: 69Questions: 17Answers: 5

    Which version of the Struts2 are you using? If you are creating a new webapp, it might be better to get rid of the ActionForm.

  • djmm68djmm68 Posts: 20Questions: 7Answers: 0

    U're right, what a mistake!! :P I use Struts 2.3.24, the classes extends from ActionSupport (not ActionForm, this is typical of Struts 1) and I'm using ModelDriven interceptor in this app (transfers the form data into the object automatically).

  • PaulusPaulus Posts: 69Questions: 17Answers: 5
    Answer ✓

    >> Can I do this easily, using "Editor JS+CSS only" package?

    Yes, you can by (depending on your configuration)
    1. conditionally include the scripts that provides the editing based on the profile
    2. or, includes the scripts and only initiate it based on the user profile

    >> ...the browser refreshed the page and changes were not reflected...

    It is possible your Ajax setup is not working well, try to test that first.

  • djmm68djmm68 Posts: 20Questions: 7Answers: 0

    Ok, all clear! that's what I wanted to know; I wanted to make sure before spend many hours trying to integrate DTE with my code. Now, I get to work on it.
    Thanks Paulus!

  • djmm68djmm68 Posts: 20Questions: 7Answers: 0

    (See previous post, I forgot to mark 'question solved' checkbox.)

This discussion has been closed.