contextAction make a page in passing datamodel.data

Sorry if this has been asked before. Searched and cannot find a solution for the problem I have.

I'm trying to push a page to display the data from a dataModel. I am doing from a context menu. My research, I learned about creating a function for managing scope issues. But I've tired and haven't found a solution for the data. All solutions?

            ListView {
                id: sitesList
                topMargin: 50
                dataModel: sitesModel

                listItemComponents: ListItemComponent {
                    type: "item"

                    StandardListItem {
                        id: siteListItem
                        imageSource: "asset:///images/" + ListItemData.FuelBrand + ".png"
                        title: ListItemData.Location_Desc
                        description: qsTr("%1, %2, %3").arg(ListItemData.Site_Address1).arg(ListItemData.City_id).arg(ListItemData.Province_id)
                        contextActions: [
                            ActionSet {
                                title: "Station"
                                ActionItem {
                                    title: qsTr("Services")
                                    imageSource: "asset:///icons/ic_view_details.png"
                                    onTriggered: {
                                        siteListItem.ListItem.view.pushDetailsPage();
                                    }
                                }
                            }
                        ]
                    }
                }

        function pushDetailsPage() {
                    // Trying to get the data here and pass to page.
                    var page = sitesPage.createObject();
                    navPane.push(page);
                }
            }

There are a few strategies to successfully achieve what you want. I think it's the easiest way.

on the sites page, set the properties that you have:

Page {
    property string locationDesc
    property string description
}

And, in the list view page:

...
    ActionItem {
        title: qsTr("Services")
        imageSource: "asset:///icons/ic_view_details.png"
        onTriggered: {
            siteListItem.ListItem.view.pushDetailsPage(ListItemData);
        }
    }
...
function pushDetailsPage(data) {
    // Trying to get the data here and pass to page.
    var page = sitesPage.createObject();
    page.locationDesc = data.Location_Desc
    page.description = data.description
    navPane.push(page);
}

If you need to make complex initialization in the sites page when you set these properties, make an initialization function on the page of sites that accepts the data parameter and name in pushDetailsPage.

Tags: BlackBerry Developers

