|
|
|
Re: Core expressions not evaluated at runtime [message #1630956 is a reply to message #1630655] |
Mon, 23 February 2015 13:59 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Hi,
On 23.02.15 11:07, Dirk Fauth wrote:
> Hi,
>
> I have created an example with several use cases for the evaluation of
> core expressions. Within a menu that is opened, everything looks fine.
> But in part toolbars, trimbars and the main menu, the core expressions
> are not evaluated. For the main menu it only happens initially, but it
> is not updated on changes. For the trimbars and the toolbars not even
> the initial state is set correctly.
>
> I face the same issue in Eclipse with SWT aswell as in e(fx)clipse. No
> updates of the already visible toolbar/menu items.
You need to request an update since Luna. The constant polling code had
been removed.
>
> In e(fx)clipse I even get an exception if the core expression evaluates
> to true on modifying the context value:
>
> Exception in thread "JavaFX Application Thread"
> java.lang.IllegalArgumentException: Children: duplicate children added:
> parent = HBox@16ab1e8[styleClass=container]
I'm not sure I get understand what's going wrong here or what you describe.
>
> Is this a known issue? Should it work or are core expressions not
> supported on the toolbar/main menu level?
>
They should be supported anywhere but as I said you need to request them
to be reevaluated. There are (common) situations where they are
reevaluated by default.
> IIRC the main menu is re-rendered constantly. At least that was the case
No this was pre Luna
> in early versions of e4. Has this changed? And if so, how could the main
Yes
> menu for example listen for such updates? I have seen that there are
Yes you need to send
eventBroker.post(UIEvents.REQUEST_ENABLEMENT_UPDATE_TOPIC,
UIEvents.ALL_ELEMENT_ID) which reevaluates all elements.
> event topics for core expressions, but it seems nobody triggers them.
>
The enablement stuff is at BaseItemContainerRenderer and other renderers
depend on it.
Tom
|
|
|
Powered by
FUDForum. Page generated in 0.03209 seconds