Hi Gerton,
This actually sounds like a bug - an Actionbar wasn't really aimed to be used
in detail sub-apps so unfortunately we missed one essential thing about it:
whether there are actions configured for a/b or not - it stays collapsed. And
unfortunately it is quite hard to override. However, what you could do is the
following:
extend DetailSubApp class and add the a method that would traverse view's
components searching for Actionbar:
[code]private void actionbarAvailabilityHack(ComponentContainer cc) {
Iterator<Component> it = cc.iterator();
while(it.hasNext()) {
Component c = it.next();
if (c instanceof Actionbar) {
Actionbar actionBar = (Actionbar)c;
if (actionBar.getSections().size() > 0) {
actionBar.removeStyleName("stub");
actionBar.setOpen(true);
}
} else if (c instanceof ComponentContainer) {
actionbarAvailabilityHack((ComponentContainer)c);
}
}
}[/code]
Override start() method of your sub-app and call that "hack" method from it:
[code] @Override
public View start(final Location location) {
View view = super.start(location);
actionbarAvailabilityHack(((ComponentContainer)view.asVaadinComponent()));
return view;
}[/code]
This seems to do the trick.
Meanwhile I'll create the ticket that would conduct the same logic gracefully.
Regards,
Sasha
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=fc2f457d-b82d-4d3f-a392-16f49e24c56f
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------