first to all this new thread is related to this one: Updating certain view programmatically from a JMS listener class Now, additional to this lack of server-push feature, I have other problem with a simple calculated property which I have in the same transient module view. Here is one version (I have tried several ways) for my transient view:
@View(members="Counter [counter], readItems")
public class TrackIt {
@OneToMany
@ReadOnly
@OnSelectElementAction("TrackIt.checkSelectedReadItems")
private Collection<ReadItem> readItems;
public int getCounter() {
return readItems!=null?readItems.size():0;
}
public Collection<ReadItem> getReadItems() {
return readItems;
}
public void setReadItems(Collection<ReadItem> readItems) {
this.readItems = readItems;
}
}
So, the ReamItem is the entity where I'm persisting the received objects by the JMS listener. So, as I'm using simple manual refresh of the view, I was hoping to see the result of the calculated counter property at first and also after each manual refresh, but I'm not getting any value for this property just a blank and empty space after the Counter label (btw, the collection is showed fine). I have tried going into the DB with the persistent manager and getting the counter from the ReadItem entity directly into the calculated property but did not work, I also tried using a Default Value Calculator and it no works. But the funniest thing here is that I changed the getCounter() to only return a simple int like 100, but it does not work too.
So, any tips on this calculated property into a transient view could be nice.
Thanks in advance,