To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
Hi Guys,I am not able to render © for copyright symbolI am setting value in Link caption AND Label value, but no luck.
That's because all HTML content is escaped in the client side.
You can override this behavior with Label, by using new Label("©", Label.CONTENT_XHTML); but no such feature for Links I'm afraid.
I think we should have similar constructors for most of the components and their captions, allowing the developer to decide if she wants to allow HTML content to be rendered.
Worth a ticket IMO.
You can't use HTML entities in captions, but you can use Unicode characters. You could just type it from your keyboard or use the Unicode codes quoted with [tt]\u[/tt]. For example:
TextField name = new TextField("\u00A9 Copyright");
In Label, you can use the HTML [tt]©[/tt] entity if you use the XHTML content mode. For example [tt]new Label("©", Label.CONTENT_MODE_XHTML);[/tt].