<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>cum grano salis — nobody likes a clever bastard &#187; Uncategorized</title>
	<atom:link href="http://datenschwanz.net/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://datenschwanz.net</link>
	<description>science, technology, politics, and vitriol at the bleeding edge of the crinkum-crankum we call Internet. also, food.</description>
	<lastBuildDate>Thu, 08 Apr 2010 10:29:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
		<item>
		<title>PrimeFaces and Spring Web Flow</title>
		<link>http://datenschwanz.net/2010/04/08/primefaces-and-spring-web-flow/</link>
		<comments>http://datenschwanz.net/2010/04/08/primefaces-and-spring-web-flow/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 08:45:50 +0000</pubDate>
		<dc:creator>studmuffin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PrimeFaces]]></category>
		<category><![CDATA[Spring Web Flow]]></category>

		<guid isPermaLink="false">http://datenschwanz.net/?p=425</guid>
		<description><![CDATA[




I usually applaud PrimeFaces for its simplicity, ease of integration with other component kits, and its extensive collection of components. The documentation is pretty good, too, as long as you ignore the myriad typos and just plain wrong things. Recently, it almost officially got Spring Web Flow support in the 1.0.1 snapshot builds. (I had [...]]]></description>
			<content:encoded><![CDATA[<!-- Easy AdSense V2.82 -->
<!-- Post[count: 2] -->
<div class="ezAdsense adsense adsense-leadin" style="text-align:center;margin:12px;"><script type="text/javascript"><!--
google_ad_client = "pub-6651136519429825";
/* DS, top content, 468x60, created 11/25/09 */
google_ad_slot = "2784801780";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>I usually applaud PrimeFaces for its simplicity, ease of integration with other component kits, and its extensive collection of components. The documentation is pretty good, too, as long as you ignore the myriad typos and just plain wrong things. Recently, it <a href="http://cagataycivici.wordpress.com/2010/03/21/integrating-primefaces-with-spring-webflow/">almost officially got Spring Web Flow support</a> in the 1.0.1 snapshot builds. (I had been running it with SWF already, but the 1.0.0 release broke that.) I assume that in the rush to get it up and running, there was an integration oversight, and that means that you can&#8217;t run SWF with PrimeFaces and another kit with AJAX components at the same time. That&#8217;s okay, because it&#8217;s an easy fix.</p>
<p><span id="more-425"></span><br />
Here is my updated version of the PrimeFacesAjaxHandler. If you compare it with what&#8217;s in the 1.0.1 snapshot, you&#8217;ll see that the main difference is that this can take a configurable delegate. (The @PostInitialize annotation basically triggers ApplicationListener&lt;ContextRefreshedEvent&gt; event handling, so you can reimplement it directly like that if you want, or use the old InitializingBean method.) The other difference is the possible bug in sendAjaxRedirect where it could shortcut the delegate if it&#8217;s the delegate&#8217;s AJAX request. I didn&#8217;t investigate, so maybe the original is actually okay.</p>
<pre class="brush: java; wrap-lines: false;">
/*
 * Copyright 2009-2010 Prime Technology.
 *
 * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.faces.primefaces;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.js.ajax.AjaxHandler;
import org.springframework.js.ajax.SpringJavascriptAjaxHandler;

import utils.spring.PostInitialize;

/**
 * PrimeFaces implementation of SpringJavascriptAjaxHandler Only used for Spring
 * WebFlow Integration
 */
public class PrimeFacesAjaxHandler
	implements AjaxHandler
{

	private AjaxHandler delegate;

	@PostInitialize
	public void init() {
		if (delegate == null) {
			delegate = new SpringJavascriptAjaxHandler();
		}
	}

	public boolean isAjaxRequest(HttpServletRequest req, HttpServletResponse resp) {
		return isPrimeFacesAjaxRequest(req) || delegate.isAjaxRequest(req, resp);
	}

	public void sendAjaxRedirect(String targetURL, HttpServletRequest req, HttpServletResponse resp, boolean popup)
		throws IOException
	{
		if (isPrimeFacesAjaxRequest(req)) {
			resp.sendRedirect(targetURL);
		} else {
			delegate.sendAjaxRedirect(targetURL, req, resp, popup);
		}
	}

	public void setDelegate(@SuppressWarnings(&quot;hiding&quot;) AjaxHandler delegate) {
		this.delegate = delegate;
	}

	private boolean isPrimeFacesAjaxRequest(HttpServletRequest request) {
		return request.getParameterMap().containsKey(&quot;primefacesPartialRequest&quot;);
	}

}
</pre>
<p>This now allows this to work and then the AJAX calls are all happy:</p>
<pre class="brush: xml; wrap-lines: false;">
	&lt;bean id=&quot;flowController&quot; class=&quot;org.springframework.webflow.mvc.servlet.FlowController&quot;&gt;

		&lt;property name=&quot;ajaxHandler&quot;&gt;

			&lt;bean class=&quot;org.springframework.faces.primefaces.PrimeFacesAjaxHandler&quot;&gt;

				&lt;property name=&quot;delegate&quot;&gt;

					&lt;bean class=&quot;org.springframework.faces.richfaces.RichFacesAjaxHandler&quot; /&gt;

				&lt;/property&gt;

			&lt;/bean&gt;

		&lt;/property&gt;

[...]

	&lt;/bean&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://datenschwanz.net/2010/04/08/primefaces-and-spring-web-flow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Don&#8217;t Panic! Cable TV Rates Increasing in 2010!</title>
		<link>http://datenschwanz.net/2010/01/14/dont-panic-cable-tv-rates-increasing-in-2010/</link>
		<comments>http://datenschwanz.net/2010/01/14/dont-panic-cable-tv-rates-increasing-in-2010/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 22:58:38 +0000</pubDate>
		<dc:creator>studmuffin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://datenschwanz.net/?p=365</guid>
		<description><![CDATA[
Cable bills rising in 2010, how to lock your rate in today
http://www.walletpop.com/blog/2010/01/13/cable-bills-rising-in-2010-how-to-lock-your-rate-in-today/
Josh Smith &#8211; Jan 13th 2010 at 12:30PM
The next cable bill that comes in your mail could contain a belated bad start to 2010 in the form of higher prices. Not only are new offerings, like 3-D programming&#8230;

I stopped reading right there. Of course, [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
<strong>Cable bills rising in 2010, how to lock your rate in today</strong><br />
<a href="http://www.walletpop.com/blog/2010/01/13/cable-bills-rising-in-2010-how-to-lock-your-rate-in-today/">http://www.walletpop.com/blog/2010/01/13/cable-bills-rising-in-2010-how-to-lock-your-rate-in-today/</a><br />
Josh Smith &#8211; Jan 13th 2010 at 12:30PM</p>
<p>The next cable bill that comes in your mail could contain a belated bad start to 2010 in the form of higher prices. Not only are new offerings, like 3-D programming&#8230;
</p></blockquote>
<p>I stopped reading right there. Of course, following my instincts, I composed an inflammatory response. &#8220;Lock it in at $0. TV is bad for you. It destroys lives, families, and is destroying our country.&#8221; This was enough to get at least one TV apologist to come out of the woodwork and try to justify a mass of cancer by the little fetus in fetu inside because <em>it&#8217;s still a life!</em></p>
<blockquote><p>The news media is destroying our country, I can agree with that.  Not all of TV, but most of it.   What about the cooking shows? I see you guys watching those from time to time!  ha.  If anything push the FCC for a la carte TV subscriptions where you get to pay for the channels you want.  If that were the case I would probably have about 10 channels and be set.</p></blockquote>
<p>Good points, but not good enough.</p>
<p>I would rather rent or buy quality shows. The rest, even the crap I&#8217;ve watched, is easy to give up. The cooking shows are even shit almost all of the time. It&#8217;s just Real World all over again or some fat chick trying to show off. The occasional gem like <a href="http://www.travelchannel.com/TV_Shows/Anthony_Bourdain">Anthony Bourdain&#8217;s No Reservations</a> are just cynical, nihilistic, and/or hedonistic fluff making fun of how stupid everyone is and the intended audience already understands. It&#8217;s just passing the time until Rachel Ray comes on and ruins your life. It&#8217;s purely optional, and I would rather sit in silence while I eat, since reading while eating is too difficult. Other shows that involve science and nature are on the borderline of expendable entertainment, like <a href="http://www.foodnetwork.com/good-eats/index.html">Good Eats</a> where you may learn some technique or science behind cooking. Shows like <a href="http://dsc.discovery.com/convergence/planet-earth/planet-earth.html">Planet Earth</a> just make you want to kill, so they can be very inspiring and help get you through the day. They&#8217;re all available in other forms, though.</p>
<p>All of the aforementioned shows are available off of TV:</p>
<ul>
<li><a href="http://www.amazon.com/gp/product/B000LPS2TU?ie=UTF8&#038;tag=datenschwanznet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000LPS2TU">Anthony Bourdain: No Reservations &#8211; Collection 1</a><img src="http://www.assoc-amazon.com/e/ir?t=datenschwanznet-20&#038;l=as2&#038;o=1&#038;a=B000LPS2TU" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li>
<li><a href="http://www.amazon.com/gp/product/B000XXWDZY?ie=UTF8&#038;tag=datenschwanznet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000XXWDZY">Anthony Bourdain: No Reservations &#8211; Collection 2</a><img src="http://www.assoc-amazon.com/e/ir?t=datenschwanznet-20&#038;l=as2&#038;o=1&#038;a=B000XXWDZY" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li>
<li><a href="http://www.amazon.com/gp/product/B001HB1K1E?ie=UTF8&#038;tag=datenschwanznet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B001HB1K1E">Anthony Bourdain: No Reservations &#8211; Collection 3</a><img src="http://www.assoc-amazon.com/e/ir?t=datenschwanznet-20&#038;l=as2&#038;o=1&#038;a=B001HB1K1E" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li>
<li><a href="http://www.amazon.com/gp/product/B0026IQTPO?ie=UTF8&#038;tag=datenschwanznet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B0026IQTPO">Anthony Bourdain: No Reservations &#8211; Collection 4</a><img src="http://www.assoc-amazon.com/e/ir?t=datenschwanznet-20&#038;l=as2&#038;o=1&#038;a=B0026IQTPO" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li>
<li><a href="http://www.amazon.com/gp/product/B000MRAAJM?ie=UTF8&#038;tag=datenschwanznet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000MRAAJM">Planet Earth: The Complete BBC Series [Blu-ray]</a><img src="http://www.assoc-amazon.com/e/ir?t=datenschwanznet-20&#038;l=as2&#038;o=1&#038;a=B000MRAAJM" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li>
<li><a href="http://www.amazon.com/gp/product/B0018KVL5O?ie=UTF8&#038;tag=datenschwanznet-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B0018KVL5O">Good Eats: Vol. 5-7 Super Sweets, Breakfast Eats 2 &#038; 3</a><img src="http://www.assoc-amazon.com/e/ir?t=datenschwanznet-20&#038;l=as2&#038;o=1&#038;a=B0018KVL5O" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li>
</ul>
<p>&#8230; and so on.</p>
<p>It&#8217;s also not the news media. It&#8217;s the people who watch it. People have been taught that news is actually news and not entertainment. The lines blurred over time and now there&#8217;s almost nothing left of &#8220;news&#8221;. The only way to change it is to stop watching altogether, since they aren&#8217;t responsible enough or smart enough to be able to determine which is which. They sit, eat more garbage, get fatter, and are entertained, thinking that this is the only time they get to themselves in their day after getting raped on both ends by their employers, the government, and any purveyor they deal with cutting new holes to rape them, too, so they&#8217;re going to be entertained. All other forms of entertainment are practically dead and you can&#8217;t even go to the park without the threat of being mugged, perceived or real, or having the park not be covered with graffiti and McDonald&#8217;s trash. You can&#8217;t even talk to people in public without them suing you. People have lost their imaginations and are too jaded to come up with and enjoy any form of constructive entertainment because TV does it all for them. Watching a cooking show does not make you a chef, watching Friends does not make you funny or cool, and watching MTV does not make you black.</p>
<p>It really boils down to stupid people being irresponsible with their time and lives and TV the catalyst, drug, or whatever that enables it instead of people, I don&#8217;t know, educating themselves.</p>
<p>Oh, American Gladiators is on&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://datenschwanz.net/2010/01/14/dont-panic-cable-tv-rates-increasing-in-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>
