Problem to understand how the ParameterHandler works

I’m a newbie with IT Mill. I try to do a window, where I could select via link an item and show the item’s id in a another window. In html it would be as simple as:
<a href=secondwin.jsp?item=123>click here and secondwin.jsp would do <%=request.getParameter(“item”)%>.

In It Mill I have done a ParameterHandler example, but I don’t understand how that should work. I get the correct answer, if I use Label as result, but if I take the answer to String, I don’t get result. Here’s what I mean.
I call this example like: https://weblogic:7020/test/test?test=123

And the result is :
'123’this from handle parameters
nullthis is from str

System.out says: test=‘123’

And the code is:

public class Test extends com.itmill.toolkit.Application implements  ParameterHandler {
	private final Label context = new Label();
	private String text =null;
	public void init() {
	    final Window main = new Window("ITMILL");
	    Label textlb = new Label(this.text+"this is from str");
	    public void handleParameters(Map parameters) {
	        for (final Iterator i = parameters.keySet().iterator(); i.hasNext();) {
	            final String name = (String);
	            final String[] values = (String[]
) parameters.get(name);
	            String v = "";
	            for (int j = 0; j < values.length; j++) {
	                if (v.length() > 0) {
	                    v += ", ";
	                v += "'" + values[j]
 + "'";
	            if (name.compareTo("test")==0){
	            	context.setValue(v+"this from handle parameters");

What didn’t I get or what should be the right way to do this?

Thanks !

Your problem is that the init is called before urihandler and you set the second label (presenting the String value) there.

The urihandler works correctly and updates both the string and the label, but the string value is not automatically updated to label (‘textlb’) . You have to do that separately as you do with the ‘context’ label.