How can I create a custom tag in Ivy
Hi Ivy Team, I'm managing to create a custom tag in JSF. But it seems not work. Do I need to do something more ?
This is my custom class
<pre><code>
@FacesComponent(createTag = true, tagName = "helloComponent", namespace = "http://example.com/tags")
public class HelloComponent extends UIComponentBase {
@Override
public String getFamily() {
return "Greeting";
}
@Override
public void encodeBegin(FacesContext context) throws IOException {
String message = (String) getAttributes().get("message");
ResponseWriter writer = context.getResponseWriter();
writer.startElement("p", this);
writer.write("Messageeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee: " + message);
writer.endElement("p");
}
}
</pre></code>
This is my xhtml view :
![alt text][1]
[1]: https://image.prntscr.com/image/z_a0JoQIT5q23ffoiZpVzg.pnghttps://image.prntscr.com/image/maP26toeQ5W6hVl4kanc3g.png