Impossible to Trigger list items
Hello
I use Listview with GroupDataModel. I used StandardListItem to display rows. My Xml looks like this.
import bb.cascades 1.0 Page { Container { layout: StackLayout { } ListView { objectName: "photoslist" topPadding: 5 leftPadding: 5 bottomPadding: 5 rightPadding: 5 dataModel: GroupDataModel { id: groupDataModel } listItemComponents: [ ListItemComponent { type: "header" Header { title: "Photos" } }, ListItemComponent { type: "item" StandardListItem { title: ListItemData.firstName imageSource: ListItemData.imagesource } } ] // LsitComponents end onTriggered: { cppObj.onListTapped(); } // onCreationCompleted of Listview onCreationCompleted: { groupDataModel.insert({ "firstName": "Personal Activites", "imagesource": "asset:///images/image1.jpg" }); groupDataModel.insert({ "firstName": "Social Activities", "imagesource": "asset:///images/image13.jpg" }); groupDataModel.insert({ "firstName": "Honoring", "imagesource": "asset:///images/image209.jpg" }); } // oncreationCompleted end } // listview end } // container end }// page end
In the OnTriggerd method, I'll call a method in the class of the CPP. My CPP class looks like this
#include "PhotosListScreen.h" #include "GridListView.h" PhotosListScreen::PhotosListScreen(NavigationPane *mpane) : QObject(mpane) { pane = mpane; // 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:///photoslist.qml").parent(this); // create root object for the UI Page *root = qml->createRootObject(); if(!qml->hasErrors()) { pane->push(root); qml->setContextProperty("cppObj", this); } } PhotosListScreen::~PhotosListScreen() { } void PhotosListScreen::onListTapped() { new GridListView(pane); }
So, when on starting a qml is called I'm call a method in CPP that will see the Page on the screen.
It is, onTriggered is not called.
I did the total number of tracks to implementation PageHandler, notecard or notecard to StandardListItem etc.
But noting has helped me.
I added the onListTapped() as Q_INVOKABLE in the file of all.
Please help me with the problem.
Thank you best regards &,.
SHA.
The class is missing from the Q_OBJECT macro.
Also, make sure the name of your context property. in your first code snippet you save as "cppObj", in this case what you call 'CPP '.
Tags: BlackBerry Developers
Similar Questions
-
FRM-41337 clause execute_query with populate in a trigger list item
Hello
I put the clause execute_query and witch procedure to fill list item in a trigger (a TIMES-NEWS-BLOCK-INSTANCE), Lake this:
BEGIN
do_key ('execute_query');
CGLL$ LST_COMP_MIEJSC_KRA_NAZWA;
END;
and I get error frm-41337. It's a job, but I get this error? If I put only the procedure CGLL$ LST_COMP_MIEJSC_KRA_NAZWA; I get no error, and if I put only execute_query, then also I get no error.
procedure CGLL$ LST_COMP_MIEJSC_KRA_NAZWA; is generated by forms and is ok.
Any idea?
ConcerningYou can't repopulate a listitem when the block is 'filled' with records queried from the database. You'd have to put a CLEAR_BLOCK before the CGLL$-thing.
-
To access the data of the trigger list item
Hello
I started developing on the Blackberry this fall. I like a lot more on Android and Java development, but am really interested in getting on learning stunts and QNX architecture.
I wanted to take the child node in the following XML file (from the Documentation):
Here is my list:
ListView { dataModel: XmlDataModel { source: "data.xml" } onTriggered: { if (indexPath.length > 1) { var chosenItem = dataModel.data(indexPath); var contentpage = itemPageDefinition.createObject(); contentpage.itemPageTitle = chosenItem.name contentpage.phoneNumber = chosenItem.phone.number nav.push(contentpage); } } accessibility.name: "Listing" }
I put phoneNumber as an Alias in the QML file that the application is intended to be sent.
the chosenItem variable is a variable of XmlDataModel made from a contact form we have clicked on that, but I have no idea how the child of this body of the access code. I should do data() once again, or is there a much more direct way from words to action?
Thank you in advance for the help,
Sorry, the answer I gave was not for a XmlDataModel, between the XML and by default displays only the first two levels. Other levels is available via the datamodel, but not returned as the selected item.
To get to a different level to get the phone number you may enter a value of something like this:
//First phone number dataModel.data([0,0,0]).number //Second phone number dataModel.data([1,0,0]).number
The row you get will look like [0,0] or [1.0] because it is not crossed to the third level. You will need to do a little analysis, take the first value of the row and the replacement of the first value that I've hardcoded above.
Have a look at the diagram on the page of response to selection . Which will help you understand what is happening behind the scenes here.
-
Show the popup inside the list item (JDEV 12 c)
Hi all
I'm having a problem when I try to display the pop-up window on an image, click.
Inside the image, there is the showPopupBehaviour that triggers the popup.
It is not working properly if I put the popup on the outside of the list item, but the problem is that I need inside so I can view the attributes of each element.
The list with the elements (each icon should trigger the popup with information components):
Best regards
Luis Cabaco
The problem is not the popup, but how you load the data from the context menu.
The popup will match every time, only data changes.
Make sure that the popup contentDelivery has the value "lazyUncached".
Timo
-
Toggling text element based on the selection of a list item
Hello friends,
I have a header data block where I have a field to not enter the name of book and a REGD Item list that displays 'Yes' and ' ' and a text REG_NO element.
When the user selects 'Yes', the text REG_NO element must be enabled so that the user can enter the number of the book.
By choosing 'No', the REG_NO element must be disabled.
I have included a trigger WHEN-LIST-CHANGED in the list REGD item.
I added the following code in the trigger above:
--=======================================
BEGIN
IF: HEADER. REGD = ' don't
THEN
SET_ITEM_PROPERTY('HEADER.) REG_NO', ENABLED, PROPERTY_FALSE);
ON THE OTHER
SET_ITEM_PROPERTY('HEADER.) REG_NO', ENABLED, PROPERTY_TRUE);
END IF;
END;
--=======================================
However, when the form is opened, the text REG_NO element is enabled.
When the user chooses the 'no' in the list item REGD, then the text REG_NO element is disabled as expected.
However, when you choose 'Yes' in the item list REGD, the text REG_NO element does not get activated.
Can someone let me know how to activate the text element.
Concerning
Hawker
When you disable an item, NAVIGALE, INSERT_ALLOWED, and UPDATE_ALLOWED properties are also set to False, then you will need to reactivate their when you reactivate an item.
-
How to display the list item values both from 2 different tables?
Hello world.
I have a problem for the display of the data.
There are 2 tables in the database.
Table-1 has lc_value, lc_no, lc_dt, and vendor_code columns.
Table-2 has vendor_code, $vendor_name & vendor_address.
I created the form where I display data in list item 30 (tabular presentation - 30 records displayed).
I need to display all values automatically at the same time in the form just by clicking on "Enter_Query" and "Execute_Query".
It worked when the form had fields in a table in a single table.
I created fields in a table for tables; then created the relationship between the tables by using the join (vendor_code).
But when I run the form, click on "Enter_Query" and "Execute_Query", its does not work.
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.
How can I do this?
Help me.
Thank you.
Dear Bruno,
Each provider code is to have a folder, then
Why keep two tables?
Why you want to update both the table at the same time?
Master / detail means,.
a master record depends on several detail records.
Please, understand and try to build your form with single table.
If you have already created 2 tables, then merge these into a single table.
Or other wise keep table_1 as a database block and to vend_name as a data field (element of database in the palette of the property is set to 'no').
Then go to the trigger of table_1 block post_query and write the following:
Select vend_name in: vend_name from vendor_mst where vend_cd =: lc_vend_cd;
In doing the above, the form will look as you wish but the change on the vend_name not to be saved because that is the point of no database.
Other than vend_name all fields in table_1 will be recorded.
Hope this will help.
Post edited by: Priyasagi
-
Development of a feature of single line with list items
Hello
I am new to Oracle forms. Currently using Oracle forms 6i.
I am facing a problem when you check the condition of the components of a line while choosing the "item in the list. I basically multiple data block. On the block of data I assigned to the property as 'Item in the list' to one of the element. This list item has three options 'MANUAL', 'AUTO' and 'ADVANCE '. When I choose the 'MANUAL' list item, corresponding line should be editable and the user can insert the record in the same row. But when I choose 'AUTO' or 'ADVANCE' only the specified element say for example the element 'Sr.no" only be editable while all other elements are unchangeable. I tried to use set_record_property for 'MANUAL' and that my point. But writing set_item_property to "AUTO" and "ADVANCE", which spoils the feature then 'MANUAL' for the line/record after having inserted a line 'AUTO' or 'FORWARD '.
Please help as soon as possible because it is urgently needed.
Published by: 1005292 on May 10, 2013 12:43I agree with Gregor uses WHEN-LIST-CHANGED-relaxation. But I wouldn't set the INSERT_ALLOWED and UPDATE_ALLOWED properties in a WHEN-NEW-FOLDER-iNSTANCE-trigger, but put in the WHEN-LIST-CHANGED-trigger and in the process of filling the block (I don't know how the block is filled, if its done using EXECUTE_QUERY the relaxation would be POST-QUERY-relaxation).
The statement to make it a feature in the Insertable current record is
SET_ITEM_INSTANCE_PROPERTY('BLOCK.ITEM', TO_NUMBER(:SYSTEM.TRIGGER_RECORD), INSERT_ALLOWED, PROPERTY_TRUE); SET_ITEM_INSTANCE_PROPERTY('BLOCK.ITEM', TO_NUMBER(:SYSTEM.TRIGGER_RECORD), UPDATE_ALLOWED, PROPERTY_TRUE);
-
How to deletions has selected list item from a list item.
How delete a list item selected in a list item.
My question that I should write to list_index so that it indicates the selected list item
DELETE_LIST_ELEMENT (Nom_liste, list_index);
-----
Form of Oracle 10gHello
The trigger when-list-changed fires whenever the value has been changed.
You get this value/index with the following:DECLARE LC$Liste Varchar2(61) := :system.cursor_item ; LC$Valeur Varchar2(30) := Name_In( LC$Liste ) ; LN$Nbre Pls_integer ; BEGIN LN$Nbre := Get_List_Element_Count( LC$Liste ) ; For i IN 1 .. LN$Nbre Loop If Get_List_Element_Value( LC$Liste, i ) = LC$Valeur Then -- you get the selected value, and index there -- :BLOC2.LABEL := Get_List_Element_Label( LC$Liste, i ) ; Exit ; End if ; End loop ; END;
François
-
Hi all!
I'm quite new in Oracle Forms and Oracle usually. I want to do under the list items, for example, I made two list items, one is called "F_Ime" which means the name of the Faculty and the other "Smer" which means what directions of schools that I have on each Faculty eg on the Faculty of mathematics and information technology I have this route: computer science, mathematics, Phisics and so on.
So I wrote this trigger to dynamically fill my list items:
DECLARE
rg_fakultet RECORDGROUP;
rg_smer RECORDGROUP;
rg_fsmer VARCHAR2 (20): = "F_IME";
rg_ssmer VARCHAR2 (20): = 'SMER ';
flist_ID Item: = Find_Item('SMERI.) F_IME');
slist_ID Item: = Find_Item('SMERI.) SMER');
nDummy NUMBER;
BEGIN
rg_fakultet: = Find_Group (rg_fsmer);
rg_smer: = Find_Group (rg_ssmer);
IF this is Id_Null (rg_fakultet) THEN
Delete_Group (rg_fakultet);
END IF;
IF this is Id_Null (rg_smer) THEN
Delete_Group (rg_smer);
END IF;
rg_fakultet: = CREATE_GROUP_FROM_QUERY (rg_fsmer, 'SELECT F_IME, TO_CHAR (F_IME) OF FAKULTETE');
rg_smer: = CREATE_GROUP_FROM_QUERY (rg_ssmer, 'SELECT SMER, TO_CHAR (SMER) OF SMERI F_IME ORDER');
Clear_List (flist_ID);
Clear_List (slist_ID);
nDummy: = Populate_Group (rg_fakultet);
nDummy: = Populate_Group (rg_smer);
Populate_List('SMERI.) F_IME', rg_fakultet);
Populate_List('SMERI.) SMER', rg_smer);
END;
But instead falling into the element of the 'Smer' list ONLY the indications of the Faculty elected I get instructions and is not like under item in the list of the item in the list 'F_ime '.
Please help me with this.
Thank you!You still not filter your query list using the value selected in the list F_IME item. You will need to modify your query SMER, so that it uses the value of the F_IME element. This means yout SMERI table must have a column F_IME (or something similar).
Assuming that you have the F_IMR column in the table SMER, you query should look like this:
/* I added a variable to hold the SQL Statement for readability. */ DECLARE rg_smer RECORDGROUP; rg_ssmer VARCHAR2(20) := 'SMER'; slist_ID Item := Find_Item('SMERI.SMER'); nDummy NUMBER; v_Sql VARCHAR2(500); BEGIN rg_smer := Find_Group(rg_ssmer); IF NOT Id_Null(rg_smer) THEN Delete_Group(rg_smer); END IF; v_SQL := 'SELECT SMER, TO_CHAR(SMER) FROM SMERI where F_IME = '''||:SMERI.F_IME||''''; rg_smer := CREATE_GROUP_FROM_QUERY(rg_ssmer,v_SQL); Clear_List(slist_ID); nDummy := Populate_Group(rg_smer); Populate_List('SMERI.SMER',rg_smer); END;
Please change change to suit your table.
Craig...
-
Help with dynamic action and the selection list item
G ' Day Apex gurus.
I have problems trying to achieve to trigger the Help window from an element automatically select. A Help window is triggered when it is clicked on the label of an item, but my customer wants to be triguered automatically as soon as the user clicks to view the options in the select list.
I think I should be able to do with dynamic actions but I can't function.
I know when someone clicks on the label of the item selection list trigger this JavaScript
JavaScript:popupFieldHelp('277938589795252851','1545903379570909')
So I want to trigger the javascript also when the user click on the item selection list and pull down the options and for that I think that the dynamic action is the way to go, but I can't do things.
That's what I have to do:
I created a dynamic option as follows:
Name: test
Sequence: 30
Even: click
Selection type: product (s)
Article (s): P1_RATING <-a selection list item
Condtion: - no requirement.
Real Actions
Sequence: 10
Action: Run the JavaScript Code
Fires when the result of the event is: true
Fire on loading the page: checked
Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')
Thank you anyone who can tell me what I'm doing wrong here or bring a solution to my problem to trigger the Help window from an element automatically select.
Kind regards
CarlosHi Carlos,
I've set up a test case of exactly in the same way and it worked fine for me. I've created a page element called P1_DA_DEMO and added some values of the static selection list, then added a help text. I used the settings are lower, I suggest you try again, but also make sure that you have no other Javascript errors on the page. Use a tool like firebug to check.
Name: Action Dynamics demo
Sequence: 10
Even: click
Selection type: product (s)
Product (s): P1_DA_DEMO<- a="" selection="" list="">->
Condtion: - no requirement.Real Actions
Sequence: 10
Action: Run the JavaScript Code
Fires when the result of the event is: true
Fire on loading the page: unchecked
Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')Scope of the event set a Bind s.
Thank you
Paul
-
How to choose the item value list based on another value of list item
Hello friends,
I have two list items named xxx and yyy... OK, my problem is I want to choose a value of yyy list item based on the value of article xxx...
Example: I select 'Computer' in xxx... Based on this I want to choose the item values in yyy as a monitor, keyboard, mouse, etc... This must be done at run time. How can I do this... Give me a few examples of code [pls tell me trigger appropriate to place this encodings]
Thanks in advance,
BattistelliVery simple to use the LOV and query of the lov which is attached to the YYY field, use the query as below...
SELECT columns FROM table WHERE column_name = :XXX_FIELD
Use the ENTER OF LIST Yes property for the YYY field.
-Clément
-
Hello
I have items in the form, the user need visible this point with him, me, I do all the visible elements = no
and make the point list and but all the elements of value in the list
When the list item chanched and the user select any item of the agenda will be visible = yes
the form like this
the list item = bank name
value in the list (bank_name = 1
bank_address = 2)
and I have 2 items in the form
bank_name
bank_address
two of them visible = no
and I do trigger (WHEN-LIST-CHANGED)
If: Bank = 1 then
SET_ITEM_PROPERTY ('bank_name', VISIBLE, PROPERTY_TRUE);
elsif: Bank = 2 then
SET_ITEM_PROPERTY ('bank_ADDRESS', VISIBLE, PROPERTY_TRUE);
end if;
the qustion is
When the visible element = Yes once the user has selected in the list
How can make it appear this itme = no
When the user has selected the same article?
Thank youHello
One idea is to make this conrtol using a list item. Suppose you have two names of items in the list, and then create two global variables / parameters in the form and use it like that...Trigger = WHEN-NEW-FORM-INSTANCE :PARAMETER.NAME_FIELD:='N'; :PARAMETER.ID_FIELD:='N';
Now in the trigger MODIFIED the LIST when using the code below...
IF :list_name='NAME_FIELD' THEN IF :PARAMETER.NAME_FIELD='N' THEN SET_ITEM_PROPERTY('NAME_FIELD',VISIBLE,PROPERTY_TRUE); :PARAMETER.NAME_FIELD:='Y'; ELSE SET_ITEM_PROPERTY('NAME_FIELD',VISIBLE,PROPERTY_FALSE); :PARAMETER.ID_FIELD:='N'; END IF; ELSIF :list_name='ID_FIELD' THEN IF :PARAMETER.NAME_FIELD='N' THEN SET_ITEM_PROPERTY('ID_FIELD',VISIBLE,PROPERTY_TRUE); :PARAMETER.ID_FIELD:='Y'; ELSE SET_ITEM_PROPERTY('ID_FIELD',VISIBLE,PROPERTY_FALSE); :PARAMETER.ID_FIELD:='N'; END IF; END IF;
HTH.
-Clément
-
2 values can be added to a drop-down list item?
I probably need to explain what it is I'm doing first. It could even impossible the way I'm doing it. So if there's a better way, please do help. But I try to have items listed in a drop-down list. More precisely the elements that are of different lengths with different numbers. I have been using the value of the elements to do simple calculations to work. But I also want it so that once an item is selected the item to a list of material later in the form printed. I'm sure I can set the value of the element as the item number and I the number displayed next to the item (in another column) later in the order form. But I want to be able to always perform the calculations in the subform where is the original drop-down list. Is it possible to assign 2 values (one for use with calculations) and one for use as an item number? Or is there a better way to do what I'm doing? I know I could just name the list drop-down list item and contain the number of point in the name using addItem. But I don't want to confuse the user with numbers, they did not need to see. Only the person who sells the materials needs to know the number of points, not the user.
Back again...
Think - the behavior is expected because the values specified in the binding tab lead the overall binding for the drop down menus.
So if the first dropdown the text resulting from elements such as the display values AND the second dropdown has numbers of items like display settings - then it will work. As long as the two drop-down lists have the same number of elements and sequence in the specified values is the same.
This means that you must keep two drop-down lists.
It may be a good idea to have the second dropdown (numbers) configured to read only so that the user cannot interact with it.
Good luck
Niall
-
How to change the value of list item
Hi all
The scenario is like this...
I have two country and state list item... Now when I select a specific country from the list item... corresponding State will come in the State list item...
Please help me to solve the problem...
Thanks in advance.
T.HalderHamadi,
In the trigger WHEN-LIST-CHANGE of the list of countries point write,
DECLARE Num_Temp NUMBER; RG_Group_ID RECORDGROUP; BEGIN RG_Group_ID := CREATE_GROUP_FROM_QUERY('RG_STATE', 'SELECT STATE_NAME, STATE_CODE FROM STATE_TABLE WHERE COUNTRY_CODE = ''' || :CB_COUNTRY || ''''); Num_Temp := POPULATE_GROUP(RG_Group_ID); CLEAR_LIST('CB_STATE'); POPULATE_LIST('CB_STATE', RG_Group_ID); :CB_MODULE := GET_LIST_ELEMENT_VALUE('CB_STATE', 1); DELETE_GROUP(RG_Group_ID); END;
Replace the field names, table and and the name of the control according to your requirement.
Kind regards
Manu.
If my answer or the answer to another person has been useful or appropriate, please mark accordingly
-
Help needed in the list item... need display a selected Department employees
Hi all
I am very beginner in D2K technology. I use Forms 10g.
Could you please help me...
I created a list item that contains dept_id = 10, 20, 30...
My requirement is when I change the value of the dept_id (select dept_id = 20), the employees belong to this desire to display dept (to display 5 dept 20 employees).
I created two block - block2, block3 hepatitis has
In block2, there is a list item
Block3, there is an element of the screen and I've changed the number of properties displayed in block 10.
I have atteched a trigger when-list-changed and the code is:
Select last_name in: block3.item14 of employees where department_id =:block2.item4;
But it does not work...
Thanks in advance,
Tapan.
Published by: user630863 on August 8, 2010 21:20
Published by: user630863 on August 8, 2010 21:55Well, the 'right' wa would be in the basic block 3 on the emp table database, set the somthind as where clause
DEPTNO=:BLOCK.THE_LIST_ITEM:
If you want to stay with the 'wrong' way to fill th eblock by yourself, try something like
GO_BLOCK('BLOCK3'); CLEAR_BLOCK(NO_VALIDATE); FOR rec IN cursor LOOP IF :SYSTEM.RECORD_STATUS!='NEW' THEN CREATE_RECORD; END IF; :BLOCK3.LASTNAME:=rec.LASTNAME; END LOOP;
Maybe you are looking for
-
El Capitan and Canon scanner failure
El Capitan does more work with Canon 5600F scanner. New driver and supplied Canon software update and the new driver did not work either. A solution? A different software? This new scanner flat works with El Capitan? LDBennett
-
ProBook 4320 s: computer does not turn off
Hello A few days after the last update of window 10 s can not turn off. She can go sleep, but turn off the result probook on reboot. Ask for advice Tanks
-
HP Scanjet G4010: hp scanjet g4010 windows 7 cannot scan to PDF
HP Scanjet linked to computer runing Windows 7 Professional. When I push the "scan to pdf" button, a dialog box opens. In this dialog box is a drop-down list box file type. The only options in this drop-down list are BMP, JPG, PNG, and TIF. However,
-
When I start my computer, I get this message - this application has failed to start because DSOUND.dll was not found. Reinstalling the application may fix this problem.I tried a lot of timea to find a solution but none helped.Here is the 'missing' a
-
How to clear the drop address explore?
HelloThis issue is unrelated to Internet Explorer or the address toolbar. I've been looking for forums to clear the address bar in Windows Explorer. I tried everything mentioned here, but so far only the address bar in IE8 lost history and I also era