SWT ComboViewer with ContentProposal and Pagination Control (large anmount of data) - combobox

I have implemented a ComboViewer that also uses content proposal (ContentProposalAdapter) functionality in Eclipse RCP application (using SWT). User is able to type first letter of e.g. a street and he gets all valid proposals e.g. streets that starts with 'Mac'. It works really great. Now I am facing additional problem. Number of data to show in this combo can be very big. Now I got almost 200000 records to show. Creating Combo element in GUI takes forever and it crashes my RCP application. I thought about introducing pagination control for this ComboViewer. I would like it to work very similar to this ExtJs solution:
http://dev.sencha.com/deploy/ext-4.0.1/examples/form/forum-search.html
What I was able to find is Nebula Pagination Control (https://www.eclipse.org/nebula/widgets/pagination/pagination.php)
I found just examples where it is user in grid, but not in a combo. There is something like PageableTable, but it is something way different that I need. Does anyone have any example of combining pagination control with ComboViewer? Maybe some other idea, not necessarily Nebula ?
Thanks

You could try using a Text field with AutoCompleteField and TextContentAdapter.
new AutoCompleteField(textControl, new TextContentAdapter(), suggestions);

Related

Quill JS | Implement multi page functionality

I am trying to implement multipage functionality with quill. I want to fix the height of each page, and when user reaches the end of page, instead of editor height to grow or scrollbar to appear, I want cursor to go to next page(editor), similar behaviour as observed in Google Docs or Microsoft word document.
I have already added 2 editors in the view, but not having any idea on how to switch to new page as cursor reaches the end of first page.
i come straight from google trying to figure out something similar with quill and as far as i know and as far as i came while researching this specific topic:
to me it seems as if its not possible with multiple editors since as soon as the user wants to select paragraphs/elements over a multi page span you'd have to figure out how to
make the selection actually possible (try to select content over a span of two div elements which both are "contenteditable"-enabled, which was one of my first tries kinda).
spread the selection on multiple editors (you'd have to keep track of how much the user selected and when and how far the selection is within which editor which is kinda tricky)
execute an action over multiple editors which will be especially hard since there is no thing as "shared toolbar" yet (as far as i know)
so i really hope (🙏) the time helped you to find an sharable 🀲 solution to this but as far as i built up my knowledge about quill so far (which is a bit over a few weeks old now).
what i will try in the near future is to add a new module to show a page break and style all other elements accordingly to simulate the look of a page.

How to structure the CN1 code for a tablet form layout?

I've been building my Codename One app for the phone screen format so far. There is a separate Form for the main menu, then a second Form with a list of elements, and then a third Form to edit an element selected from the list. Each Form has an overflow menu and various Titlebar command buttons. And each (Extended) Form has a lot of code that implements the functions in the Form and shares variables etc.
However, to use the tablet (iPad) screen estate, I would like to show the main menu on the left of the screen, the list of elements in the middle and the element edit form on the right. Something similar to the screenshot below. This seems to be a common type of layout on tablets and suits my app usage pattern well.
However, I don't see an elegant way of structuring the code to do this. I can't easily combine the list and edit Forms into one Form, and writing a completely new Form just for the tablet format would be a lot of work. I assume others have faced the same challenge and would love to hear how you achieved this.
PS. I know the side menu can be made permanent but that only solves part of the problem, not how to show a list and edit Forms at the same time.
There is no one answer for this but if you look at apps like Codename One Build you would notice they adapt to this form factor.
We usually just use isTablet() to adapt the UI at key points to the different form factor. One element is the permanent side menu which we turn on in the init method using code like this:
if(Display.getInstance().isTablet()) {
Toolbar.setPermanentSideMenu(true);
}
It makes the side menu stay open all the time. Within the code we try to use Container instead of Form. This allows us to package multiple logical pieces into a single UI for the tablet mode.

Using buffered renderer for grid in extjs

I'm looking to load a pretty big dataset (around 20k rows) and use the extjs 4.2 grid buffered rendering to view the data. I've seen so many examples that are different (extjs 4.2 examples) that my head is spinning and I can't get any of them to work. There is even an extjs page http://www.sencha.com/blog/first-look-at-ext-js-4-2-grid that shows how simple buffered rendering is in extjs 4.2 (just add the buffered rendering plugin to the grid ) but the examples in the sdk don't look like the example on the web page (they still use the stores buffering configs even though the linked to page above explicitly says you don't need to do that in extjs 4.2).
In the end ... I don't want to hit the server over and over and buffer the data that way. I want to load all the data and just buffer the grid's current dataset.
Does anybody know of an example of how to make that happen ?
Sorry my english is not so good.
Also, if I understood your question on the right way, you have to learn the difference between Remote- and Local Filtering. I think what you search is a local filter,
there you can set individual parameters as you want.
take a look to this example, on the button of the grid, you can find buttons to switch between local- and remote filters, there you got a working example for local filtering. Should do what you want :)

Adding hundreds of images to a WP7 listbox from Isolated Storage, how can I utilize Data Virtualization?

I am trying to add images to a listbox with a "continuous scroll" so the user does not have to press any buttons etc to load the next set of images. The images are stored in Isolated Storage. I will be starting with 500 images. Loading 500 images to a listbox obviously does not work and just eats up all resources in a few seconds. Based on my research I need to use data virtualization so the images are retreived when they are required (on-screen) and disposed of when not-required (of-screen), as opposed to loading them all at once. I have searched the web for examples but have only been able to find code which retreives and displays text etc to populate the listbox as oposed to images stored in IS. I "belive" I need to use an Image within a Data Template, within a listbox and then bind to an IList using a custom class. I can bind the list box to a basic IList and that works ok (only 50 images) but when it comes to creating a custom class etc its over my head. Does anyone have an example of what I need that they would be happy to share? I havent been programming a year yet and have found most of my App requirements to be achievable with a litte research but I cant find any good pages or video that explains this exact requirement and its driving me crazy as I have spent days on it.
Failing that I will have to pay Telerik for their support and use their DataBoundListBox or pay a third party to write it for me, but I thought I would try here before parting with hundreds of dollars!
Thanks for your time(s) in advance!
Here is a proper implementation of data virtualization: http://blogs.msdn.com/b/ptorr/archive/2010/08/16/virtualizing-data-in-windows-phone-7-silverlight-applications.aspx
This is how you bind images to the image control: Image UriSource and Data Binding
To get data Data Virtualization on the Windows Phone 7 you can use the VirtualizingStackPanel class. In the MSDN you can find all the properties you may want to set. To use the control you put your list inside this control:
<VirtualizingStackPanel>
<YOUR LIST>
</VirtualizingStackPanel>
Since you would like to have a tutorial I can point you to Jevgeni TÅ¡aikin blog post on ItemsControl virtualization. If you want more check out the post from Shawn Oster on Improving ListBox Performance.

Problems with page layout in Oracle Apex

I'm trying to solve a formatting issue I'm having with Oracle Apex. Overall, this is a fantastic tool for whipping up proof-of-concept type applications, but whenever it comes to "prettying up" a page, it seems to be very difficult to work around.
I have a simple form-based page based on a table. However, I'd like to do a few simple things like group certain fields together on the form (phone info), perhaps throw an image in etc. I can't see any way to do either of these things inside a form. For example, here is an example page
and here are the small changes I want to make (photoshopped):
What the heck am I missing here? I can't seem to add anything except database fields inside the form to visually change things.
Any help appreciated.
It can be done - see this demo (I took the liberty of copying your icon, hope you don't mind). It looks like this:
How it was done
1) I uploaded the image into Apex. (Alternatively it can be hosted elsewhere).
2) I created a page item of type "Display Image" with attributes as follows:
Note the use of rowspan=3 in two places (circled in yellow), to make the picture and its (blank) label occupy 3 rows of the HTML table Apex uses for layout.
3) I created a page item of type "Stop and start table" and put it after the Mailing Address item. This prevents the phone icon taking up the same horizontal space as the name and mailing address, resulting in phone items being pushed too far to the right.
4) I set the "Begin on new line" property of the first phone item to "No" so that it appears to the right of the icon. The remaining phone items have "Yes" so that they appear below the first.

Resources