<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Yahoo! UI Meets JavaServer Faces</title> <atom:link href="http://blogs.steeplesoft.com/2006/05/yahoo-ui-meets-javaserver-faces/feed/" rel="self" type="application/rss+xml" /><link>http://blogs.steeplesoft.com/2006/05/yahoo-ui-meets-javaserver-faces/</link> <description></description> <lastBuildDate>Mon, 06 Feb 2012 08:22:23 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: james</title><link>http://blogs.steeplesoft.com/2006/05/yahoo-ui-meets-javaserver-faces/comment-page-1/#comment-793</link> <dc:creator>james</dc:creator> <pubDate>Mon, 11 Dec 2006 23:13:42 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2006/05/25/yahoo-ui-meets-javaserver-faces/#comment-793</guid> <description>Hey Jason, Gr8 article ! Nice step by step follow up.....
Can you also drop content of CalendarTemplate.txt, as I don&#039;t see any details on that !Thanks again.</description> <content:encoded><![CDATA[<p>Hey Jason, Gr8 article ! Nice step by step follow up&#8230;..<br
/> Can you also drop content of CalendarTemplate.txt, as I don&#8217;t see any details on that !</p><p>Thanks again.</p> ]]></content:encoded> </item> <item><title>By: jason</title><link>http://blogs.steeplesoft.com/2006/05/yahoo-ui-meets-javaserver-faces/comment-page-1/#comment-756</link> <dc:creator>jason</dc:creator> <pubDate>Thu, 07 Dec 2006 22:05:37 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2006/05/25/yahoo-ui-meets-javaserver-faces/#comment-756</guid> <description>By the way, I have a much better version of this.  Give me a bit to fix some YUI upgrade issues and I&#039;ll post a jar.</description> <content:encoded><![CDATA[<p>By the way, I have a much better version of this.  Give me a bit to fix some YUI upgrade issues and I&#8217;ll post a jar.</p> ]]></content:encoded> </item> <item><title>By: jason</title><link>http://blogs.steeplesoft.com/2006/05/yahoo-ui-meets-javaserver-faces/comment-page-1/#comment-755</link> <dc:creator>jason</dc:creator> <pubDate>Thu, 07 Dec 2006 22:04:33 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2006/05/25/yahoo-ui-meets-javaserver-faces/#comment-755</guid> <description>Sure can!&lt;pre&gt;&lt;code&gt;package com.steeplesoft.jsf.components.yui.utils;import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;import org.apache.shale.remoting.XhtmlHelper;public class RendererHelper {
/*
* public static final String YAHOO_RENDERED_SCRIPT_KEY =
* &quot;yui_yahoo_js_rendered&quot;; public static final String
* DOM_RENDERED_SCRIPT_KEY = &quot;yui_dom_js_rendered&quot;; public static final
* String EVENT_RENDERED_SCRIPT_KEY = &quot;yui_event_js_rendered&quot;; public static
* final String ANIMATION_RENDERED_SCRIPT_KEY = &quot;yui_animation_js_rendered&quot;;
* public static final String DRAGDROP_RENDERED_SCRIPT_KEY =
* &quot;yui_dragdrop_js_rendered&quot;;
*
* public static final String JS_UTIL_RENDERED_SCRIPT_KEY =
* &quot;yui_js_utils_js_rendered&quot;;
*
* public static final String RESOURCE_PREFIX = &quot;yuiresource.jsf?r=&quot;;
*/private static transient XhtmlHelper xHtmlHelper = null;public static void writeScriptTag(ResponseWriter writer,
UIComponent component, String src) throws IOException {
writer.startElement(&quot;script&quot;, component);
writer.writeAttribute(&quot;type&quot;, &quot;text/javascript&quot;, &quot;type&quot;);
writer.writeAttribute(&quot;src&quot;, src, &quot;src&quot;);
writer.endElement(&quot;script&quot;);
writer.write(&quot;\n&quot;);
}public static boolean hasBeenRendered(FacesContext context,
String renderedKey) {
Map requestMap = context.getExternalContext().getRequestMap();
Boolean scriptRendered = (Boolean) requestMap.get(renderedKey);if (scriptRendered != Boolean.TRUE) {
requestMap.put(renderedKey, Boolean.TRUE);
scriptRendered = Boolean.FALSE;
}return scriptRendered.booleanValue();
}public static void writeCssLinkTag(ResponseWriter writer,
UIComponent component, String src) throws IOException {
writer.startElement(&quot;link&quot;, component);
writer.writeAttribute(&quot;type&quot;, &quot;text/css&quot;, &quot;type&quot;);
writer.writeAttribute(&quot;rel&quot;, &quot;stylesheet&quot;, &quot;rel&quot;);
writer.writeAttribute(&quot;href&quot;, src, &quot;href&quot;);
writer.endElement(&quot;link&quot;);
writer.write(&quot;\n&quot;);
}public static String readInFragmentAsString(URL sxURL) throws IOException {
BufferedReader bfReader = null;
StringBuffer sxOut = new StringBuffer();try {
bfReader = new BufferedReader(new InputStreamReader(
openStream(sxURL)));int byteCnt = 0;
char[] buffer = new char[4096];
while ((byteCnt = bfReader.read(buffer)) != -1) {
if (byteCnt &gt; 0) {
sxOut.append(buffer, 0, byteCnt);
}
}
} catch (IOException e) {
e.printStackTrace();
throw e;
} finally {
if (bfReader != null) {
try {
bfReader.close();
} catch (Exception ee) {
}
}
}return sxOut.toString();
}private static InputStream openStream(URL sxURL) throws IOException {
// set cache to false, so the ./lib/bp-popup-balloon.jar file doesn&#039;t
// get locked on redeploy or undeploy on windows.
URLConnection urlConn = sxURL.openConnection();
urlConn.setUseCaches(false);
return urlConn.getInputStream();
}public static XhtmlHelper getXhtmlHelper() {
if (null == xHtmlHelper) {
xHtmlHelper = new XhtmlHelper();
}
return xHtmlHelper;
}
public static boolean componentIsDisabledOrReadonly(UIComponent component) {
boolean retvalue = false;
return retvalue;
}}&lt;/code&gt;&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>Sure can!</p><pre><code>package com.steeplesoft.jsf.components.yui.utils;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;

