Hello,

I would like to create an ajax dialog (actually a series of them to act as a
wizard). The content of the dialog should change according to user
interaction and therefore create a series of steps. If this wizard is going
to have 3 steps then 3 ajax requests for dialog content would be made.

I would like each ajax request to call (different) T5 component returning
HTML fragment.

I am using jQuery to make a request

***** TEMPLATE ******
        <script>
            $().ready(function() {
              $('#ex2').jqm({ajax: '${thelink}'}).jqmShow();
            });
        </script>

***** CLASS *****
    public String getTheLink() {
        Link l = _resources.createActionLink("myAction", false);
        return l.toURI();
    }

    StreamResponse onMyAction() {
        String htmlFragment = "<p>paragraph <b>bold</b></p>";
        return new TextStreamResponse("text/html", htmlFragment);
    }


I would like the htmlFragment to be generated by T5 component for example
WizardStep1.

If I declare a component in the class above:
    @Component
    private WizardStep1 wizardStep1;

and modify method onMyAction like this

    StreamResponse onMyAction() {
        wizardStep1.setMessage("hello");
        return (StreamResponse) wizardStep1;
    }

then I get Exception:
Component ui/dialog/JQModalAjax does not contain an embedded component with
id 'wizardStep1'.

which is true, as I don't have WizardStep1 in my ui/dialog/JQModalAjax.tml


Any suggestions?

Reply via email to