I am using CtreeCtrl and just struck with a new case which i haven't faced before..
The case is ..
I add more than 2000 items in a particular node .. but i can see only 200+ items under the node..(each time i get different counts displayed) ( ??? )
TreeControl->InsertItem(server,icon,icon,TempParent,TVI_SORT);
So what is wrong here..? Should i need to set any property here..? or Is there any max limit in adding items in the node...??
I add more than 2000 items in a particular node .. but i can see only 200+ items under the node..(each time i get different counts displayed) ( ??? )
There is no property you can set. I just created simple project and added 6 branches, each containing 2500 nodes and have no problem displaying all.
It must be something in your code, that prevents a proper display.
Two choices:
Create simple project and add large amount of items or post your project for download to see what is going on.
I cannot see any other way to help you.
Related
I need to get all the items of a SharePoint list and send as JSON
But the default is 100
If I set a larger number like 10000 it gives this error on the flow:
The attempted operation is prohibited because it exceeds the list view threshold.
So I am trying to get it in batches of 350 items.
But how can I use the Filter Query to start at a position x and return y items?
I tried
$skip eq 350
But this error occurs:
Column 'skip' does not exist
I think your question has 2 layers to it.
To increase the number of items returned by the Get Items Actions from Sharepoint you need click on the three dots on the left side of the action, and then go to Settings and you will see the image below, then set the size to 5000, that means your Get Items action will now return a maximum of 5000 items.
$top and $skip - I am not too confident what you are trying to do with this but perhaps share a bit more context, it sounds like you want to build a dynamic pagination ? Please explain this part unless the first point already achieve what you were aiming for
I'm starter to use JHipster. One of my entity A has more than 3000 data. So I used infinite-scroll as pagination. But as relation to another Entry B, it will be generated as a comboBox in the dialog. I got only 20 data in the comboBox. There is no infinit-scroll or search and loading to get more data.
Can someone give any advice to fix the problem?
The infinite scroll uses pages (which is mapped to pageablea in spring). Thus, your service call that fetches the data for the box only fetches the first page. And the default page size is 20. So, you need to increase the page size to get more results.
You can either overwrite the "size" variable or the global constant called "itemsPerPage" which is located in pagination.constants.js
Am I right that it is a one-to-many relationshiop and you want to choose one of 3000 possible A for an entity B?
If so, you don't want to load all 3000 possible As into the dropdown. Therefore, I would replace the dropdown with another input, e.g. the typeahead from angular-ui (https://angular-ui.github.io/bootstrap/#/typeahead), so you can fetch a filtered subset of your entities.
Another way, I also used before, would be a list with a pagination for A that opens in a modal and returns the selected entity that could be passed to b.
Or, if you really want to fetch all: I would add a new endpoint without the pageable, add a new method to the angular-resource-service and call this instead of the paged version.
TypeAhead works fine If you don't have so many documents. If i delete lots of them typeAhead works. I think there is a limitation #DbColumn() in typeahead option.
How to solve this problem? It's like a 64k size problem but any suggestion is important
Thanks in advance
C.A.
Are you using #DBColumn() or #DBLookup() to populate your typeahead? They do have 64K limits. (I'm not sure as I read your question, so I ask for clarification).
If so, you might want to consider looking at links like this Can typeahead results be returned from a java function,
I've recently done one with a massive number of documents (millions). I used this, but since it was taking a lot of time to return, I changed it to get the first selected entry in the view (based on the value from the AJAX typeahead), created a ViewNavigator from that entry, and used the setBufferMaxEntires property to restrict the size of the returned ViewNavigator. This lets the process go quite fast.
Brian
UPDATE:
As requested. I started with using results like I linked above, then I added
ViewEntry startEntry = canQLView.getEntryByKey(searchValue, false);
allObjects.addElement(startEntry);
if (startEntry != null) {
ViewNavigator matchingEntries = canQLView.createViewNavFrom(startEntry);
matchingEntries.setBufferMaxEntries(10);
ViewEntry entry = matchingEntries.getFirst();
You can see I get a single entry rather than a ViewEntryCollection, start my ViewNavigator from that entry, and the setBufferMaxEntries property restricts how much is fetched - you can change it, but a low number is sensible since it's a typeahead.
Cheers,
Brian
Correct, there is the 64Kb limit on #DbColumn(), it's not an XPages-specific limitation and various blog posts confirm it. Ensure typeahead is only provided once the user has entered an appropriate number of characters that can restrict. After all, the typeahead should return a small number of entries for the user to select from, otherwise it's not much use. Then use #DbLookup with "[PARTIALMATCH]" or getAllEntriesbyKey. There are a number of blog posts available that give code samples.
I've set up an ExtLib REST service as "xe:viewJsonService" and connected it to a domino view. Currently the view contains 63 entries. The documents behind those entries have read access restrictions.
The Json returned by the service is consumed by a Dojo Data Grid (taken from the ExtLib libraries).
The page is accessed by a test user having read access to only one of the 64 entries. This user however sees a data grid containing a single data element, followed by 63 empty entries, like this:
Looking at the raw Json data I see that the service indeed is only returning a single entry, but it knows that there are 63 siblings:
[
{
"#entryid":"1-6C5763E4A122F1D3C1257EC700355386",
"#unid":"6C5763E4A122F1D3C1257EC700355386",
"#noteid":"3FD2E",
"#position":"1",
"#read":true,
"#siblings":63,
"#form":"fInvoice",
"colIconStatus":"imgInvExported.gif",
"colIconLock":"blank.gif",
"invInvoiceDate":"2015-09-21T09:44:27Z",
"invJobInvNumbers":"111\/5152\/52567\/ 001",
"invSupplierNameShort":"My Test Company GmbH",
"invAmount":121.5
}
]
Technically speaking this is correct as the service has access to all 64 entries. Problem is that the data grid is making space for 64 entries instead of only one.
Question is: how can I tell the data grid the correct amount of data to be displayed? Or do I need to manipulate the REST service instead?
EDIT: continuing my search for a possible solution in meanwhile found a few other related questions this one by Eric McCormick (including a very good approach by Stephan Wissel), or this one by Steve Zavocki. So my question would be a duplicate, really... (sorry for that)
Caveat: please read down to the bottom of this answer as you might run into unexpected ussues!
Finally after some playing around I just stumbled upon an obscure property that seems to help, for whatever reason (I'll be making this a new question):
the property globalValues appears to be available for service types xe:documentJsonService, xe:viewItemFileService, xe:viewJsonLegacyService, xe:viewJsonService and xe:viewXmlLegacyService. this property has three fixed options called Entries (= 0x0001), Top Level (= 0x0002) and Timestamp (= 0x0004). Just by playing the goold old "trial-and-error" game I found that setting this property to 1 (= Entries) modifies / filters the resulting data:
by default the raw JSON returned by xe:viewItemFileService looks like this:
{
"#timestamp":"2015-10-14T12:57:59Z",
"#toplevelentries":63,
"items":
[
{
...
}
]
}
Setting globalValues to "1" removes the #timestamp and #toplevelentries fields from the output:
{
"items":
[
{
...
}
]
}
And, more importantly, this also removes the empty rows from my data grid!
There's only one thing that's making me nervous and that is that I can't find any explanation at all in regards to that property. So I really don't have a clue whether there are any unwanted side effects...
Update: thanks to Knut Herrmann I did some more testing on this (see comments below this answer). In my test case there are over 13,000 documents in my view; as long as my test user can only read a small amount of those everything seems to be fine. Then I added 200 more documents to the read-enabled list. Result is a data-grid that constantly has to recalculate its scroll bar: the further down I'm scrolling the smaller the scroll handle gets. As soon as I reach the bottom line however the grid goes berzerk and decides to only display the first 13 (?!?) rows, and also the scroll bar is removed alltogether. Performance isn't as bad as I expected, though.
So I have to agree with Knut that this isn't such a good solution for the combination of large views with a large subset of accessible entries!
Lothar,
I have experienced this before as you pointed out. I believe the answer is to use the 'keys' property to filter out the invalid entries.
I am not sure about how your application is structured, but if the user can only see certain entries in the view, I would consider categorizing by user, and then use the keys to show them only the rows in which they have access.
You asked if you can change the dojo grid to exclude the entries. I think the answer there is no. Your options are to filter via the REST service or via the Notes view.
Here is a related blog post that I wrote on the issues I was having. http://notesspeak.blogspot.com/2013/07/creating-updatable-rest-service-for-use.html
EDIT 2 Additional Things to Try
1) Did you see the comment on my blog post? I haven't tried it myself. Credit goes to blog comment-er "Goo Goo".
"I use this code in onstyleRow event of the grid to solve the blank rows issue "
which using viewJsonService:
var row = arguments[0];
var rowItem = djxDataGrid1.getItem(row.index);
var rowCount = Object.keys(restService1._index).length - 1; //-1 for omit the onUpdate event
if(row.index >= rowCount){
row.customStyles += 'display:none;';
}
2) What I personally did to fix the issue is in this SO answer: How to configure an xe:viewFileItemService on an XPage to filter the data in a categorized view?
Given what you said about your view structure, I am not sure that this will apply to you.
I want to create a view where all 5 of my taxonomy terms are displayed and it then displays the latest node published but this is limited by 1. For Example:
Tax Term 1
Latest node published
Tax Term 2
Latest node published
etc etc
Currently I'm grouping by taxonomy term so it's displaying all nodes published then sorted by published date desc. I can't quite figure out how to limit the nodes to only show one item per taxonomy term.
Any help would be greatly appreciated.
This is possible with Views 3. I've tested this on D7, but should work on D6 also.
Add a new view of type - Taxonomy terms
Add relationship - Taxonomy term: Representative node
Other - Use aggregation: Yes
Add field - Content: Title. Change Aggregation settings to Group results together
It's not great if you have a lot of nodes, but I've done this in other cases by using a filter for "Promoted to front page" - then you simple make sure you only promote one node at a time.
I'd suggest to use a combination of panels ans views.
First, create a (or use the default) view for nodes which takes a taxonomy term as argument. Second, create a panels page containing five regions. Each region is to be filled with a view (in fact it's going to be the same view from step one, but with different arguments). Within panels ui you can restrict the number of shown entries of each view, set this value to one to have only one article be shown per term.
Panels: http://drupal.org/project/panels
Views: http://drupal.org/project/views
I'd recommend checking out the Views Group By module.
http://drupal.org/node/389230
The tutorial listed above actually describes almost exactly what you are trying to do.