A programmers start page

You can use cl1p.net as a start page for programmers. As a web application developer I have to access a lot of machines in the office. Most of them are by IP and some have long cumbersome names. I also have to access the web apps that I’m working on from different browsers.

My solution was to use cl1p.net to make a simple HTML start page. You can see it here.

Create your own, just follow these steps.

1. Pick a URL that starts with cl1p.net. ( i picked http://cl1p.net/robs/startpage )

2. In the Textarea write the HTML. I just use a simple table and links, but you could use any HTML you wanted.

3. Add a password, change the keep for to something longer then a week and Click save, you will see a message saying (Page was saved).

4. In the top right hand corner you see a link http://cl1p.net/robs/startpage. Click on that link to see the rendered HTML.

5. What happened here is that you are now looking at http://d.cl1p.net/robs/startpage. This will only show you the raw data, and since its HTML we see an HTML page.

6. Set http://d.cl1p.net/robs/startpage as the homepage.

Bam! There you go. A programmers start page.

Writing Icefaces components – part 1

I work for icesoft on the component team, and I am just about to write a new component for a company that sells hand wheels and a lot of other industrial kits, and I thought I would
walk you through the process.

The Slider Control Part 1

I’m going to be implementing script.aclo.us slider control in icefaces.

Looking at the slider example in the script.aclo.us download I see that it requires the following HTML.

So the first step will be to create a new component that will render that HTML.

So fire up your editor of choice and lets get started.

The component class

Silder.java defines the properties or model of this component. This is where you could put things
like style and styleClass for example. But for now its going to be blank. I just want to get the framework in
place first.


package com.icesoft.faces.component.slider;

import javax.faces.component.UIInput;

public class Slider extends UIInput {

public static final String COMPONENET_TYPE = "com.icesoft.faces.Slider";
public static final String DEFAULT_RENDERER_TYPE = "com.icesoft.faces.SliderRenderer";
public static final String COMPONENT_FAMILY = "com.icesoft.faces.SliderFamily";

public Slider() {

public String getFamily() {

public String getRendererType() {


Again this is just a skeleton to get started.

Up next. The renderer. Where all the magic happens. Again like the first step we are just getting started
so all I’m going to do is output the HTML show above.


package com.icesoft.faces.component.slider;

import com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer;
import com.icesoft.faces.renderkit.dom_html_basic.HTML;
import com.icesoft.faces.context.DOMContext;

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

import org.w3c.dom.Element;

public class SliderRenderer extends DomBasicRenderer {

public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) {
DOMContext domContext = DOMContext.attachDOMContext(facesContext, uiComponent);
if (!domContext.isInitialized()) {
Element root = domContext.createRootElement(HTML.DIV_ELEM);
Element slider = domContext.createElement(HTML.DIV_ELEM);

Now we need a tag for out JSP. Since we don’t have any attributes just yet its going to be simple.


package com.icesoft.faces.component.slider;

import javax.faces.webapp.UIComponentTag;

public class SliderTag extends UIComponentTag {

public String getComponentType() {
return Slider.COMPONENET_TYPE;

public String getRendererType() {

Adding to faces-config.xml

We need to tell icefaces about this new component. Add the following to the faces-config.xml.



Creating a TLD

This part here is a bit strange. You need to create a tld file, Then you need to put the tld file in a jar. and
include it in  your web application lib directory.



Slider Tag

There you go! Step 1 is complete.