cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Action Order variable using EL?

Yousuf_Nejati
Star Contributor
Star Contributor

Hi,

I have a presumably simple question.

I'd like to set the Action Order value (under_ Listing and_Views / Content Views / MySearchContentView / Enablement_) using an EL which will be based on a conditional.

Specifically, #{currentUser.isMemberOf('someGroup') ?_ this.setActionOrder(-1000) : this.setActionOrder(1000)_}.

This would be done in the "Custom EL expressions" text area.

I'm new to EL but very familiar with Java, what would be the proper way to do this? The closest thing I've come upon can be found here: http://community.nuxeo.com/api/nuxeo/release-7.2/javadoc/org/nuxeo/search/ui/seam/SearchUIActions.ht...

Thank you,

Yousuf

1 ACCEPTED ANSWER

Victor_Sánchez
Confirmed Champ
Confirmed Champ

Hi Yousuf,

in the Action Extension Point descriptor you can find order attribute as integer, no EL managing. I think, your changes of any Action order value in WebActions will be only in Event Context of Seam. An idea, if you need change the action with a stateful order, you should change the action into ActionService descriptor (that it is the Registry after deploy action contribution), because the action is always cloned from descriptor definition from service. I think getActions() and getActionRegstry() may be an available methods to get and update.

Hope helps!

Regards, VS!

View answer in original post

3 REPLIES 3

Yousuf_Nejati
Star Contributor
Star Contributor

I belive I may have found it

Victor_Sánchez
Confirmed Champ
Confirmed Champ

Hi Yousuf,

in the Action Extension Point descriptor you can find order attribute as integer, no EL managing. I think, your changes of any Action order value in WebActions will be only in Event Context of Seam. An idea, if you need change the action with a stateful order, you should change the action into ActionService descriptor (that it is the Registry after deploy action contribution), because the action is always cloned from descriptor definition from service. I think getActions() and getActionRegstry() may be an available methods to get and update.

Hope helps!

Regards, VS!

Thank you, Victor.