Specifying visibility in meta tabs

32 views
Skip to first unread message

Thomas Abraham

unread,
Feb 15, 2017, 7:43:49 AM2/15/17
to AribaWeb (aribaweb.org)
My application.oss has sections like this:

@module=Administration {
    label:$[a002]"Administration";
    needsForm:true;
    component:MetaTabs;
  
    visible:${modules.administration.hasPermissionNames(["Administration"])};
  
    layout {
        bindings: { vertical:true; }
        @layout=UserManagement  { component:UserManagement }
        @layout=SystemConfiguration   { component:Configuration }
   }

I would like to control the visibility of components under layout. For eg, I'd like to show SystemConfiguration only to those users who have a specific permission. But

  @layout=SystemConfiguration   { component:Configuration;visible:${modules.administration.hasPermissionNames(["ConfPerm"])};}

does not work. The layout is being passed to MetaTabs, which seems to call BaseTabSet. BaseTabSet does not take visible as an attribute for any tab.

Is there any way out?

Frantisek Kolar

unread,
Feb 18, 2017, 1:18:18 AM2/18/17
to arib...@googlegroups.com
Hi Thomas, 

Are you sure  your expression is evaluated correctly?  What if you hard code directly false?
Because what it does internally it will retrieve all declared layouts and remove all that have visible false.

There is a example AtIssue with tabs and if you pass in visibility property it works.

module=model.Issue {
rank:0;
trait:SearchDetail!;
layout=InspectStack {
object {
@layout#Tabs {
bindings: { contentClass:"tabContentWrapper noPadding"; }
@layout=Notes#Form { zonePath:Notes; visible:false }
@layout=Watchers#Stack { }
}
}
}
field=notes { class { bindings: {class:"noBox scrollTableWrapper"; title:null } } }
}

-fk




--
You received this message because you are subscribed to the Google Groups "AribaWeb (aribaweb.org)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aribaweb+u...@googlegroups.com.
To post to this group, send email to arib...@googlegroups.com.
Visit this group at https://groups.google.com/group/aribaweb.
For more options, visit https://groups.google.com/d/optout.

Thomas Abraham

unread,
Feb 18, 2017, 9:22:00 AM2/18/17
to arib...@googlegroups.com
Hard coding works fine....the expression does not get evaluated. I put a break point and tried to debug it.

To unsubscribe from this group and stop receiving emails from it, send an email to aribaweb+unsubscribe@googlegroups.com.

To post to this group, send email to arib...@googlegroups.com.
Visit this group at https://groups.google.com/group/aribaweb.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "AribaWeb (aribaweb.org)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aribaweb+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages