Component attribute declarative ADF back scope of bean

Hi all

I create a declarative component of the ADF for custom LOV which is populated according to model LOV. This declarative component ADF allows several selectable values.

On the selection of the values, I would like to display the ID and the value to the user in two different text boxes.

The ID attribute is binded to #{binding.empId.inputvalue}

The value attribute is binded to #{backingBeanScope.customSearchBean.empNames}

< abfc: MultiSelect KeyValue = "#{bindings." KeyAttribute EmpId.inputValue}"="EmployeeId"ValueAttribute = 'FirstName' LovModel = ' #{bindings." EmpId.listOfValuesModel}"id ="ms1"ValueAttr1="#{backingBeanScope.customSearchBean.empNames}"/ >

Problem:

KeyValue attribute is set and displayed properly, but ValueAttr1 is not set correctly?

I have attached the code example in the post. Can you please help me?

Kind regards

Sudhir Koneru

OK, not the kind of comments in the class, I'm used to, but at least I understand your problem.

The solution is that you have to ppr the second inputText (it3) where you want to print the #{uploading. ValueAttr2 value}. This is necessary, just like the auto ppr not now that this field should be updated once the research is completed, only the defined parameters in the link layer are automatically updated. That your domain is not defined in the link (like the "it2" inputText) layer you have ppr it yourself. This is the new part of the MultiSelect.jspx page that defines your declarative component.

Please note that the inputText it3 listen now to the OK button on the pop-up window of research. What you should do with the other field too, as you can whether or not the storage is defined in the link layer.

Timo

Tags: Java

