ListView with custom headers (sections)
Hello
I need custom headers (basically something like sections QML native ListView component http://doc.qt.nokia.com/4.7-snapshot/qml-listview.html#section.criteria-prop) in my ListView. In my case, I have list of comments that I want to be sorted by DateTime and contain headers: «Today, yesterday, last 7 days, Older» Source of ListView is GroupDataModel (QVariantList of SqlDataAccess).
Any ideas?
Thank you
Jan
As far as I'm concerned, I think that's not possible!
Likewise, you cannot sort on key on a second key in DESC and ASC.
In addition, the title of the header section is the value used to sort data
So in anticipation, I add a prefix to my field in the QML and sort, I have re - format text.
In your case, I do "1-Today", "2-Yesterday", "3-Last..." » ; then I sort on this key. and I don't value.substring (...) in QML
To remove my prefix.
Nicolas
Tags: BlackBerry Developers
Similar Questions
-
Dynamically add custom headers in ListView
I'm working with a ListView which is based on a api, that I have no control.
I dynamically add some custom headers subject see the following as to what I am referring to (A, B)
http://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__listview.html
How can I dynamically add these? For example, I want to add a conflict between the first element of the list and the second
Section A
Header
Item B
Point C
Hi Philippe,.
To do this, you must use a custom list item component.
Heres how I could do that
Moreover, in the custom "Header" just create a structure as follows:IF/ELSE ON A FLAG
if(someflag == "header"){ //use header style }else{ // show normal list style }
My Code
ListView{ dataModel: ArrayDataModel{ id: myDataModel } listItemComponents: ListItemComponent { Container{ layout: StackLayout{ orientation: LayoutOrientation.TopToBottom } Label{ text: ListItemData // complete data string } Label{ text: ListItemData.split("~")[0] } Label{ text: ListItemData.split("~")[1] } Label{ text: ListItemData.split("~")[2] } }//end Container }//end ListItemComponent onCreationCompleted: { //The data inside append is one item. //let's append a bunch of data for(var i=0;i<30;i++){ //append 30 list items myDataModel.append("Header~Some data whatever~Status"); } } }
- In my example I am adding data to the model.
ListItemData - the full string
ListItemData.split("~") [0] - first part etc.
- I shared parts of the data with a single symbol. In my case the «~»
- To get the data I want to that I just throw a ListItemData.split("~"). It breaks the string into 3 parts.
- I will be able to access somewhere I want using the notation ListItemData.split("~") [index]
- You can include paths to images, or whatever the text you
AS IF THIS HELPED YOU!
-
ListView with lines divided into two sections
Hi guys,.
How can I develop a listview with rows in two separate sections, as below:
- - - - - - - -
Section 1
- - - - - -- -
Line a1
Line a2
.
.
Line am
- - - - - - - -
Section 2
- - - - - - - -
Line b1
Line b2
.
.
Line bn
use two separate fields
-
I have this QML who have a ListView with datasource to a full ArrayDataModel from the CPP file for creationcompleted, I loop in the table to add the hour together to appear as a label on the page, what works. However, when I want to view these items in the list, it will display only the first element of the QVariantMap within the table, no error on the log of the device. Also, triggered more does not work, but when I click it, it will have a blue border surrounding it, but the onTriggered does not fire.
Here is an excerpt of the CPP on the table fill
This-> eventsModel = new ArrayDataModel();
QVariantMap event;
event ['EventName'] = "Event1";
event ["EventHour"] = "00";
event ["EventMinute"] = "01";
event ["EventSecond"] = '02 ";
QML-> setContextProperty ("eventsModel", it-> eventsModel);
Here's the QML
{Of container
ID: eventListContainer
{To ListView
ID: eventList
dataModel: eventsModel
Use a ListItemComponent to customize the appearance of the list view
listItemComponents:]
{ListItemComponent}
type: 'point '.
{StandardListItem}
Title: 'Event' + ListItemData.EventName;
Description: "time:" + ListItemData.EventHour + ":" + ListItemData.EventMinute + ":" + ListItemData.EventSecond; "»
}
}
]
onTriggered: {}
var selectedEvent = dataModel.data (row);
var eventDetailPage = eventDetailDefinition.createObject ();
eventDetailPage.txtEventName.text = selectedEvent ['EventName'];
eventDetailPage.pickEventTime.value = picker.dateFromTime(selectedEvent["EventHour"]+":"+selectedEvent["EventMinute"]+":"+selectedEvent["EventSecond"]);
eventDetailPage.open ();
}
}
Any help would be appreciated.
Thank you.
ListView determines ItemType of the element by calling the function itemType of the dataModel. By default, an ArrayDataModel returns an empty string for this call (see https://developer.blackberry.com/cascades/reference/bb__cascades__arraydatamodel.html).
This leaves you with a few options:
(1) If you have no header and all the elements are the same, you can make
ListItemComponent { type: "" ...
(2) If you have headers or different elements, you can extend ArrayDataModel and implement your own function of itemType
(3) you can define a function of ItemType on your ListView in QML. Documentation:
ListView called DataModel::itemType() for each item in order to know the type. QML, this can be overridden by declaring the itemType function (data, row) on the ListView element. ListView then call this function instead of the function DataModel.
Here's how to create a list in QML which creates a header for all items on the high level and aStandardListItem for each item below the top level:
-
Custome headers in HttpRequest
Hello
I have a few problems, including the extra headers in my HttpRequest. I tried it with ActionScript and mxml too, but not the headers have been added. All I know is that I should use an object. That's what I've experimented with so far:
var Header: Object = new Object();
Header = [name = 'CustomH', data = 'Test'];
Request.Headers = Header;
< mx:HTTPService
ID = "Request".
' URL =' http://localhost: 8080/TestServ '
method = 'GET '.
headers = "CustomH: Test.
useProxy = "false" >
< / mx:HTTPService >
TestServ is a java servlet. She is to write the headers in the request.
Could someone help me? I'm really stuck.
THX.Well, turns out you can set custom headers only on POST requests, not les gets. A kind of limitation in the player. Well.
-
Firefox 4 deployment with custom user settings?
Hi people,
I want to deploy FF 4.0 with custom user settings, but where is the "localized" my prefs.js file folder? In FF 3.6.x we extract the setup.exe file and with sources, we have deployed our customized firefox. In FF 4.0 now, there is some file missing from news sources. Are there any documents that explain the deployment of FF 4.0? Thank you very much
You can always create a folder/defaults/profile and places the files in this folder to have in a new default profile. Folders that have no content are no longer present in the version of Firefox 4 RC, but some are still read and processed.
-
In excel 2003, is there a way to keep your custom headers and customer footers to the same size as the page at 100% or 76% or 50%.
Hello Terri Haineman,
Thank you for visiting the Microsoft answers community.
The question you've posted in Office-related and would be better suited to the office community. Please visit the link below to find a community that will provide the best support.
http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Excel.misc&lang=en&CR=us
Chris.H
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think. -
Hello
We have a requirement of click to call in installing 10.5 UCCX with customer website (user input) for our client, anyone who tested it in the laboratory/prod settings?
Thank you!!
MagaliHello magali.
It is possible to deploy with UCCX HTTP trigger type. To get the number of customer via the HTTP trigger to the script. Then we can place the outgoing number of customer to campaign or appeal directly to the customer and place this call to the QSC.
There are two scripts for web reminder in Cisco repository of scripts, see this http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/cont...
-
Hello
I want to give as open & export to the level of permissions.
How to create user defined groups and users with custom permissions as only open and export in obiee 11 g?
For example, if the group permissions, inturn should reflect on the users.
Please help me.
Thanks in advance,
A.Kavya.
Your question is quite broad and fuzzy then I suggest the security catalog presentation to read documentation: http://docs.oracle.com/middleware/1221/biee/BIESC/mgrgrpsusers.htm#CIHIBJGD
And I think that you mix you two things which are managed in different places:
) an object as read access permissions, write, delete... which control you through the object "Permissions" dialog box
(b) functional privileges controlled through "Manage privileges" under "Administration".
-
Hi all
There is a problem, I'm dealing with my custom page. I am trying to expand the controller with my custom class, but get the error below
oracle.apps.fnd.framework.OAException: could not create Java class: (oracle.apps.xxar.cusstd.createcus.webui.xxArCreCusCO) associated with the area: (ArUtilRN). It is probably because the class name is incorrect or not included in the project.
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1247)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2848)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1991)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:567)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:455)
If the file is present in the right folder
[webui applmgr@gfs3devapp1] $ pwd
/ opt/oracle/gfs2d/FS1/EBSapps/COMN/java/classes/Oracle/Apps/xxar/cusstd/createcus/WebUI
[webui applmgr@gfs3devapp1] $ ls - ltr
Total 4
-rw - r-. 1 applmgr oinstall 1177 Feb 25 10:17 xxArCreCusCO.class
I have to follow this discussion, but is not help me: https://community.oracle.com/thread/3647610
Please help.
Thanks, Jerome
Hello samia,.
In R12.2.4, you will need to create the jar with custom classes. Please visit the Doc ID 1577661.1
Hope this helps you solve your problem.
-
How chat with customer support?
How chat with customer support?
If you use the free Adobe Acrobat Reader software, there is no chat support.
If you use another product, follow the steps here (Customer Contact) and if the chat support is available for this product, click on the big blue "still need help? Contact us' button and you will see a chat option.
-
Slideshow: How to replace on the arrows 'Next' and 'Previous' with custom arrows?
On the homepage of my site, I put in a changing picture with Widgets Library > slideshows > Basic, then added in the images. the only thing I don't like is the appearance of the standard ' Next' and 'Previous' buttons. In want to replace their previous custom and buttons that I created in Photoshop. I tried to do by double-clicking on the icon 'Next' and then hit the blue circle/arrow, then press "Add picture" and select the file with the arrow custom, but instead to replace the icon/button 'Next', she just added the arrow custom slide show. I looked in the tutorials and help online but can't find an answer. Anyone know how to replace the arrows "Next and previous" with custom arrows?
Hello
To place your own images for the button previous and next, you use the fill feature. Please check the following steps:
1. go slideshow options and uncheck the Edit set.
2. Select the next button and click complete to open filler panel.
3. click Add picture and select the image you want to use. Also select the type of connection as "Scale to fill" or "scale to fit"and make the 'Center'. "
4 do the same for the previous button.
Concerning
Vivek
-
Hello
I am keen on the form tool allows you to create multiple copies of documents with customized in each information fields. From excel data. Is this possible?
Thank you
Charlotte
This is called a fusion and mailing. There is a possibility of Embedment in some versions of Excel (via the Acrobat PDFMaker plugin), or it can be done using a script.
-
I want to change my plan of Photoshop at version student creative cloud - can't everyone by live chat and no way to communicate with customer service. Anyone know how to contact adobe?
Hi Beansy21,
Please see the link below to contact customer support:
http://helpx.Adobe.com/contact.html
Kind regards
Sheena
-
How to get in touch with customer service?
How to get in touch with customer service? Twice I had a cat and I would get an answer in the coming days. Never heard a thing! I need an invoice for my accounts but I can't download it. It is said: the customer service contact. But I chatted for 2 times, tried to call, they don't answer the phone. Where is the customer service!
Hi Regine43b,
Please visit the following link to get your monthly bill: http://helpx.adobe.com/x-productkb/policy-pricing/print-creative-cloud-receipt.html
If in case still encounter you problems, please contact support @ https://helpx.adobe.com/contact
Kind regards
Sheena.
Maybe you are looking for
-
I can't connect to iTunes is a matter of course on?
-
Compaq Presario CQ57-339WM upgrade CPU for Intel Core i3 2310 M?
Can I upgrade the processor? : http://ark.intel.com/products/52220/Intel-Core-i3-2310M-Processor-3M-Cache-2_10-GHz He was given to me by the guardian after that I asked them if they had an available 988 PGA processors
-
How to modify programmatically legends of 3D chart axis?
Hi all I use a 3D graph to display the results of a particular set of tests. I want to change the legend on an axis according to which test I run, for example, the x axis to change its legend of Deg C at time (nS), it only seems to be a property to f
-
I downloaded PC Mightymax 2011 so decided that I didn't want it. Now I can't get out of my computer. It is not under the programs, but it keeps popping up on my computer. How can I stop it?
-
My HP Photosmart 7520 new e-all-in-on the series must be woken up physically. After that he goes to sleep, I have to go and turn the wifi market until I can send a command to print from a computer or an iPad. Why a wifi printing command not wake the