Similar Questions

  • How to make a page to refresh all data by default.

    I built my pages and make them putting the info, but when I go back on the page to another project, the information is still there. He is not back in default information. the same thing happens when I cancel a form and g to this form. any ideas? I use 4.x

    When you return to this page, you use a branch normally to get in this page and there you have the empty the cache option (put your page number).

  • is it possible to make a Web page expires? Is there a setting in dreamweaver or html text that will make a site Web do not load a page after a certain date?

    is it possible to make a Web page expires? Is there a setting in dreamweaver or html text that will make a site Web do not load a page after a certain date?

    You should probably give us more info on what you are trying to reach.

    I have Web sites that display information on the courses, with the possibility to register online. We do not want the announced course when their departure date has passed, so they are automatically removed from view. In this way, we have thousands of courses by year announced without worrying that the old courses are still on Web sites.

    To do this, the PHP and a database are used. Registration of database includes the date, which is verified by the query sent by PHP.

  • How to make a wipe 7 pass on my mac laptop el capitan

    How to make a wipe 7 pass on my mac laptop el capitan

    No need to do unless you work with classified government documents. It can take days to complete. Just do simple deletion, your data will be unrecoverable except by the most sophisticated software.

  • How can I make the page of form for the Yahoo host?

    How can I make the page of form for the Yahoo host?

    I guess you want a contact form that sends data to your e-mail account.

    1. Find out if your hosting plan supports PHP code and the PHP mail() function.
      If so, try this tutorial into 3 parts:
      ALT-Web Design & Publishing: sensitive Contact form with 3.2 Bootstrap and PHP (part 1)
    2. If your hosting plan does NOT support scripts, you will need to use a 3rd party like Wufoo.com service.  They host the form processing scripts on their own servers for you.

    Nancy O.

  • How to make a page on windows 7

    How to make a page on windows 7

    1. Press PRTSCN.

    2. Open Paint by clicking the Start button, all programs, accessories, and then click Paint.

    3. In the painting, on the Home tab, in the Clipboard group, click on paste.

    4. If you want to resize the image, on the Home tab, in the Image Group, click on resize and enter a new size in percentage or in pixels.

    5. Click on the paint button , and then click Save.

    It is also possible to capture the active window when you press PRTSCN.

    To capture an active window:

    1. Press Alt + PRTSCN.

    2. Open Paint by clicking the Start button, all programs, accessories, and then click Paint.

    3. In the painting, on the Home tab, in the Clipboard group, click on paste.

    4. If you want to resize the image, on the Home tab, in the Image Group, click on resize and enter a new size in percentage or in pixels.

    5. Click on the paint button , and then click Save.

    Notes

    • On some keyboards, PRTSCN might appear as PRTSC, print SCREEN, or a similar abbreviation.

    • Some laptops and other mobile devices that do not have a print screen button could use other combinations of keys, such as FN + Insert, to capture the screen. Check the manual that came with your laptop or device for specific instructions.

    You can also use another image editing program other then paint if you have installed.

  • What is the procedure how to make my system image backup and data through Windows NAS Server?

    I work the iMac with bootcamp for Windows 7 - Home Premium.

    I want to return to the system image and data etc. of the 'Windows Back up and Restore' to my Synology NAS (network attached storage). When I do the setting changes, I could not find the option to connect to the NAS, but have only the offer to connect to the external hard drive.

    (1) the 'Windows Back up and Restore' allows to connect to the NAS for the back of my files, in particular for the iamge system? If not, any other method to make the back upward, especially for the system image?

    (2) what is the procedure how to make my system image backup and data through Windows NAS Server?

    Original title: save the Windows image

    Backup to a network location is not supported by Windows 7 Home Premium. Do you need Windows 7 Professional or ultimate edition.

    http://Windows.Microsoft.com/en-GB/Windows7/where-should-i-save-my-backup

  • Smartphones blackBerry 8330 "is a problem in the attempt to make the page"

    On my BB 8330, this message keeps coming up for me "a problem occurred while trying to make the page" - I found an older post that suggests

    "Whetehr to check your browser supports java or not. Do the following-

    Go to Internet browser-> click on menu then Options-> browser Configuration-> check the JavaScript support and allow JavaScript popups. »

    I did and it did not help.

    Any suggestions/help would be appreciated (prefer not to load third party software something that should work without it).

    Thank you.

    Hi and welcome to the Forums!

    On the same page that you set javascript, you can also change how your BB browser identifies Web sites. Try to settle on IE or FF and see if that helps as well. There are many parameters various institutions - the best thing to do is to look through them the combination that best suits your situation.

    See you soon!

  • How to make a page go to a secure as https Server?

    How to make a page go to a secure as https Server?

    'S done it with your hosting provider. Nothing you can do in Muse to define.

  • Why the thumbnails do not reflect the changes that I make to pages?

    I'm working on a pdf file in Acrobat DC.

    I'm working on a page with all the hidden layers.

    If the thumbnail is blank

    When I show a layer it appears on the page.

    However, the thumbnail does not change.

    Why the thumbnails do not reflect the changes that I make to pages?

    Hi Jules,.

    The behavior is the same in Acrobat 11 as well. The thumbnails do not get updated until you close the document and reopen it.

    Kind regards

    Rave

  • CD is not compatible with XP, why? I can't pass the data information of my new HP with Vista professional in my other, older __Dell computers using XP iperating system. It makes the CD a bit useless.

    I don't understand why I can't pass data as a file in Quicken to my new HP computer using the CD of my old Dell computer with the XP operating system.  I have to use thumb devices to transfer data.  What is a reason that they cannot be compatible.

    Read the section on using disks of different CD players or format to ISO for older computers

    http://Windows.Microsoft.com/en-us/Windows-Vista/burn-a-CD-or-DVD

    If your computer is equipped with a CD or DVD burner, you can copy files to a recordable disc. This process is called burning a disc. By default, Windows Burns discs in the active file system format, but you can also choose to burn discs in ISO image format.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://Windows.Microsoft.com/en-us/Windows-Vista/disc-burning-frequently-asked-questions

    Why are there two different ways to format a disc?

    You can choose between the formats of live file system and mastered during the creation of a new recordable disc because each of these formats is used for different purposes. The default choice is the active file system because it is a more convenient way to create a disc. When you use a Live file system disc, files are copied to the disk immediately. When you use the ISO image format, the files are stored in a "transit zone" until you decide to burn the disc.

    When you use the system format active files with rewritable discs, such as CD - RW and DVD - RW, you can also erase unwanted files from a disc to recover space, which is not possible with mastered discs. On the other hand, mastered discs are more compatible with older computers, previous versions of Windows, and other devices such as CD and DVD players. For more information, see which CD or DVD format should I use?

    See you soon.

    Mick Murphy - Microsoft partner

  • Show hide columns generates error on the page if not found data

    Hello

    Has anyone ever encountered a situation where a page error when using the feature show hide column and no data is returned.

    My region to report is based on SQL and when calling at the start page or when restrictions are no match all all the data that appears is the message "No data found" by default. The method used, I pulled Carl Backstrom (RIP) application.

    < script type = "text/javascript" >
    function html_HideBasedOnCheckBox (pThis, pThat) {}
    if(pThis.Checked == true) {}
    html_ShowCellColumn (pThat);
    } else {}
    html_HideCellColumn (pThat);
    }
    }

    function getCellIndex (pRow, pCell) {}
    If (document.all) {}
    for (var i = 0; i < pRow.cells.length; i ++) {}
    If (pRow.cells [i] == pCell) {l_Count = i}
    }
    } else {}
    l_Count = pCell.cellIndex;
    }
    Return l_Count;
    }

    function html_HideCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_HideElement (l_Rows.cells [l_CellI]);
    }
    return;
    }

    function html_ShowCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_ShowElement (l_Rows [i]. Cells [l_CellI]);
    }
    return;
    }

    < /script >

    The attributes of HTML form elements is: onclick = "html_HideBasedOnCheckBox (this, this.value)" "

    The LoV for this box is static for a column.

    This set works very well if the data is returned. It must have something to do with the topics defined in the SQL code and therefore are not displayed when no data is returned. The code is then try to hide or something that does not exist.

    The part where he falls is during the setting of the variables:

    function html_HideCellColumn (pId) {}
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    ... and more specifically the last variable setting: l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    Does anyone know how I can get around this by using the method of SQL report i.e. Select col1 col2 "Column 1", "column 2" From myTable etc. or if it is possible to make up for it at the beginning that is

    If NO_DATA
    then
    dont_hide/display_any_columns that_dont_exist
    on the other
    var l_Cell = $x (pId);
    var l_Table = html_CascadeUpTill (l_Cell, 'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex (l_Cell.parentNode, l_Cell);

    for (var i = 0; i < l_Rows.length - 1; i ++) {}
    html_ShowElement (l_Rows [i]. Cells [l_CellI]);
    }
    return; ........

    ???

    See you soon,.

    Mike

    Hi Mike,.

    In fact, you can check the existence of the cell:

    var l_Cell = $x(pId);
    if (l_Cell)
    {
     rest of the code to hide the column
    }
    

    As long as l_Cell makes reference to a valid page element, then the if test passes and the rest of your code can work.

    Andy

  • Make Custom page read only according to

    Hi all

    Is anyway make a personalized page for some users readyonly? I know that we can define the rendering to false for each region, but I wonder if we have a property for the entire page.

    Thank you
    KK

    Hi KK,.
    What is a 11i or R12

    If it is R12, it is easy just by passing the region where you want to make read-only or to the entire page, pass the region of high level.

    If it's 11i, you have to copy paste the code example and call it from your application process once you've done the verification of the user.
    BTW, instead of the user check, create liability and assign this responsibility to the users, and check that the responsibility to avoid all hardcode next to user list.

    Check this thread and if you are not able to do, please update the question you face.

    How to make OA framework page Viewonly
    Single page ready
    or
    http://www.applikast.NET/technical/OA-FWK/Misc/making-an-OA-framework-page-ReadOnly

    Thank you

    With respect,
    Kali.
    OSSi.

  • Plugin SkillBuilders modal 2.0 with a touch of page-item - pass parameters

    Hi all.
    I have an employee table, which relates to a relationship 1: n with two tables: Emp_Tech_Fields and Emp_Kids.
    I created a form to update / insert data of the employee, and I want to add two modal pages: one for children and one for tech_fields. I think that this will be the way the more usable for this form.
    I created two page-item on this form buttons that open the respective modal pages with success, but I can not dynamically share the EMP_ID to filter the data in them.

    IV ' e downloaded to the http://apex.oracle.com/pls/apex/f?p=64921:1:6401028834215 example: comments / gu12est3
    Types of document is a report with a column of link that opens a modal with data filtering page, as it should.
    Employees (click on a link change) has two buttons: Kids, who open the modal form, but it does not filter and areas of technology, which is filtered hardcoded with EMP_ID = 1 (see the definition of dynamic action).

    As far as I understand it, this must be something quite simple and everyday, so I don't know why I have not found a way to do this. What Miss me?

    Any help will be greatly appreciated,
    Dovi.

    Hi Dovi,

    I took a look at your application and can see the link of your help for children and tech modal fields is not passing the session ID, this is why it asks you to log in again.

    Here is an example URL for your question, it is not tested however.

    f?p=&APP_ID.:20:&APP_SESSION.:::19:P20_EMP_ID:&P19_EMP_ID.::
    

    You need to change the page numbers of the pages and articles to match your page numbers. It's using the url defined statically in the plugin itself, I have also only done in an earlier version of the plugin, but I think the functionality is very similar.

    I hope this helps.

    Paul

  • Pass the data XML Captivate through a Widget

    Hi all

    I use widgetfactory API to create my setup.

    I have a flash file Widget that reads the XML data and passes the variables in Captivate.

    However, I can not set the text box with the variable that I analyzed the XML data.  Any suggestions are appreciated!

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

    package

    {

    widgetfactory Import. StaticWidget;

    Import widgetfactory.events.WidgetEvent;

    com.adobe.captivate.events import. *;

    com.adobe.captivate.widgets import. *;

    import flash.events. *;

    import flash.display. *;

    flash.net import. *;

    public class load_lang extends StaticWidget

    {

    override protected function enterRuntime (): void

    {

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov.text_00 = "This works very well.";

    var myXML:XML;

    var myLoader:URLLoader = new URLLoader();

    myLoader.load (new URLRequest ("languages.xml"));

    myLoader.addEventListener (Event.COMPLETE, processXML);

    function processXML(e:Event):void {}

    myXML = new XML (e.target.data);

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov.text_01 = myXML.slide [0] .textbox [1]; It does NOT work

    }

    }

    }

    }

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

    Hi osbornsm,

    Try the above suggestion of Jim, but if this does not work then what probably is the widget is trying to load the languages.xml but can't find it. You will need to make sure that it is placed in the output directory of the Captivate file published to operate. Even in this case, you will not be able to make it work when previewing the movie.

    Probably a better way to go about this would be the XML file into your SWF widget. In this way the widget won't need to load. This is how you would integrate it:

    package

    {

    public class load_lang extends StaticWidget

    {

    [Embed ("path-to-file/languages.xml", mimeType = "application/octet-stream")]

    private var BinaryData: Class;

    override protected function enterRuntime (): void

    {

    var byteArray:ByteArray = new BinaryData();

    var myXML:XML = new XML (byteArray.readUTFBytes (byteArray.length));

    Continue to the processXML() code

    }

    }

    }

Maybe you are looking for