Similar Questions

  • Component attribute declarative for action in the link layer

    Hello

    I have a component declarative which includes buttons to add/remove/save/cancel that I hope to use to the standardization of page layouts. I need to assign two properties for each button, the actionlistener and the enabled property.

    For the button of validation for example I would attribute actionlistener for * #{bindings.Commit.execute} * and I would set the enabled property to * #{! bindings.Commit.enabled} * which would allow the validation button only if there was something to engage, if the action of CreateInsert had been carried out for example.

    And I would create attributes in the declarative element to these two parameters.

    What I want to know is is there a way that I can pass the action itself #{bindings.Commit} as an attribute in the component declaration so that I can reduce the number of attributes (and ease of development), and if yes, what type this attribute will be.

    Thank you

    Hello

    Create an attribute of type OperationBinding (full path) and you're good to go. I did the same thing with the DCIteratorBinding

    Frank

  • [ADF, JDev12.1.3] UI component: when link (to a variable of bean), its value and when to link UIC together?

    Hallo,

    in lots of examples that I have seen that sometimes the whole (through the Binding property) UI component is bound to a variable of bean and sometimes only the value property is bound to a variable of bean.

    I understand that when it comes to the UIC connection on the Value property value is sufficient.

    But I ask myself... which is the approach recommended in general?

    And is there a situation in which the binding using the Binding property must avoid?

    I have created a search custom form with the field (inputTexts, checkboxes,...) the values are handled in a bean. Which would be, in this case, the approach of linking advisable?

    Thank you

    Federico

    But I ask myself... which is the approach recommended in general?

    You should almost always use concrete goods (such as the ' value')

    In some cases, you will need to update some components of the user interface programmatically (with AdfFacesContext.getCurrentInstance () .addPartialTarget (component)), and for this you need reference to any component.

    But even in this case, you can use another approach to get the reference of the component instead of binding to the beans (but of course, "binding" attribute is the best way to get the reference of the component)

    See also: that binds the JSF component? When it is best to use? -Stack overflow

    And is there a situation in which the binding using the Binding property must avoid?

    -If you do not need any component

    -If you have scope of pageFlow/view/session bean

    I have created a search custom form with the field (inputTexts, checkboxes,...) the values are handled in a bean. Which would be, in this case, the approach of linking advisable?

    Probably the "value" property

    Dario.

  • Help on adf taskflow scope

    Hello
    I use 11.1.1.4 JDeveloper and ADF - BC in my application.
    In one of my modules, I have the following scenario.

    I have a stubborn workflow and a page fragment [ex: mainTabs.jsff] on this subject. I recorded a support with scope pageFlow bean and some name [ex: mainTabsBean].
    In the mainTabs.jsff file, I have four tabs. [I need to show the separate table in each tab] and two buttons save and cancel.
    So I created 4 taskfows with the corresponding jsff files and in all 4 taskflows, I recorded the same bean support as above and with the same scope [scope pageFlow and the name "mainTabsBean"]
    I slipped and fell these taskflows as of the regions in the mainTabs.jsff in showDetailItem for tabs corresponding tags.

    I want to have the same instance of 'mainTabsBean' used in the mainTabs.jsff as well as the tab pages.
    But instances happen differently from mainTabs.jsff-> button Save and subTab.jsff-> action.

    Please advice where I am doing wrong or who brought to use in this case.

    Kind regards
    Praveen

    Suresh,

    This wont work.

    Praveen,

    pageFlowScope is an isolated scope that is individual for each workflow. If you want to share a bean, you must pass a handle to him as an input parameter. So, if your workflow have an inputParameter

    bean--> pageFlowScope.theBean

    then you can access it from #{pageFlowScope.theBean} in the fragments of the page.

    When you set up the region of the parent page, you use EL to access the managed bean it and pass it in the workflow

    Frank

  • error "Ibsta" no was not declared in this scope

    I have a "error: 'Ibsta' was not declared in this scope."

    I try to program with C++ and GPIB test equipments, but so far, I have this problem.

    I'm sorry, but my knowledge of C++ is very limited because I took a module on it for about 4 months in College and now I have to rectify emergency for my project. Any help would be much apprciated, I tried searching the forums, but I still have to find an answer. I think it has something to do with my linker. BTW, I use Code blocks to compile program, so it may be different from other IDEs posted here such as Microsoft Visual C++, Borland, Dev C++.

    The program that I write to you is as follows:

    #include
    #include "ni488.h".
    #include
    #include
    #include "Decl. - 32.h"
    #include

    using namespace std;

    void GpibError (const char * msg); / * Function to Error statement * /.

    Device int = 0; / * Peripheral device descriptor * /.
    int BoardIndex = 0; / * Interface index (GPIB0 = 0, GPIB1 = 1, etc..) * /.

    int main() {}
    int PrimaryAddress = 28; / * Main unit address * /.
    int SecondaryAddress = 0; / * Secondary unit address * /.
    char Buffer [101]; / * Read buffer * /.

    /*****************************************************************************
    * Boot - made only once at the beginning of your application.
    *****************************************************************************/

    Device = ibdev (/ * create a device descriptor pointer * /)
    BoardIndex, / * Board Index (GPIB0 = 0, GPIB1 = 1,...) * /.
    PrimaryAddress, / * address of the primary device * /.
    SecondaryAddress, / * peripheral secondary address * /.
    T10s, / * delay (T10s = 10 seconds) option * /.
    1, / * line EOI assert at the end of writing * /.
    (0); / * Mode of termination EOS * /.
    If (Ibsta() & ERR) {/ * find GPIB error * /}
    GpibError ("ibdev Error");
    }

    ibclr (Device); / * System * /.
    If {(Ibsta() & ERR)
    GpibError ("ibclr Error");
    }

    /*****************************************************************************
    * Body - writing the majority of your GPIB application code here.
    *****************************************************************************/

    ibwrt (device, "* IDN?", 5 "); / * Send the command ID of the query * /.
    If {(Ibsta() & ERR)
    GpibError ("ibwrt Error");
    }

    Bird (device, buffer, 100); / * Read up to 100 bytes of the device * /.
    If {(Ibsta() & ERR)
    GpibError ("Bird error");
    }

    Buffer [Ibcnt ()] = '\0 '; / * Null terminate the string ASCII * /.

    printf ("%s\n", buffer); / * Print the device identification * /.

    /*****************************************************************************
    * UN-initialize - done only once at the end of your application.
    *****************************************************************************/

    ibonl (device, 0); / * Turn off the line * /.
    If {(Ibsta() & ERR)
    GpibError ("ibonl Error");
    }

    }

    /*****************************************************************************
    * Function GPIBERROR
    * This function will warn you that a function of NOR-488 failed by
    * a print error message. The State IBSTA variable will also be
    * printed in hexadecimal with the senses mnemonic of the forest
    * position. The State IBERR variable will be printed in decimal form
    * with the mnemonic significance of the decimal value. The status
    * Variable IBCNT will be printed in decimal form.
    *
    * The NOR-488 IBONL function is called to turn off the equipment and
    * software.
    *
    OUTPUT Comptrollership will end this program.
    *****************************************************************************/
    void GpibError (const char * msg) {}

    printf ("%s\n", msg);

    printf ("Ibsta () = 0 x %x<",>
    If (Ibsta() & ERR) printf ("ERR");
    If (Ibsta() & TIMO) printf ("TIMO");
    If (Ibsta() & END) printf ("END");
    If (Ibsta() & SRQI) printf ("SRQI");
    If (Ibsta() & RQS) printf ("QR");
    If (Ibsta() & CMPL) printf ("CMPL");
    If (Ibsta() & LOK) printf ("LOK");
    If (Ibsta() & REM) printf ("REM");
    If (Ibsta() & CIC) printf ("CIC");
    If (Ibsta() & ATN) printf ("ATN");
    If (Ibsta() & TAC) printf ("TAC");
    If (Ibsta() & MFP) printf ("LAKES");
    If (Ibsta() & CDI) printf ("CDI");
    If (Ibsta() & DCAS) printf ("DCAS");
    printf ("" > \n ");

    printf ("Iberr() = %d", Iberr() ");
    If (Iberr() == EDVR) printf ("EDVR \n");
    If (Iberr() == ECIC) printf ("in ECIC \n");
    If (Iberr() == ENOL) printf ("ENOL \n");
    If (Iberr() == EADR) printf ("EADR

    \n");

    If (Iberr() == HELLO) printf ("the GRAE \n");
    If (Iberr() == ESAC) printf ("ALD \n");
    If (Iberr() == EABO) printf ("EABO \n");
    If (Iberr() == ENEB) printf ("ENEB \n");
    If (Iberr() == PAES) printf ("PAES \n");
    If (Iberr() == ECAP) printf ("ECAP \n");
    If (Iberr() == EFSO) printf ("EFSO \n");
    If (Iberr() == USBE) printf ("USBE \n");
    If (Iberr() == ESTB) printf ("ESTB \n");
    If (Iberr() == ESRQ) printf ("ESRQ \n");
    If (Iberr() == XTAB) printf ("Established\n");
    If (Iberr() == ELCK) printf ("ELCK \n");
    If (Iberr() == MART) printf ("MART \n");
    If (Iberr() == EHDL) printf ("EHDL \n");
    If (Iberr() == EWIP) printf ("EWIP \n");
    If (Iberr() == ERST) printf ("ERST \n");
    If (Iberr() == EPWR) printf ("EPWR \n");

    printf ("Ibcnt () = %u\n", Ibcnt() ");
    printf ("\n");

    / * Call the ibonl to get the device and interface offline * /.
    ibonl (device, 0);

    "exit" (1);
    }

    The program I had is a sample I found the Instrument National software called GPIB Explorer.


  • Error "batteryInfo" has not declared in this scope

    Hi, I have this error in my project, I understand the example of the battery of the sample, but I get the error of generation.

    'MarcossitMobile10::MarcossitMobile10(bb::cascades::Application*)':
    ../src/MarcossitMobile10.cpp:17:42: error: 'batteryInfo' was not declared in this scope
    cc: C:/bbndk/host_10_0_9_404/win32/x86/usr/lib/gcc/arm-unknown-nto-qnx8.0.0eabi/4.6.3/cc1plus caught signal 1
    make[2]: *** [o.le-v7-g/.obj/MarcossitMobile10.o] Error 1
    make[2]: Leaving directory `C:/Users/marcossit/ndk-10.0.9-workspace/MarcossitMobile10/arm'
    make[1]: *** [debug] Error 2
    make[1]: Leaving directory `C:/Users/marcossit/ndk-10.0.9-workspace/MarcossitMobile10/arm'
    make: *** [Device-Debug] Error 2
    
    **** Build Finished ****
    

    I don't understand this part I declare scope

    This is the main.cpp Batterysample

    /* Copyright (c) 2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    #include 
    #include 
    #include 
    #include 
    
    #include 
    #include 
    
    using namespace bb::cascades;
    using namespace bb::device;
    
    /**
     * This sample application shows some basic
     * usage of the BatteryInfo API, such as charging level and charging state.
     */
    Q_DECL_EXPORT int main(int argc, char **argv)
    {
        qmlRegisterUncreatableType("bb.device", 1, 0, "BatteryChargingState", "");
    
        Application app(argc, argv);
    
        QTranslator translator;
        const QString locale_string = QLocale().name();
        const QString filename = QString("batterysample_%1").arg(locale_string);
        if (translator.load(filename, "app/native/qm")) {
            app.installTranslator(&translator);
        }
    
    //! [0]
        // Create the battery info object
        BatteryInfo batteryInfo;
    
        // Load the UI description from main.qml
        QmlDocument *qml = QmlDocument::create("asset:///main.qml");
    
        // Make the BatteryInfo object available to the UI as context property
        qml->setContextProperty("_battery", &batteryInfo);
    //! [0]
    
        // Create the application scene
        AbstractPane *appPage = qml->createRootObject();
        Application::instance()->setScene(appPage);
    
        return Application::exec();
    }
    

    It's my main.cpp

    /*
    * Copyright (c) 2012 Jason I. Carter
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    #include "Flashlight.hpp"
    #include 
    #include 
    #include 
    #include 
    
    #include 
    #include 
    #include 
    #include "MobileMarcossit.hpp"
    #include "RegistrationHandler.hpp"
    #include "InviteToDownload.hpp"
    #include 
    
    using namespace bb::cascades;
    using namespace bb::cascades::advertisement;
    
    Q_DECL_EXPORT int main(int argc, char **argv)
    {
        // this is where the server is started etc
        Application app(argc, argv);
    
        // localization support
        QTranslator translator;
        QString locale_string = QLocale().name();
        QString filename = QString( "MobileMarcossit_%1" ).arg( locale_string );
        if (translator.load(filename, "app/native/qm")) {
            app.installTranslator( &translator );
        }
        BatteryInfo batteryInfo;
        const char *uri = "bb.cascades.advertisement";
           qmlRegisterType(uri, 1, 0, "Banner");
           qmlRegisterUncreatableType("bb.device", 1, 0, "BatteryChargingState", "");
           qmlRegisterType("Flashlight", 1, 0, "Flashlight");
    
        // Every application is required to have its own unique UUID. You should
        // keep using the same UUID when you release a new version of your application.
        //TODO:  YOU MUST CHANGE THIS UUID!
        // You can generate one here: http://www.guidgenerator.com/
        const QUuid uuid(QLatin1String("c4e27f7c-f9d2-40dc-8630-1d037a0a1309"));
    
        //Setup BBM registration handler
        RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app);
    
        //AppName.cpp file which contains your main.qml file
        MobileMarcossit *mobileMarcossit = new MobileMarcossit(registrationHandler->context(), &app);
    
        // Whenever the registration has finished successfully, we continue to the main UI
        // Added finishRegistration() to registrationFinished()
        // This is to emit signal and by pass use of continue button as shown in sample
        QObject::connect(registrationHandler, SIGNAL(registered()), mobileMarcossit, SLOT(show()));
    
        // we complete the transaction started in the app constructor and start the client event loop here
        return Application::exec();
        // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children)
    }
    

    It's my MarcossitMobile10.cpp

    // Default empty project template
    #include "MarcossitMobile10.hpp"
    
    #include 
    #include 
    #include 
    #include 
    using namespace bb::cascades;
    
    MarcossitMobile10::MarcossitMobile10(bb::cascades::Application *app)
    : QObject(app)
    {
    
             // create scene document from main.qml asset
        // set parent to created document to ensure it exists for the whole application lifetime
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
        qml->setContextProperty("_battery", &batteryInfo);
        // create root object for the UI
        AbstractPane *root = qml->createRootObject();
    
        // set created root object as a scene
        app->setScene(root);
    }
    

    and get the error in this line that I declare.

     qml->setContextProperty("_battery", &batteryInfo);
    

    Help...

    Organizing in this way PPH, but already now, run nothing comes in my dev alpha application

    MarcossitMobile10.hpp

    // Default empty project template
    #ifndef MarcossitMobile10_HPP_
    #define MarcossitMobile10_HPP_
    
    #include 
    
    #include 
    namespace bb { namespace cascades { class Application; }}
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class MarcossitMobile10 : public QObject
    {
        Q_OBJECT
    public:
        bb::device::BatteryInfo* batteryInfo;
        MarcossitMobile10(bb::cascades::Application *app);
        virtual ~MarcossitMobile10() {}
    };
    
    #endif /* MarcossitMobile10_HPP_ */
    

    the qml constructor is bateria.qml

    /* Copyright (c) 2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    import bb.cascades 1.0
    import bb.device 1.0
    
    // Page laying out the visual components
    Page {
        Container {
            layout: DockLayout {}
    
            ImageView {
                horizontalAlignment: HorizontalAlignment.Fill
                verticalAlignment: VerticalAlignment.Fill
    
                imageSource: "asset:///images/bateria/background.png"
            }
    
            Battery {
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Center
            }
    
            Container {
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Bottom
    
                bottomPadding: 50
    
                //! [0]
                Label {
                    id: stateLabel
    
                    horizontalAlignment: HorizontalAlignment.Center
    
                    text: {
                        switch (_battery.chargingState) {
                            case BatteryChargingState.Unknown:
                                return qsTr ("Unknown");
                                break;
                            case BatteryChargingState.NotCharging:
                                return qsTr ("Not Charging");
                                break;
                            case BatteryChargingState.Charging:
                                return qsTr ("Charging");
                                break;
                            case BatteryChargingState.Discharging:
                                return qsTr ("Discharging");
                                break;
                            case BatteryChargingState.Full:
                                return qsTr ("Full");
                                break;
                        }
                    }
                    textStyle {
                        color: Color.White
                        fontSize: FontSize.XLarge
                    }
                }
                //! [0]
    
                Label {
                    id: descriptionLabel
    
                    horizontalAlignment: HorizontalAlignment.Center
                    bottomMargin: 100
    
                    text: {
                        switch (_battery.chargingState) {
                            case BatteryChargingState.Unknown:
                                return qsTr ("Something is up with the battery");
                                break;
                            case BatteryChargingState.NotCharging:
                                return qsTr ("Plugged in, just no charge");
                                break;
                            case BatteryChargingState.Charging:
                                return qsTr ("Plugged in");
                                break;
                            case BatteryChargingState.Discharging:
                                return qsTr ("Unplugged and discharging");
                                break;
                            case BatteryChargingState.Full:
                                return qsTr ("Plugged in, full");
                                break;
                        }
                    }
                    textStyle {
                        color: Color.Gray
                        fontSize: FontSize.Large
                    }
                }
            }
        }
    }
    

    and the qml plugin is Battery.qml

    /* Copyright (c) 2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    import bb.cascades 1.0
    import bb.device 1.0
    
    Container {
        preferredWidth: 498
        preferredHeight: 318
    
        layout: DockLayout {}
    
        //! [0]
        ImageView {
            id: batteryOutline
    
            horizontalAlignment: HorizontalAlignment.Center
            verticalAlignment: VerticalAlignment.Center
    
            imageSource: _battery.chargingState == BatteryChargingState.Unknown ? "asset:///images/bateria/battery_plugged_error.png" :
                         _battery.chargingState == BatteryChargingState.NotCharging ? "asset:///images/bateria/battery_plugged_bad.png" :
                         _battery.chargingState == BatteryChargingState.Charging ? "asset:///images/bateria/battery_plugged.png" :
                         _battery.chargingState == BatteryChargingState.Discharging ? "asset:///images/bateria/battery.png" :
                         _battery.chargingState == BatteryChargingState.Full ? "asset:///images/bateria/battery_plugged.png" : ""
        }
        //! [0]
    
        //! [1]
        ImageView {
            id: loadingLevel
    
            horizontalAlignment: HorizontalAlignment.Left
            verticalAlignment: VerticalAlignment.Center
    
            translationX: 75
            preferredWidth: _battery.level * 350.0 / 100.0
    
            imageSource: _battery.level <= 10 ? "asset:///images/bateria/fill_red.png" :
                         _battery.level <= 20 ? "asset:///images/bateria/fill_yellow.png" :
                         _battery.level < 100 ? "asset:///images/bateria/fill_grey.png" : "asset:///images/bateria/fill_green.png"
        }
        //! [1]
    
        ImageView {
            id: stateIndicator
    
            horizontalAlignment: HorizontalAlignment.Center
            verticalAlignment: VerticalAlignment.Center
    
            imageSource: _battery.chargingState == BatteryChargingState.Unknown ? "asset:///images/bateria/exclamation.png" :
                         _battery.chargingState == BatteryChargingState.NotCharging ? "asset:///images/bateria/exlamation.png" :
                         _battery.chargingState == BatteryChargingState.Charging ? "asset:///images/bateria/flash.png" :
                         _battery.chargingState == BatteryChargingState.Discharging ? "" :
                         _battery.chargingState == BatteryChargingState.Full ? "" : ""
        }
    }
    

    It will be something else?

    qml->setContextProperty("_battery", &batteryInfo);
    

    for example

    qml->setContextProperty("_bateria", &batteryInfo);
    
    or
    
    qml->setContextProperty("Battery", &batteryInfo);
    
  • error: 'QmlDocument' was not declared in this scope

    I followed along the following:

    https://developer.BlackBerry.com/Cascades/documentation/UI/integrating_cpp_qml/index.html

    And added the following code to main.cpp:

    #include 
    #include 
    
    #include "app.hpp"
    
    using ::bb::cascades::Application;
    
    int main(int argc, char **argv)
    {
        Application app(argc, argv);
    
        QmlDocument *qml = QmlDocument::create("main.qml");
        AbstractPane *root = qml->createRootNode();
        Application::setScene(root);
    
        return Application::exec();
    }
    

    When compiling, I get the error:

    error: 'QmlDocument' was not declared in this scope
    

    Your weird namespace.

    using bb::cascades;

    Try this.

    Edit: Also if I were you I wouldn't want to create a new project and select HelloCasades as a model.  That will be running a lot faster than to try to do it from scratch.

  • Toast not declared in the scope

    Hello

    I am going through the updated documentation and having problems of implementation of the toast.

    void App::showToast() {
        toast = new SystemToast(this);
        toast->setBody("Welcome to the BlackBerry 10 Cascades documentation!" + "You have lots of space, but your text will wrap around in the dialog box.");
        toast->show();
    }
    

    Returns an error: "toast not declared in the scope" on this line:

    toast = new SystemToast(this);
    

    I've added all these header files to my name .cpp

    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    using namespace bb::cascades;
    using namespace bb::system;
    

    My .pro includes these:

    LIBS   += -lbbdata -lbbsystem
    

    My header app.hpp file looks like this

    // List with context menu project template
    #ifndef App_HPP_
    #define App_HPP_
    
    #include 
    
    namespace bb { namespace cascades { class Application; }}
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class App : public QObject
    {
        Q_OBJECT
    public:
        App(bb::cascades::Application *app);
        virtual ~App() {}
        void showToast();
    };
    
    #endif /* App_HPP_ */
    

    Have a blast to find out why its not working. Anyone of you has a working example that connects everything to display a simple toast?

    Thank you

    I guess you missed the variable declaration.

    Declare an SystemToast object in the method itself or in app.hpp like this:

    SystemToast *toast;
    

    Kind regards

    Nishant Shah

  • SqlDataAccess has not declared in this scope

    Learn how to use SQL statements in the Cascades.

    I'm following the example provided in https://developer.blackberry.com/cascades/reference/bb__data__sqldataaccess.html

    I copied the code example in my app.cpp and consisted of two instructions include:

    #include 
    #include 
    

    Here is the code

    // create a data model with sorting keys for firstname and lastname
    GroupDataModel *model =
      new GroupDataModel(QStringList() << "firstname" << "lastname");
    
    // load the sql data from contacts table
    SqlDataAccess sda("contacts.db");
    QVariant list = sda.execute("select * from contact order by firstname");
    
    // add the data to the model
    model->insertList(list.value());
    
    // create a ListView control and add the model to the list
    ListView *listView = new ListView();
    listView->setDataModel(model);
    

    When I compile I get the following:

    ../src/app.cpp:21:5: error: 'SqlDataAccess' was not declared in this scope
    

    What I am doing wrong?

    Thank you!

    SqlDataAccess is located in the bb::data namespace.

    Also, need to add the line:

    LIBS += -lbbdata
    

    in *.pro in your project file. See here:

    https://developer.BlackBerry.com/Cascades/documentation/dev/upgrading/index.html#library

  • another namespace issue? 'CameraSettings' was not declared in this scope

    I have a camera native c ++ application coded and run successfully.

    I want to change the flash mode.  So I add:

    CameraSettings* cameraSettings = new CameraSettings();
     cameraSettings->setFlashMode(CameraFlashMode::Light);
     camera->applySettings(cameraSettings);
    

    I also add:

    #include 
    #include 
    

    When I build, I get the error:

    'CameraSettings' was not declared in this scope.

    Is it a matter of namespace or a:

    LIBS += ?
    

    ... question?

    Something else?

    My current LIBS:

    LIBS += -lcamapi -lscreen
    

    I see what is happening, I mix with QT c functions.

    I need to use the settings as shown in this example:

    http://supportforums.BlackBerry.com/T5/native-development/Flash-always-on-camera/m-p/1911403/HIGHLIG...

    Thanks for your help.

  • setScene not declared in this scope

    Im working on the c ++ here Navigation pane:

    https://developer.BlackBerry.com/Cascades/documentation/UI/navigation/multiple_screens_stack.html

    I get the error:

    setScene has not declared in this scope.

    Any ideas how to fix?

    With the help of beta3.

    Hello

    You must use following syntax to define the method of application setScrene.

    NavigationPane * rootPane = qml-> createRootObject();

    Application::instance()-> setScene (rootPane);

  • Is it possible to create a shuttle component in Oracle ADF, where the available and selected lists are tables of the adf?

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    Is it possible to create a shuttle component in Oracle ADF, where the available and selected lists are tables of the adf?



    I did a POC sample on it. I can share with you. I can't put in my dropbox because dropbox is blocked in my network. Share your email. I'll send the POC through

  • How to reference an attribute binding in backing bean

    Hello

    is there a way to refer to a binding attribute in backing bean (e.g. CustomerVO1.CustomerId)?
    I need to fill out a parameter with the value of CustomerId in a pod of support.

    Hello

    You must get the iterator:

    DCIteratorBinding iter =
    getDCBindingContainer () .findIteratorBinding (name);

    Then you can get the current line like this:

    Line currRow = iter.getCurrentRow ();

    And the value of the attribute as follows:

    Object attribute = currRow.getAttribute ("nameOFAttributeAsInViewObject");

    Kind regards
    Dimitris.

  • ADF-backing beans of debugging

    Hello

    I'm telling us an existing application of ADF for my development and find it somewhat difficult to debug.

    Is it possible to debug the application with backnig beans. When I set debug points on the back of beans, the control does not prevent that. Even to the constructor.

    Kind regards

    Amit

    Amit,

    I tried to do once or twice (actually a few thousand times) and it works fine.

    Looks like it's maybe time for you to submit a test case with Oracle supports, maybe.

    A suggestion-why mark you the thread as "resolved", when apparently is not? I posted a follow-up in the other thread that you opened with the same exact issue.

    John

  • How table create ADF backing Bean

    Currently, I am working on Jdeveloper11g.

    I have a requirement to create the dyanamically Table. For this, I'll get info on table of the configuration file.

    <? XML version = "1.0" encoding = "UTF-8"? >
    < pages >

    < Page > 1
    < type sortable = "false" > TYPE < / Type >
    < Decription sortable = "true" > Description < / Description >
    < date sortable = "true" > Date < / day >
    < amount sortable = "false" > amount < / amount >
    < / page1 >

    < page 2 >
    < type sortable = "false" > account < / Type >
    < Decription sortable = "true" > account name < / Description >
    < date sortable = "true" > created < / Date >
    < amount sortable = "false" > current balance < / amount >

    < / page 2 >

    < / pages >

    You can guide me what classes I need to use to support bean.any sort of code or links will be very appreciated.

    Thank you
    Katie

    Hi Katie,

    -If your columns in the table don't vary, so you can create a POJO with all of these attributes and prepare an arrayList/table and bind it to the value property of the table
    -If the columns of the table vary, you can then follow the sample code posted in [this forum post | http://forums.tangosol.com/forums/thread.jspa?threadID=977749&tstart=30].

    Jean Lou

Maybe you are looking for