Wednesday, October 31, 2012

how to pass a String[] array in the declarative UI

I have an own Button class which has a method
void setDisplayPermissions(String[] displayPermissions)
where it is specified for the button which are the required permissions needed for showing the button.

In the example bellow i can set that the button should be shown only when the user has the FINISH_ORDER function right.
<a:Button ui:field="finishButton" displayPermissions="{Rights.getFinishOrder}"/>

(Rights is an application specific class where there are getters defined for all the function rights names from the application)

Now I'd like to show this button when the user has FINISH_ORDER or CANCEL_ORDER function right.
Can anybody suggest me how to do this (elegantly) through the declarative UI within a .ui.xml file?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/3-mjzs9lD10J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment