On Sun, Feb 6, 2011 at 6:58 PM, S.Hage <[email protected]> wrote:
>
> Hi all,
>
> How I can call a screen from javascript like this:
>
> function xyz(){
> ...
>
>  ${screens.render("component://common/widget/CommonScreens.xml#states")};
> .

The closest you can get to this is to make an ajax call to a
controller request that renders a screen, and then put this content
into your current document.  You will have trouble if the screen
result has decorators or if it contains scripts.

A better, simpler plan is to render your initial screen with divs set
aside for the purpose of injecting dynamic content.  Then you can
simply call a controller request that runs a service but renders no
view, let Javascript get the service output as JSON, and update your
screen this way.



James McGill
Phoenix AZ

Reply via email to