0 Replies Latest reply on Jan 4, 2008 10:38 PM by a a

    one2many or many2one ajax page ?

    a a Newbie

      Hi,

      I am working on a simple one2many/many2one ajax page, example a list users on top part in a simpletogglepanel, and the user detail form in the bottom in another simpletogglepanel.

      So when I click a user on the top, instead of jump to a new url, I get the same page with the bottom one filled with the choosen user info.

      This all works nicely if I use a4j:commandlink and in my backing bean action I return ""(so it comes back).

      However, to maximum sharing, my user detail form(which I used using a4j:include in the above setup) can also be used stand alone(so jumping from say a menu is possible). In that case, a refresh is desirable.

      This then create a problem, if I return a standard "editUser" action and define a navigation rule depending on the from-view-id, I lost the ajax feature(i.e., the page is refreshed even I specify redirect to the same url).

      I believe it is possible for me to pass in a flag to my action and determine there but that would mean I am coding the nevigation into my action which I believe is not a very good practice. As from the point of view of the action handler, it should just say "next action is editUser" but where this occur(in the coming page or a new page) and how should be determined by navigation rules(or some other flow engines).

      Is there anyway so I can still return the "editUser" action string yet still maintain the ajax feature, i.e. render the from view without a redirect ? i.e., in a sense redirect to the from view and don't have a browser refresh ?