You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2007/03/29 12:12:52 UTC
[Myfaces Wiki] Update of "JavascriptOpenNewWindow" by Carsten Kaiser
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.
The following page has been changed by Carsten Kaiser:
http://wiki.apache.org/myfaces/JavascriptOpenNewWindow
------------------------------------------------------------------------------
However there are two ways to initiate a Javascript call from server side:
* Create a JSF page containing the script and navigate to that page. (Will not be described in this tutorial.)
* Use the Tomahawk's Extestion''''''Filter to inject the Javascript in the rendered page. (Needs an initial setup but is easier to maintain afterwards.)
- Information about how to setup the Tomahawk's Extestion''''''Filter can be found here:
+ Information about how to setup the Tomahawk's Extension''''''Filter can be found here:
http://myfaces.apache.org/tomahawk/extensionsFilter.html
+ NOTE: The following code example will only work, if the Default''''''Add''''''Resource or similar implementation is configured to be used,
+ which does not attempt to write to the Response''''''Writer immediately (like e.g. Streaming''''''Add''''''Resource class) but caches the
+ resources until the render response phase is completed! (see Javadoc of class Default''''''Add''''''Resource for details)
+
- Now we can inject the Javascript using Tomahawk's Extestion''''''Filter Add''''''Resource class:
+ Now we can inject the Javascript using Tomahawk's Extension''''''Filter Add''''''Resource class:
{{{
public void openPopupClicked(ActionEvent event) {
// View's id in the same form as used in the navigation rules in faces-config.xml