import org.apache.shale.remoting.XhtmlHelper;

public class RendererHelper {
    /*
     * public static final String YAHOO_RENDERED_SCRIPT_KEY =
     * "yui_yahoo_js_rendered"; public static final String
     * DOM_RENDERED_SCRIPT_KEY = "yui_dom_js_rendered"; public static final
     * String EVENT_RENDERED_SCRIPT_KEY = "yui_event_js_rendered"; public static
     * final String ANIMATION_RENDERED_SCRIPT_KEY = "yui_animation_js_rendered";
     * public static final String DRAGDROP_RENDERED_SCRIPT_KEY =
     * "yui_dragdrop_js_rendered";
     *
     * public static final String JS_UTIL_RENDERED_SCRIPT_KEY =
     * "yui_js_utils_js_rendered";
     *
     * public static final String RESOURCE_PREFIX = "yuiresource.jsf?r=";
     */

    private static transient XhtmlHelper xHtmlHelper = null;

    public static void writeScriptTag(ResponseWriter writer,
            UIComponent component, String src) throws IOException {
        writer.startElement("script", component);
        writer.writeAttribute("type", "text/javascript", "type");
        writer.writeAttribute("src", src, "src");
        writer.endElement("script");
        writer.write("\n");
    }

    public static boolean hasBeenRendered(FacesContext context,
            String renderedKey) {
        Map requestMap = context.getExternalContext().getRequestMap();
        Boolean scriptRendered = (Boolean) requestMap.get(renderedKey);

        if (scriptRendered != Boolean.TRUE) {
            requestMap.put(renderedKey, Boolean.TRUE);
            scriptRendered = Boolean.FALSE;
        }

        return scriptRendered.booleanValue();
    }

    public static void writeCssLinkTag(ResponseWriter writer,
            UIComponent component, String src) throws IOException {
        writer.startElement("link", component);
        writer.writeAttribute("type", "text/css", "type");
        writer.writeAttribute("rel", "stylesheet", "rel");
        writer.writeAttribute("href", src, "href");
        writer.endElement("link");
        writer.write("\n");
    }

    public static String readInFragmentAsString(URL sxURL) throws IOException {
        BufferedReader bfReader = null;
        StringBuffer sxOut = new StringBuffer();

        try {
            bfReader = new BufferedReader(new InputStreamReader(
                    openStream(sxURL)));

            int byteCnt = 0;
            char[] buffer = new char[4096];
            while ((byteCnt = bfReader.read(buffer)) != -1) {
                if (byteCnt > 0) {
                    sxOut.append(buffer, 0, byteCnt);
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
            throw e;
        } finally {
            if (bfReader != null) {
                try {
                    bfReader.close();
                } catch (Exception ee) {
                }
            }
        }

        return sxOut.toString();
    }

    private static InputStream openStream(URL sxURL) throws IOException {
        // set cache to false, so the ./lib/bp-popup-balloon.jar file doesn't
        // get locked on redeploy or undeploy on windows.
        URLConnection urlConn = sxURL.openConnection();
        urlConn.setUseCaches(false);
        return urlConn.getInputStream();
    }

    public static XhtmlHelper getXhtmlHelper() {
        if (null == xHtmlHelper) {
            xHtmlHelper = new XhtmlHelper();
        }
        return xHtmlHelper;
    }

    public static boolean componentIsDisabledOrReadonly(UIComponent component) {
        boolean retvalue = false;

        return retvalue;
    }

}</code></pre>]]></content:encoded> </item> <item><title>By: Satish</title><link>http://blogs.steeplesoft.com/2006/05/yahoo-ui-meets-javaserver-faces/comment-page-1/#comment-746</link> <dc:creator>Satish</dc:creator> <pubDate>Wed, 06 Dec 2006 19:39:11 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2006/05/25/yahoo-ui-meets-javaserver-faces/#comment-746</guid> <description>Hello Jason,Nice tutorial here; Thanks a ton for this.
Can you post the code for RendererHelper method plz.thanks
MS
Boston</description> <content:encoded><![CDATA[<p>Hello Jason,</p><p>Nice tutorial here; Thanks a ton for this.<br
/> Can you post the code for RendererHelper method plz.</p><p>thanks<br
/> MS<br
/> Boston</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 11/22 queries in 0.123 seconds using disk: basic

Served from: blogs.steeplesoft.com @ 2012-02-07 14:42:40 -->
