Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Developer
lew
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

ActionItem visibility

Hi,

 

I've been trying to dynamically hide/unhide an ActionItem but the 'visible' property doesnot exist for ActionItem...only 'enable' exists which simply grays out the item. 

 

Has anyone been able to hide/unhide action items?

 

It's a common UI usage on older BB devices to only display meaninful context menus when you select an item in a list for example:

if currently selected item has an address, show the MAPS menu (action item)

but if no address exists, do not show the MAPS menu (action item) as it is useless

 

thanks,

 

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: ActionItem visibility

Hi there,

 

Have you tried removingthe actionItem conditionally instead?

https://developer.blackberry.com/cascades/reference/bb__cascades__page.html#removeaction

 

Martin

 

Please use plain text.
Developer
Developer
lew
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: ActionItem visibility

Haven't tested that one! Working on that now :smileyhappy: 

 

Any hint on how to use this in QML though?

Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: ActionItem visibility

removing / adding from QML doesnt work yet

 

ActionItems and Tabs don't have a property visible - only enable true/false

(and enable false only dimms the icon not the text)

 

there are Issues reported by me in IssueTracker - please vote

BBTEN-252 and BBTEN-251

 

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
Developer
lew
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: ActionItem visibility

thanks! i've up-voted your feature request.

 

i will stick with enable/disable for the time being until this is resolved.

 

hope that a rim representative here pushes this feature for the next release!!!

Please use plain text.