How to remove the yellow fade from the highlight function in Tapestry 5’s zone update

May 12th, 2009

Thanks to Hugo and Igor from the Tapestry User’s mailing list for this solution. Hopefully this blog post will save someone some time.

If you want to remove the generic yellow fade from Tapestry 5’s zone update:

show
highlight
slidedown
slideup
fade

Just add t:update=”show” as a parameter to your zone component

If you just want the zone to be updated with no effect use “show” like

YouTube Video Posted: Rachmaninoff Prelude Op. 32, No. 11 in B Major

August 9th, 2008

New DJ Mix Posted!

August 9th, 2008

Just finished a new DJ mix. CLICK HERE TO LISTEN!

Flex 3 - Fixed Size ScrollThumb for VScrollBar

June 26th, 2008

NPACEMO.com has a great post on Flex 3 Designer ScrollBar - Fixed Size ScrollThumb.

I was pulling my hair out for awhile on this issue - and hope to spread the knowledge to other Flex developers out there!

Flex, AlivePDF, and Tapestry5

May 28th, 2008

Here is the code to handle the request/response of PDF creation with Flex / AlivePDF in Tapestry 5.

Simply make this page class. There is no TML file required.


package com.companyname.project.etc;

import java.io.IOException;

import javax.servlet.*;

import org.apache.tapestry.ioc.annotations.Inject;
import org.apache.tapestry.util.TextStreamResponse;
import org.apache.tapestry.services.RequestGlobals;

public class WritePDF {
@Inject
private RequestGlobals request;

@Inject
private RequestGlobals response;

Object onActivate() throws IOException {
int i = 0;
int k = 0;
int maxLength = request.getHTTPServletRequest().getContentLength();
byte[] bytes = new byte[maxLength];
String method = request.getHTTPServletRequest().getParameter("method");
String name = request.getHTTPServletRequest().getParameter("name");
ServletInputStream si = null;
try {
si = request.getHTTPServletRequest().getInputStream();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

while (true) {
k = si.read(bytes,i,maxLength);
i += k;
if (k <= 0)
break;
}

if (bytes != null) {
ServletOutputStream stream = response.getHTTPServletResponse().getOutputStream();
response.getHTTPServletResponse().setContentType("application/pdf");
response.getHTTPServletResponse().setContentLength(bytes.length);
response.getHTTPServletResponse().setHeader("Content-Disposition",method + ";filename=" + name);
stream.write(bytes);
stream.flush();
stream.close();
return response;
} else {
return new TextStreamResponse("text/plain", String.format("bytes is null"));
}
}
}

Arghhh. Puck. XML config files, web flows, JSPs, controllers, models and DAOs, WAR files, JARs, blah blah blah.

November 12th, 2007

Jean-Jacques Dubray wrote an excellent article that sums up my frustrations working with JAVA based technology:

 

“Refactoring allows us to continue tweaking something to make it better - and often you get incrementally better improvements. But, sometimes, when you take a step back, you’re looking at a big hairball of a design. That’s where we are with web architecture these days - and why I believe lighter-weight frameworks like Ruby on Rails have been wildly successful.

 

Try to do a simple web app in Java these days - name your framework? Arghhh. Puck. XML config files, web flows, JSPs, controllers, models and DAOs, WAR files, JARs, blah blah blah. And want to refactor your layout? Forget about it.

 

Enough is enough. We need to really rethink MVC on the server side as a way of building Rich Internet Applications.”

If You Don’t Know Your Purpose, Discover It, Now

October 27th, 2007

In The Way of the Superior Man, David Deida writes:

 

“The core of your life is your purpose. Everything in your life, from your diet to your career, must be aligned with your purpose if you are to act with coherence and integrity in the world. If you know your purpose, your deepest desire, then the secret of success is to discipline your life so that you support your deepest purpose and minimize distractions and detours.”

 

What is your purpose?

 

This blog marks the beginning of my adventure to bring more electronic music into the world.

 

I love uplifting people with the fusion of music and technology. Whether in a club, at a party, or relaxing in someone’s home, there is something special about transporting people to the incredible world of electronic music.

 

I want to give this gift to the world. I know there will be challenges along the way. I am ready to take them on.

 

“Feel what you want to give most as a gift, to your woman and to the world, and do what you can to give it today. Every moment waited is a moment wasted, and each wasted moment degrades your clarity of purpose.”