Hello and big respect to your work. i really like it
But. I have some problems with adding items to a list dynamicly.
This is the xml definition of my list:
<scrollpane style="layout:inlinelayout(false,fill);padding:0">
<list id="logList">
<_renderer><![CDATA[
<listitem>
<container style="layout:inlinelayout(false,fill)">
<text> ${msg} </text>
<text class="info"> ${date}</text>
</container>
</listitem>
]]>
</_renderer>
<_items>@{logs}</_items>
</list>
</scrollpane>
Well, when adding items to this list caused by some logging-events, it sometimes happens that the xml-parser throws an illegalArgumentException:
>> Uncaught exception java/lang/IllegalArgumentException: Unexpected end of file.
or
something like invalid tag name. then the item is not drawn correctly.
The code for adding items looks like this:
public void addLogEntry(LogEntry entry){
// logs.addElement(entry);
int size = logProvider.countItemValues(PROPERTY_LOG_ENTRIES);
if(size > 5)
logProvider.removeItem(PROPERTY_LOG_ENTRIES, getLastItem(PROPERTY_LOG_ENTRIES));
logProvider.addItem(PROPERTY_LOG_ENTRIES,entry,getFirstItem(PROPERTY_LOG_ENTRIES), false);
}
i think its because the addItem-method is called to rapidly but i hope u can help me...
greetz