Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
ITextItemInstance.getText() always returns null (v2.5.0)
Cain
BIRT version 2.5.0.
I have a custom event handler set up so I can format the text being applied to a HTML text label.
The code that sets the text for the first time looks something like this:
TextItemHandle handle = this.elementFactory.newTextItem(null);
handle.setContent("Foo");
handle.setContentType(DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML);
Later on in the formatter code:
public void onRender(ITextItemInstance textItem, IReportContext reportContext)
{
textItem.setText(textItem.getText() + "Bar");
}
The problem is the call to textItem.getText() always returns null. If I just comment out the code in the onRender() method then "Foo" will show up in the text label so obviously I'm setting the text correctly.
Is there something that I'm missing or doing wrong?
Find more posts tagged with
Comments
There are no comments yet