Apex: Retain records in checkbox during pagination - pagination

Does anyone here have an idea on how to retain the records that was selected in a checkbox in pagination? I used offset for pagination and a wrapper to handle the records. Thank you!

If you wrote extension controller and use next() method for pagination, you can make a list of all the 'selected' items on the current page before moving to the next page and in processAll() just iterate over the list.
For more details check out this and this discussions.

Related

#SetViewInfo with Sorted Columns

Can someone advise whether #SetViewInfo can be used with click to sort columnns.
When a view is filtered using #SetViewInfo it removes the column sorting options, thus removing the functionality of the view. Even when resetting to all records the column sorting option is not available, however I have overcome this by opening a second view then opening the original view, messy but it works. I am using View Action Buttons. (Not sure how to store the value in a Check Box Action).
Filtering
#SetViewInfo([SetViewFilter]; "userinitials"; "$80"; 1)
Resetting.
#SetViewInfo([SetViewFilter];"";"$80";1);
#SetTargetFrame("frame");
#Command([OpenView]; "DummyView"); //Needed to get the click to sort back
#Command([OpenView]; "OriginalView")
Also if the view is already sorted on another column, ie not in a categorised state no records are found. I don't want to have to remove the sorting options on my views. The help implies you don't need to have the view categorised. But I cannot get it to work if I don't, ie if I use 0 on an uncategorised view nothing happens.
From Help
isCategory - Number. Boolean value. Required in a Standard Outline view; not for use in Calendar views. 1 indicates that the column in the columnName value is a category. 0 indicates that it is not.
Is the #SetViewInfo limited as I have found or am I missing something?
Any help appreciated.
Yes, #SetViewInfo has limitations. As far as I know, you cannot keep the sorting when you use SetViewFilter. I also believe you need to have the view categorized, at least in older versions of Notes this was the case, if I remember correctly.
Limitations like this is why I personally don't use #SetViewInfo very often (if at all), I try to use other ways to display filtered documents.
One way I have handled it in the past is to use a special form with a rich text field, and then I build a list of filtered documents (e.g. through a search) and render the list of documents in the rich text item.
I use this technique to do that: http://blog.texasswede.com/dynamic-tables-in-classic-notes/

Customize Acumatica bulit-in dropdown list with conditions

I have used the answer to Woody's question at
Is there a easy way to customize Acumatica build-in dropdown list? to customize several dropdown lists. Thank you for the guidance with that one. I want to further customize a different drop-down list based on the Class ID and the Status of an Acumatica Case. I am not sure at all how to achieve this. Can anyone provide advice please?
If you are able to write proper 'Search' BQL to get the result, you can use the PXSelector attribute. If you use 'Current' it will use the the current documents field value. So as per your case, you can use the current ClassID and Status to dynamically populate your selector.
Eg:
[PXSelector(typeof(Search<DiscountSequence.discountSequenceID,
Where<DiscountSequence.discountID, Equal<Current<DiscountSequence.discountID>>>>))]
Hope this helps.
I propose you to consider customizable selector, with which you can completely control all your data which will be displayed. Here is example of implementation.

Xpages Repeat Controls Tabular display

I have a situation wherein I need to display all documents in view. Issue is I need to display multivalued fields (can be achieved by modifying view column to display new line). Now issue comes when a column value is also multivalued. E.g. first column is created by looping through 50 fields (single value) and second column is created by looping through corresponding 50 fields but these fields are multivalued.
I am looking for ideas about how to nest repeats in this case. Issue is in first repeat I get the handle of documents but in nested one i am not able to get this handle to be able to loop through fields. And it is not simply one column or value I want to display, there are 4-5 such columns.
Any ideas are welcome.
Thanks in advance.
You want to start looking at a repeat control, not a view control. Have the outermost control loop through the entries in the view and populate the data source of a containing panel with a Notes document. Then inside the panel you only refer to the inner document data source.

Disable Items in drop down list in infopath?

is there a way to disable items in a dropdown list in infopath?
is it also possible to do so without using code (C#/VB.net&etc)???
Thanks a lot for any hint!
Max
Make the field read-only, then the drop-down control won't fire.

viewPanel: how to set a colspan value for response type view entries

Using a viewPanel, how can we display a reponse entry the way it is displayed in the Notes client? Or in other words: is there a way to build some kind of colspan for specific columns based on the current entry's document type?
I made some code a while back to make the categorized views behave more like Notes:
http://dontpanic82.blogspot.no/2010/10/xpages-make-categorized-views-behave.html
Here's another solution from Stephan Wissel:
http://www.wissel.net/blog/d6plinks/SHWL-86V67E

Resources