Hi, 
I'm developing some simple custom component, and I'm facing a problem I 
cannot resolve and understand, so I will really appreciate any help.

I have this piece of code:

public void encodeBegin(FacesContext c) throws IOException {
        HtmlCommandButton b = (HtmlCommandButton) 
context.getApplication().createComponent(HtmlCommandButton.COMPONENT_TYPE);
      b.setValue("Click me");
      b.encodeBegin(context);
      b.encodeChildren(context);
      b.encodeEnd(context);
}

And with above code everything is great, the button renders and when I 
click it, the 

public void decode(FacesContext context) 

method is called... But. If I change HtmlCommandButton to HtmlCommandLink 
something strange happens. The link is created and renders as well, 
but when I click it, the decode method is not called at all.

Is there any difference between handlig those two components?
Thanks in advance!

-- 
greetings
Paweł Czerwiński

Reply via email to