Pass data to list to the page navigation item

Hey all, been a problem trying to transmit data to a list item selected to a page which I am pushing by a NavigationPane.

My list contains a lot of elements, each with a property that contains a url. When an item is selected, I need a new display to be pushed with a component WebView that inherit from that url and display the Web page.

Here's my list qml file:

import bb.cascades 1.0

TabbedPane {
    showTabsOnActionBar: true
    Tab {
        title: qsTr("List")
        NavigationPane {
            id: navigationPane
            Page {
                property string selectedItemUrl
                id: tab1
                Container {
                    layout: DockLayout {
                    }
                    //topPadding: 70
                    ListView {
                        objectName: "list"
                        listItemComponents: [
                            ListItemComponent {
                                type: "item"
                                FeedListItem {
                                }
                            }
                        ]
                        onTriggered: {
                            var selectedItem = dataModel.data(indexPath); //get data of selected item
                            var page = webView.createObject();
                            page.webUrl = selectedItem.permalink;
                            navigationPane.push(page);

                        }
                        attachedObjects: ComponentDefinition {
                            id: webView
                            source: "PostWebView.qml"
                        }
                    }
                    ActivityIndicator {
                        objectName: "indicator"
                        verticalAlignment: VerticalAlignment.Center
                        horizontalAlignment: HorizontalAlignment.Center
                        preferredWidth: 200
                        preferredHeight: 200
                    }
                }
            }
        }
    }

And here is my file qml for the page with the Web view:

import bb.cascades 1.0

Page {
    property string webUrl
        ScrollView {
             scrollViewProperties.pinchToZoomEnabled: true
             scrollViewProperties.scrollMode: ScrollMode.Both
             Container {
                 layout: StackLayout {
             }
            WebView {
                id: webView
                url: webUrl
            }
        }
    }
}

As you can see I have retrieve the data of the list item selected, create the view, assign a string property in the Web view page to the url property of the data item and push the new view.

What exactly am I doing wrong? Any help would be appreciated, thanks!

Thanks for the tip about debugging right through it.

I found and corrected a small error in my code that does the job, but I also noticed something.

I noticed that the WebView component has been initialized before I had the chance to assign a value to the property in the chain of the WebView qml file. After executing this line.

"var page = webView. createObject ();"

It seemed as if the WebView had already been created, and I had not had the opportunity to give my url.

But this line then runs

"page.webUrl = selectedItem.data.permalink;

and it seemed to reset the component WebView so that he could take my value.

Hard to explain, but works in all cases.

Thank you!

Tags: BlackBerry Developers

Similar Questions

  • Popup before the page navigation

    Hello.

    I'm showing a popup before I have a navigation page. The popup is designed as a loading screen with and animated GIF.

    There is a button on the screen, when you click on it it should show the popup and then make navigation. (If the window is displayed until the next load of the page, the navigation link in the taskflow bacuse calls several methods between the two screens)

    First tried to use the ShowPopupBehaviour, which I discovered was not possible because he cancel the action of the button when encountered.

    Then I tried to do a program like this:

    public String cb1_action() {}
    FacesContext context = FacesContext.getCurrentInstance ();

    PopupUtil.invokePopup (p1.getClientId (context)); same as popup.show (hints)


    context.getApplication () .getNavigationHandler () .handleNavigation (null, "next_method_in_taskflow", context);

    Returns a null value.
    }

    However, it does not, since the popup is not showed.

    The question is, how to display the pop-up window before the page navigation is performed.

    TIA

    TIA, please tell us your jdev version.

    Your use case is best done using the #027 examples (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/27-long-running-queries-169166.pdf) of http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

    Timo

  • JavaScript doesn't work is not on the page navigation

    Hello

    I have a manual tabular presentation on the emp table. There is a javascript function that calls for the deptno column change. If deptno is RESEARCH (20), then it turns off the field for this employee hiring date.


    The same function is called on page load using the threshold:

    $("[name=f04]').change ();


    It works fine when the page is loaded for the first time. When I navigate to see the next set of rows (for example, 16 to 30) then the javascript code does not work.


    An example can be seen on apex.oralce.com:

    https://Apex.Oracle.com/pls/Apex/f?p=30264:28


    Workspace: apex2014

    Username: forum

    Password: abc123

    Application: 30264 Dev2

    Page: 28

    Can someone explain why it behaves like this?

    Thank you

    ZKay wrote:

    I have a manual tabular presentation on the emp table. There is a javascript function that calls for the deptno column change. If deptno is RESEARCH (20), then it turns off the field for this employee hiring date.


    The same function is called on page load using the threshold:

    $("[name=f04]').change ();


    It works fine when the page is loaded for the first time. When I navigate to see the next set of rows (for example, 16 to 30) then the javascript code does not work.

    Can someone explain why it behaves like this?

    This occurs because the function is called only once the page loads, and therefore affects only the lines that existed when the page is initially rendered. Page navigation performs a partial page of AJAX (PPR) refresh that completely replaces a set of lines of form (including their properties dynamically applied) with a new series with different properties. It is necessary to apply the function whenever a new set of lines is displayed. The best way to proceed is to call the function using an dynamic after Refresh with a dynamic range action:

    Event: After refresh

    Selection type: Region

    Region:

    Action: Run the JavaScript Code

    Scope of the event: Dynamics

    Fire on Page load: Yes

    Code:$('[name=f04]').change();

    Note that rows 13 & 18 in your function cause errors of execution. As I do not understand the purpose of these that I commented on them in order to demonstrate the dynamic action solution:

    function test2(pThis){  // orpheus4192
      var v_item_value = pThis.value;
      var v_hiredate_item = $(pThis).closest('tr').find('td[headers=HIREDATE] input[name=f05]');
      var v_hiredate_button = $(pThis).closest('tr').find('td[headers=HIREDATE] button');
      var currIndex = $('select[name="'+pThis.name+'"]').index(pThis);
      var currRow  = currIndex+1;
    
        //alert(pThis.name);
      if ( v_item_value == '20' ){
          v_hiredate_item.prop('readOnly',true);
          v_hiredate_button.prop('disabled',true);
    
          //document.getElementById("f08_"+[currRow]).disabled=true;
      }
      else{
          v_hiredate_item.prop('readOnly',false);
          v_hiredate_button.prop('disabled',false);
          //document.getElementById("f08_"+[currRow]).disabled=false;
      }
    }
    

    Things are not helped by the mixture of techniques here. The code would be easier to understand and maintain if a coherent approach was followed. It is recommended to always use jQuery to select and manipulate items, then select the items of dynamically across the table from the declarative mode headers attributes, rather than trying to understand the absolute values of ID from the control of the name and line numbers. It's much more intuitive, generally requires less code and is waterproof later insertions and changes in the order of the columns. Potential problems are only the changes to the control type or the column alias (because the latter is generally required in the selector), but these changes are likely to occur less frequently.

    Do not forget that to get the headers consistent and understandable static ID selectors must be applied manually to the IR columns in APEX 5.0...

  • Why firefox 15 displays the hex of size for the html data that make up the page?

    Windows 7, 32-bit
    Firefox 15.0.1 update Friday
    Java 1.7.0_07 Friday update

    Management forced a Java Update and restart on Friday. When Firefox started it auto-updated V15.0.1. He had problems immediately; the previous session tabs disappeared all and any page with Flash no longer worked (everything was OK before the two updates).

    In the recommendations, I created a new profile, copy only on bookmarks and files with name of user/authentication of the previous profile. When manually reopen the necessary tabs, pointed out that any Sonicwall firewall and Panasonic Netcam both display only a blank page with one or more hexadecimal numbers on it.

    Efforts to repair since included completely remove Firefox, the plugin Flash and current Java to run in safe mode, disabling all extensions/plugins, running in a completely default new profile with nothing carried over, try with and without hardware acceleration, etc. The behavior does not change. It does not matter if I go via http or https for devices that support both.

    JavaScript IS enabled, and the script _no_ blocking is in place; JavaScript works on other sites that use it.

    IE9 on the same PC works fine, so it's apparently not a system problem

    Looking at the page source shows that hexadecimal numbers are the length of the data in the row or the piece of HTML code, including the following javascript code. The Sonicwall sets up a larger number (2ea) on the line of the display source page that corresponds to the size in bytes of the code in the following lines.

    The Panasonic apparently sends the length of the data in each row if it provides a hexadecimal number for each line of HTML in the source display.

    What would make Firefox interpret the data incoming size as displayed, but only for certain pages or peripheral? I can visit other sites that have javascript and they work; a source of these pages view shows all the lines with just a hexadecimal number.

    view source example of Sonicwall (between the = lines); everything you see on the screen is the "2ea" in the upper left corner

    =

    2ea
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    	<meta name="SonicWALL Administrator" content="Copyright 2004 (c) SonicWALL, Inc. All rights reserved.">
    	<title>SonicWALL - Authentication</title>
    	<meta name="id" content="auth" >
    	<script type="text/JavaScript">
    	<!--
    	top.location.target="_top";
    	if (window.location.target != "_top") {
    		top.location.href=window.location.href;
    	}
    	var savedPwd = "";
    	function onPageUnload() {
    		window.name = "";
    	}
    	window.onunload=onPageUnload;
    	// -->
    	</script>
    </head>
    <frameset rows="*,1">
    	<frame src="auth1.html" name="authFrm" noresize scrolling="no">
    	<frame src="emptyView4.html" name="authTgtFrm" noresize scrolling="no">
    </frameset>
    </html>
    =====
    
    View source sample from the Panasonic; the blank lines are displayed as such in the view source screen.  All you see in the browser window is the series of hex numbers separated by a space on the same line.
    
    =====
    0
    
    3b
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
    
    8
    <HTML>
    
    7
    <HEAD>
    
    28
    <META HTTP-EQUIV="expires" CONTENT="0">
    
    2e
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    
    35
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    
    24
    <META NAME="robots" CONTENT="none">
    
    30
    <META NAME="robots" CONTENT="noindex,nofollow">
    
    29
    <META NAME="robots" CONTENT="noarchive">
    
    15
    <TITLE>Start</TITLE>
    
    8
    </HEAD>
    
    3d
    <FRAMESET border=0 frameSpacing=0 rows=30,8,* frameBorder=0>
    
    4c
    <FRAME name=bar src="CgiTagMenu?page=Top&Language=0" scrolling=no NORESIZE>
    
    3c
    <FRAME name=hrbar src="BarFoot.html" scrolling=no NORESIZE>
    
    27
    <FRAME name=body src="Top?Language=0">
    
    c
    </FRAMESET>
    
    9
    </HTML>
    =====
    

    Try to start the computer in safe mode Windows with network support (on the startup screen, press F8) as a test to see if it works better.

  • Prevent validation when the page navigation

    I use Jdev 11.1.1.7.0.

    I have a jspx page that has an empty form.

    But when I want to leave the page without entering anything, I get the form validation error messages.

    How can I prevent the validation error without worrying if the form has input values?

    Set the immediate property of the component of the navigation (link... button) to 'true '.

    Timo

  • Why is my data merge going off the page?

    After playing with the merging of data for a bit today, everything is working except that rather than start a new page when there isn't any room left on the first page, the next record will just outside the margin down and overwhelmed the edge of the page itself. What I don't see? I only use sample data at the present time, with 4 records. There is place at 3 on a page.

    Several records per page fusion is bug. One of the most important is the Preview button. If you used the Preview button, most likely the model is watered.

    Try to create a new model and perform the merge without the preview or cancel immediately after using it. You can usually copy the pictures from the old model without a problem, rather than having to make them again.

  • Display a column of data in database in the page header?

    Hello

    If I wanted to display the data in a record from database in the title of the page what would you call this variable in the APEX?

    Hi Rambo79.

    Edit your page.

    in respect to your name of the element between & and.

    for example.
    If you go get record to the point of saying P9_ITEMNAME

    then in the page header

    put title & P9_ITEMNAME.

    Hope this helps you.

    Kind regards
    Jitendra

  • Get the date of execution and the pages appear at the top of a BI answers report

    Hello

    I'm trying to get the page number should appear at the bottom of each page.
    I must say for example. Page 2 of 10 pages.


    I'm also trying to get the execution date to show up at the top of each page.


    Thank you

    Sally

    Hello

    For the date, go to 'Results', then change the subject of the title and select "Show Date" in unrolling time began.

    I don't know what you mean with the number of pages. You try to export your analysis?

    Thank you
    J.

  • How to display the list on the page all?

    I have a 1 page. In this 1 page, I have a list box. This list to contain three region list.
    each list is a page (page 2, page 3, page 4). When click on any list redirect to the corresponding page, but the region from the list on page 1 does not appear when I redirect page 2, 3 or 4.

    How to display the page list all the 2,3,4?

    SKUD.

    Hello

    create the list in page zero and give the State, saying that all pages will be displayed..,.

    or

    GoTo
    Home > Application Builder > Application xxx > shared components > list of commitments

    Here you can set new pages where you need to see your list

    Kind regards
    Little Foot

  • Why your listing on the page isn't launched everytime I open Firefox? Very annoying!

    Why the card layout is launched whenever I open Firefox? He reads all of my plugins are up to date.
    It's driving me crazy!

    Hi, your Firefox is not kept up-to-date. Please download the latest version on https://www.mozilla.org and tell me if you still have the problem.

  • If necessary, scroll to the same position after the page navigation

    Hello

    I have a use case where I have an af:table and a full line. Now, when rolls the user down to a particular rank and click on to access the different page (DrillDown). Now when the user returns to the page, the scroll of the table position must be kept. As if I clicked on the 5th row in a range displays, it should be displayed as the 5th in the user interface.

    I use Jdev 11.1.1.7

    Please let me know if you need more details.

    Kind regards

    Chick.

    You can't possibly maintain accurate scrolling position (if I understand your question)

    As an alternative, you can modify your table to use paging: https://blogs.oracle.com/jdevotnharvest/entry/table_pagination_with_jdeveloper_11

    Dario

  • How to use the carousel for the page navigation in the Page of Index

    Hello
    I want that the componet carousel for the Index Page.Each carouselItem should have a click Image.When on the image that he must break into a new appropriate pages.

    Kind regards
    Tom

    Hello
    Follow this procedure,

    1.Premier, create a view object with imageURL and pageName as its attributes,
    2. drag and drop the object from view of the DataControl in Jspx page
    3 inside of the carouselItem, drag and drop the af: commadImageLink
    4. inside of the commandImageLink do drag a setActionListener and bind the item.pageAction with a property in the managed bean,
    5. in the commandImageLink property inspector.
    In icons, give #{item.imageURL} and Action link it to a method in the managed bean that method must return the page action that is taken by the setActionListener

    Now run the Application

    Kind regards
    Felix

  • Local service of custom data not available in the page template

    Hi guys,.

    I created a custom service that is return of Image in response as shown below:
    public void GetImage
    Producer = config.getProducerImpl () (producer);
    String capText = producer.createText ();
    m_binder.putLocal ("capText", capText);
    BufferedImage bi producer = .createImage (capText);
    m_binder.setContentType("image/JPEG");
    m_binder.m_contentType = "image/JPEG";
    AA ByteArrayOutputStream = new ByteArrayOutputStream();
    Wrapper DataStreamWrapper = new DataStreamWrapper();
    Wrapper.m_dataType = "image/JPEG";
    Wrapper.m_clientFileName = "image.jpg";
    ImageIO.write (bi, "jpg", aa);
    wrapper.initWithInputStream (new ByteArrayInputStream (aa.toByteArray ()), aa.toByteArray () .length);
    This.m_httpImplementor.sendStreamResponse (m_binder, wrapper);
    }

    I call this service into the page as a template below:

    & lt; img src = "http://localhost/ucm/idcplg?IdcService=getJcaptchaService" / & gt;

    & lt; input type = "text" name = "capText" value = "<!-$capText - > ' / & gt;"


    <!-$capText-> capText value is empty here. It is not available here.

    Please suggest how capText value may be available in the page template.

    Thank you

    Your custom class must extend a class of Service. Then use this line of code to access the value of the variable capText:

    String lCapText = this.m_binder.get ("capText");

    Let me know if it works!

  • How to fix the page navigation bar &amp; banner does not advance when other scrol region

    Hi, I have an obligation to keep the banner of crumbs of bread and top of page the page all the time when the other region of report can scroll down. So that the crumbs of bread and the page banner are always visible to the user. Any suggestion to do this? Thanks in advance.

    It is the same procedure as above, simply by replacing the model you are using and the theme. The breadcrumb container is < div id = "t20BreadCrumbsLeft" & gt #REGION_POSITION_01 # < / div > in this case, the #header div is closed after this line.

    I see this theme 20A already a div of #t20PageHeader header, but the breadcrumb area is outside it. It might be interesting to experience what happens when if the #t20BreadCrumbsLeft div is placed within the #t20PageHeader div header and does not add the extra #header div... ?

    The basic approach is the same regardless of the theme/template: look at the definition of the model, understand what the facts were set, wrap them in a container and apply the position property sets and the appropriate height and padding equals the height to the body so that the rest of the page header.

    Where this becomes complex/impossible, is if the content of these elements is changed so as to affect the height (for example because of the content regions 6 and 7), or the page template is built using tables in such a way that it is not possible to place the elements required in a separate container.

  • Whenever I try to bookmark a page, he is listed as the page I hit 'signet' on but really links to a page at random my story and will not change.

    If I try to change the link manually, it resets right back to any page he chose to link to.

    Another possibility is that the database of places, which stores the history and bookmarks, is corrupt. I saw the following extension recommended as a way to correct, but I don't know how (or if it's running on Mac):

    https://addons.Mozilla.org/firefox/addon/places-maintenance/

Maybe you are looking for