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
Highlighted
Developer
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional
Accepted Solution

NavigationPane - Action Items from a central list?

I'm new to Cascades/NDK/C++, I've looked through samples and documentation but haven't found what I want to do.

 

Our app consists of many "pages" / screens for data entry. I'd like to use the NavigationPane method, and have an easy way for the employee to jump to a specific page. For instance, tapping the Page List button, then the full menu slides from the side into view, they choose the page there.

 

What I'd like to do is have one file that holds all my action items so that each page just pulls from there for the More Info, or even the whole ActionItem bar. Is this even possible? Any suggestions on where to start?

 

Hope I made this somewhat clear...

Retired
Posts: 138
Registered: ‎05-11-2012
My Device: Developer
My Carrier: Developer

Re: NavigationPane - Action Items from a central list?

You have looked at the sample apps - did you look at the stamp collector. This seems to be close to what you are trying to do - if you click on a stamp it brings up the page for that stamp.

 

Is this similar to what you are trying to do? If not can you provide more information.

 

Developer
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: NavigationPane - Action Items from a central list?

Thanks for the reply!

 

I'll try to do what I can to clear this up a bit. I'm working on our app (see a bit more on it here). Essentially, once the employee has selected a client to work with, there are 25-30 screens that contain the information. This will fluctuate over time, more will be added to the list, maybe reorganized. The ideal way we want to do this is under the "More" option from the Navigation Pane.

 

What I'm trying to do is avoid adding excessive code to each qml file containing the full list of ActionItems. So I was looking to prevent something like this:

 

    actions: [
        ActionItem {  
            title: ""
         },
         ActionItem {
             title: "Save"
         },
         ActionItem {
              title: ""
          },
         ActionItem {
             title: "Client Info"
             onTriggered: {
                 navigationPane.deprecatedPushQmlByString("evaluations/traditional/ClientInfo.qml");
              }
         },
         ActionItem {
             title: "House Info"
            onTriggered: {
                navigationPane.deprecatedPushQmlByString("evaluations/traditional/HouseInfo.qml");
             }
         }
     ]

etc.... and instead do something like this in each file:

 

    actions: actionItemArray.xml

with all the actionItems in the xml file. Then I don't have to recreate the ActionItems on 30 files every time they decide to change the order or add another one.

 

 

Hope this helps clear it up a bit!

 

Developer
Posts: 1,670
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: NavigationPane - Action Items from a central list?

perhaps take a look at the weatherguesser sample:

the main.qml has a TabbedPane with a WeatherPage where this WeatherPage was defined in another QML file.

 

try to use an extra QML file for your ActionItems - then you can use this QML inside other QML's

 

only an idea - didn't tried your use-case

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

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

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: NavigationPane - Action Items from a central list?

John, did you make any progress?

If so, we'd like to know the approach taken.

And if not we should revisit!

 

 

Developer
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)
My Carrier: Regional

Re: NavigationPane - Action Items from a central list?

I have not made any progress with this, though I haven't tried anything new as life has been fairly busy.

Developer
Posts: 284
Registered: ‎07-25-2008
My Device: Passport

Re: NavigationPane - Action Items from a central list?

I think you're running into one of the major problems with trying to do everything in declarative languages, namely that dynamic structure can be an exercise in frustration.

 

You might have more luck if you grab a reference to the ActionSet from the C++ side, and add the actions from there.  Thankfully, the Cascades API makes it very easy to do this.  Just make sure to set the "objectName" property for whatever UI component contains the ActionSet, and then call the "findChild<T>()" function from whatever contains it to get a pointer you can work with.

Retired
Posts: 138
Registered: ‎05-11-2012
My Device: Developer
My Carrier: Developer

Re: NavigationPane - Action Items from a central list?

Hi,

 

Just wondering if you had resolved your problem or were still needing some support.

 

Graham