Function adobeDPS.libraryServices.folioMap.sort doesn't work
Hi, I'm working with custom storefront and until yesterday the function folioMap.sort works fin, I get all folios published with this function, but today it doesn't work, I get always a empty array and my library looks like this:
And if i debugger it I found that my folios is always an empty array:
What am I doing wrong?
Hi Neil, Thank you four your answer.
Yes, I'm updating library. This is my code:
adobeDPS.initializationComplete.add(function(){
Store.init();
Store.init = function(){
var transaction = adobeDPS.libraryService.updateLibrary();
transaction.completedSignal.addOnce(Store.updateLibraryHandler, this);
Store.updateLibraryHandler = function(transaction){
Store.folios = [];
// Sort the folios descending.
var list = adobeDPS.libraryService.folioMap.sort(function (a, b) {
if (a.publicationDate < b.publicationDate)
return 1;
else if (a.publicationDate > b.publicationDate)
return -1;
else
return 0;
//HERE Store.folios always is empty
Thank you very much.
Similar Messages
-
APEX_ITEM report - SORT doesn't work
Hi,
For the following report, the SORT doesn't work. I've also tried with the "Report Attributes", but same result. Does someone know is there a way to make it sorted or can confirm it's not possible.
Thanks.
SELECT
APEX_ITEM.CHECKBOX(11,id_cc_delai_recueil) id_cc_delai_recueil,
APEX_ITEM.HIDDEN(12,id_cc_delai_recueil)||APEX_ITEM.HIDDEN(13,id_cc_regle)||APEX_ITEM.TEXT(14,numdelai,3) numdelai,
APEX_ITEM.SELECT_LIST_FROM_LOV(15,typedoss,'DOSSIERS OU DOCUMENTS',NULL,'NO') typedoss,
APEX_ITEM.TEXT(16,suppdoss,3) suppdoss,
APEX_ITEM.SELECT_LIST_FROM_LOV(17,rem_suppdoss,'REMARQUE_DELAI',NULL,'YES','','') rem_suppdoss,
APEX_ITEM.TEXT(18,perioactif,3) perioactif,
APEX_ITEM.SELECT_LIST_FROM_LOV(19,rem_perioactif,'REMARQUE_DELAI',NULL,'YES','','') rem_perioactif,
APEX_ITEM.TEXT(20,periosmact,3) periosmact,
APEX_ITEM.SELECT_LIST_FROM_LOV(21,rem_periosmact,'REMARQUE_DELAI',NULL,'YES','','') rem_periosmact,
APEX_ITEM.SELECT_LIST_FROM_LOV(22,dispoinact,'DISPOSITION1',NULL,'NO') dispoinact,
APEX_ITEM.SELECT_LIST_FROM_LOV(23,rem_dispoinact,'REMARQUE_DELAI',NULL,'YES','','') rem_dispoinact
FROM
cc_delai_recueil
WHERE id_cc_regle = :P52_ID_CC_REGLE
ORDER BY
3,
2Paulo,
Remove the Order By clause from your Select statement and then use the Report Attributes to determine your sort order.
Jeff -
Function xfa.sourceSet.dataconnection.update() doesn't work
Hi!
I want to update the field information on the SAP database and found in the Adobe documentation the function:
xfa.sourceSet.dataconnection.update() .
But the function doesn't work. Any ideas?
Thanls and best greetings,
GregorHi Andre,
What Version of SAP Business One are you running?
There is a known bug in the DI-API in 2005A SP01 PL36 (not sure what others it affects) that prevents an update to the billing address details. I think this is resolved in patch 43
SAP Note: 1128151 describes the issue.
Symptom
Update of BP default address information via DI is not complete.
Scenario:
Via DI: Update default address information in the business partner master data:
Dim oBP As SAPbobsCOM.BusinessPartners
Set oBP = vCmp.GetBusinessObject(oBusinessPartners)
oBP.GetByKey (txtBPCode.Text)
oBP.Addresses.SetCurrentLine (1)
' not the visual line number, this indicates the 2nd line(order by
LineNum) in CRD1 for the specific BP
oBP.Addresses.AddressName = "aa"
oBP.Addresses.City = "bb"
oBP.Addresses.Street = "cc"
oBP.Addresses.Block = "dd"
ErrCode = oBP.Update()
Expected Results:
All information is updated.
Actual Results:
Only the AddressName field is updated; all other information is lost.
Other terms
SAP Business One, SDK, DI, BP, Default Address, Update.
Reason and Prerequisites
Application Error.
Solution
SAP planns for this issue to be fixed in a patch of Release 2005 A SP01 and 2005 B. Please refer to the info.txt file on SAP Service Marketplace to confirm that the fix was included.
Header Data
Release Status: Released for Customer
Released on: 10.01.2008 04:43:08
Priority: Correction with medium priority
Category: Program error
Primary Component: SBO-SDK-DI Data Interface
Secondary Components: SBO-SDK Software Development Kit
Affected Releases
SAP-M-BO 2005 2005 A SP01 2005 B
Related Notes
1135653 - SAP Overview Note for SAP Business One 2005 A SP01-Patch 43
Regards,
Sean
Edited by: Sean Archer on Aug 1, 2008 3:15 PM -
Std::list::sort() doesn't work with custom class
The following example doesn't order a list the way I'd expect. Is this being done wrong? Sun Studio 12 (not update 1). Current patches as of Monday.
#include <list>
class CMyClass
public:
CMyClass(long a) : m_Sec(a) { }
bool operator<(const CMyClass* rhs)
return (m_Sec < rhs->m_Sec);
long m_Sec;
typedef std::list<CMyClass*> TLogList;
int
main(int argc, char* argv[])
TLogList logList;
CMyClass* name = new CMyClass(0x4A833E79);
logList.push_back(name);
name = new CMyClass(0x4A85E144);
logList.push_back(name);
name = new CMyClass(0x4A85E66F);
logList.push_back(name);
name = new CMyClass(0x4A85E66F);
logList.push_back(name);
name = new CMyClass(0x4A85B2C2);
logList.push_back(name);
name = new CMyClass(0x4A85D6EF);
logList.push_back(name);
name = new CMyClass(0x4A69F9AD);
logList.push_back(name);
name = new CMyClass(0x4A85DC92);
logList.push_back(name);
name = new CMyClass(0x4A817316);
logList.push_back(name);
name = new CMyClass(0x4A85DEEB);
logList.push_back(name);
name = new CMyClass(0x4A846329);
logList.push_back(name);
name = new CMyClass(0x4A85E39D);
logList.push_back(name);
name = new CMyClass(0x4A85D41D);
logList.push_back(name);
name = new CMyClass(0x4A89CC17);
logList.push_back(name);
name = new CMyClass(0x4A85DC19);
logList.push_back(name);
logList.sort();
TLogList::iterator logListIter = logList.begin();
TLogList::iterator logListEnd = logList.end();
for (; logListIter != logListEnd; ++logListIter)
CMyClass* name = *logListIter;
cout << hex << name->m_Sec << endl;
return 0;
which produces
4a833e79
4a85e144
4a85e66f
4a85e66f
4a85b2c2
4a85d6ef
4a69f9ad
4a85dc92
4a817316
4a85deeb
4a846329
4a85e39d
4a85d41d
4a89cc17
4a85dc19The program as you wrote it will sort the contents of the list. The list consists of the addresses of CMyClass objects, and after sorting, will contain those addresses in sorted order.
If you want to sort by the contents of the classes that are pointed to, you need to provide a comparison operator that compares the contents, and use the other form of the list::sort function that takes a comparison function as an argument. That is, add the function
bool comp(const CMyClass* l, const CMyClass* r)
return l->m_Sec < r->m_Sec;
}and change
logList.sort(); to
logList.sort(comp); This version of list::sort will not compile using the default libCstd, because it requires member templates in the library implementation. For more information about this limitation, refer to the C++ FAQ section on library compatibility.
[http://developers.sun.com/sunstudio/documentation/ss12u1/mr/READMEs/c++_faq.html#LibComp]
The revised code will compile with the optional STLport library, or with other 3rd-party libraries like Apache stdcxx. To use STLport, add the option -library=stlport4 to every CC command, compiling and linking. You cannot mix code compiled for the default libCstd with STLport code in the same program. -
I'm new to APPLE.
My trackpad functions stopped working after a few months. The settings say they are all on, but they are not functioning. Any ideas on what I can do to get these back (especially the zoom/shrink). ThanksSystem Prefertences > Trackpad > Point & Zoom
Uncheck boxes beside all items and recheck it.
If this doesn't help, try resetting PRAM and SMC.
1. Reset PRAM. http://support.apple.com/kb/PH14222
2. Reset SMC. http://support.apple.com/kb/HT3964
Choose the method for:
"Resetting SMC on portables with a battery you should not remove on your own". -
Using 'export -f FUNCTION' from within a script doesn't work
Why doesn't the 'export -f FUNCTION' work as expected in the following:
#!/bin/bash
target="$1"
[[ -z "$target" ]] && echo "No target specified." && exit 1
work() {
bsdtar -xOf "$target" .PKGINFO | egrep -w 'pkgname|arch|pkgdesc|group|conflict|depend|replaces' | sed -e 's/pkgname/\npkgname/' >> /scratch/pkgs.log
export -f work
find /scratch/repo -name "$target*.pkg.tar.xz" | parallel work
It errors out when called:
% ~/bin/repo/check_pkgs broadcom
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_work
zsh:1: command not found: do_workmoetunes wrote:The command you are exporting is called work. The command it fails on is do_work
That was a copy/paste error based on me trying multiple scripts. Sorry about the confusion.
% ./test linux
zsh:1: command not found: work
zsh:1: command not found: work
falconindy wrote:
It's also the wrong solution to be exporting functions...
Yay for ineffective crossposting... https://bbs.archlinux.org/viewtopic.php?id=153461
Exporting functions is recommended in the parallel man page.
The command must be an executable, a script, a composed command, or a function. If it is a function you need to export -f the function first. An alias will, however, not work (see why http://www.perlmonks.org/index.pl?node_id=484296).
Also, how is this a cross post? The post you referenced is about parsing input, this one is about calling a function from within the parent script.
Awebb wrote:Why does zsh report a problem with a bash script?
No idea
Last edited by graysky (2012-11-24 14:35:15) -
TAB functional​ity in Report Generation doesn't work.
Inserting TABS either by putting in a string or concatenating with the TAB constant doesn't seem to work. In the HTML file created by "Example HTML Report.vi" there are supposed to be two tabs in the text but they don't seem to be there. I'm trying to perodically insert data into tab delimited columns in a report. I'm using LabView 6i on Win2000.
I don't know much about HTML but I haven't found a tag for TAB by looking at a few WEB sites. And yet..there's a "Set Report Tab Width.vi" in the Report Generation sub-pallette. The "Append Report Text.vi" has a sub-vi called "HTML Report Token Converter.vi". When it gets the tag it sends a
, which I believe is a HTML line break. Not exactly equivalent to a TAB as far as I can see. If you can't send a TAB to HTML why set the TAB Width? So it seems the problem isn't with the example it's with the implementation of the Report Generation sub-pallette. Maybe the Report Generation utilities were developed for an older version of HTML and need to be updated. When I "View Source" on the HTML document that's being created, I get "-//W3C//DTD HTML 4.0
Transitional//
USAYPG
4221Z Met Data
Wednesday, June 19, 2002
1:28:04 PM
Test of Report Generation
Item Item Item Item Item
Time
Temp
Humidity
Pressure
1.00
2.00
3.00
4.00
101.00
102.00
103.00
104.00
Don't know if this will help or not. -
Can someone help me why this quick sort doesn't work
public class QuickSortII {
static void sort(int a[], int lo0, int hi0) {
int lo = lo0;
int hi = hi0;
if (lo >= hi) {
return;
int mid = a[(lo + hi) / 2];
while (lo < hi) {
while (lo<hi && a[lo] < mid) {
lo++;
while (lo<hi && a[hi] >= mid) {
hi--;
if (lo < hi) {
int T = a[lo];
a[lo] = a[hi];
a[hi] = T;
if (hi < lo) {
int T = hi;
hi = lo;
lo = T;
sort(a, lo0, lo);
sort(a, lo == lo0 ? lo+1 : lo, hi0);
static void sort(int a[]) {
sort(a, 0, a.length-1);
static public void main(String[] args) {
int a[] = new int[20];
a[0] = 18;
a[1] = 11;
a[2] = 12;
a[3] = 4;
a[4] = 20;
a[5] = 5;
a[6] = 1;
a[7] = 3;
a[8] = 16;
a[9] = 8;
a[10] = 7;
a[11] = 17;
a[12] = 9;
a[13] = 6;
a[14] = 19;
a[15] = 2;
a[16] = 13;
a[17] = 15;
a[18] = 10;
a[19] = 14;
sort(a);
for (int j = 0; j < 20; j++) {
System.out.print(a[j] + " ");
}it doesn't sort the listit doesn't sort the list Please explain why you think it should. Doing so will help you understand the code.
~ -
Descending sort doesn´t work
I use a report with 10 columns. One should be sorted in descending order.
But the Option "Sort Sequence 1 desc" dosn´t work as I aspect:-)
Does anybody uses this Option?
Thanks
MarcoMarco,
That option specifies the default sorting. Once you sorted a report by clicking on a storable header, youre setting a preference. That means whenever you return to that report, its sorted by your last sort setting. And that preference is persistent and tied to your user, not your session. If you want to reset the report, you could purge your preferences in the Application Express administration. You should then see the expected results.
Regards,
Marc -
BI Publisher 11.1.1.5.0
Validate template option returns "No Error found."
RTF Template
<?for-each-group:ROW;./ORDER?><?sort:current-group()/N;'ascending';data-type='number'?><?sort:current-group()/ORDER;'ascending';data-type='text'?><?N?><?ORDER?><?end for-each-group?>XML
<?xml version = '1.0' encoding = 'utf-8'?>
<ROWSET>
<ROW>
<N>1</N>
<ORDER>ORDER1</ORDER>
</ROW>
<ROW>
<N>2</N>
<ORDER>ORDER3</ORDER>
</ROW>
<ROW>
<N>1</N>
<ORDER>ORDER2</ORDER>
</ROW>
</ROWSET>Result
1ORDER2
1ORDER1
2ORDER3Wanted result
1ORDER1
1ORDER2
2ORDER3Am i doing something wrong?
Thanks in advance,
Igor
Edited by: svms on 07.09.2012 16:55Thanks for the reply but it still not working as I want.
Here is new XML
<?xml version = '1.0' encoding = 'utf-8'?>
<ROWSET>
<ROW>
<N>5</N>
<ORDER>ORDER4</ORDER>
</ROW>
<ROW>
<N>1</N>
<ORDER>ORDER2</ORDER>
</ROW>
<ROW>
<N>2</N>
<ORDER>ORDER3</ORDER>
</ROW>
<ROW>
<N>1</N>
<ORDER>ORDER5</ORDER>
</ROW>
<ROW>
<N>3</N>
<ORDER>ORDER1</ORDER>
</ROW>
</ROWSET>Your code returns
3ORDER1
1ORDER2
2ORDER3
5ORDER4
1ORDER5I want these 5 groups were in following order
1ORDER2
1ORDER5
2ORDER3
3ORDER1
5ORDER4Regards,
Igor -
The questions sais it all really... It just doesnt work - no matter what i do, the scroll function just doesnt work.
I remember this was the reason why i went back to the old version earlier - but now many sites require the latest version of FF...Try to modify the pref ui.trackpoint_hack.enabled on the about:config page from the default value -1 to 0 or 1 to see if that makes the scroll pad work.
Close and restart Firefox after changing the pref.
To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
If you see a warning then you can confirm that you want to access that page.<br />
*Use the Filter bar at to top of the about:config page to locate a preference more easily.
*Preferences that have been modified show as bold (user set).
*Preferences can be reset to the default via the right-click context menu if they are user set
*Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean) -
MAX function to get recent date doesn't work as expected
Hi,
I recently started working on Oracle and came across this problem. I coded below given query to get the latest date from table and compare it with Sysdate + 1 timestamp. I am not able to understand what I coded wrong but the query gives me wrong results as explained below :
select NVL(MAX(to_char(max(last_update),'mm/dd/yyyy hh12:mi:ss AM')), to_char(sysdate + 1,'mm/dd/yyyy')||' 12:00:00 AM')
from Audit_Table_Name
where col1 = 'AA'
and location_type = 'STATE'
and original_flag = 'Y'
group by col1,location_type,original_flag;
Here Max(last_update) from Audit Table Contains value --> 08/25/2009 12:00:00 AM
Note : Data type of last_update is Date
so ideally speaking it should give 08/26/2009 12:00:00 AM but surprisingly it is giving 08/25/2009 12:00:00 AM as output. Anyone can explain why this is happening and what we need to do to get correct results?
Regards,
Amol1) Why would you expect this to return a date of 8/26? NVL returns the first parameter unless it is NULL. If the first parameter is NULL, it returns the second parameter. Since
MAX(to_char(max(last_update),'mm/dd/yyyy hh12:mi:ss AM'))returns a non-NULL value, that value will be returned. Oracle never needs to evaluate the second parameter
to_char(sysdate + 1,'mm/dd/yyyy')||' 12:00:00 AM'You state that you want to compare the MAX( last_update ) to SYSDATE + 1. Your code isn't doing a comparison now. And it's not clear from your description what comparison you actually want to do. Can you elaborate a bit on what you want to compare and what the output should be depending on the result of that comparison?
2) You almost certainly want to do as much of the logic as possible using dates and only convert to a string at the very end. Otherwise, you risk comparing two strings that represent dates using string comparison semantics and getting a result you don't expect.
3) My guess (and it is just a guess) is that you want something like
SELECT GREATEST( max(last_update), trunc(sysdate+1) )or
SELECT TO_CHAR( GREATEST( max(last_update), trunc(sysdate+1) ), 'mm/dd/yyyy hh12:mi:ss AM' )Justin -
What is the purpose of Destination Function on Submit Button?(Doesn't work)
Hi Gurus,
There is a property "Destination Function" on Submit buttons.
What is the purpose of this field.
I tried setting some values here expecting following behavior in order:
1. Process Form Request will get executed.
2. User will be navigated to the OAF page related to the Destination Function.
Destination Function property probably point to setInvokeFunction method of the OASubmitButtonBean.
Please advise on this.
Thanks and Regards,
PrinceQuestion 2. What is the purpose of View Instance on Submit Button? Is it there for BoundValues? Any examples how can we use this?
Question 3. Related to Question 2, What is the purpose of View Instance and View Attribute on Button? -
Creating a script for a PRIMARY KEY USING INDEX SORT doesn't work
Probably a bug.
h1. Environment
Application: Oracle SQL Developer Data Modeler
Version: 3.0.0.655
h1. Test Case:
1. Create a new table TRANSACTIONS with some columns.
2. Mark one of numeric columns as the primary key - PK_TRANSACTIONS.
3. Go to Physical Models and create new Oracle Database 11g.
4. Go to Physical Models -> Oracle Database 11g -> Tables -> TRANSACTIONS -> Primary Keys -> PK_TRANSACTIONS -> Properties:
a) on General tab set Using Index to BY INDEX NAME
b) on Using Index tab choose a tablespace
c) on Using Index tab set Index Sort to SORTED.
5. Export the schema to DDL script. For the primary key you will get something like this:
ALTER TABLE TRANSACTION
ADD CONSTRAINT PK_TRANSACTION PRIMARY KEY ( TRAN_ID ) DEFERRABLE
USING INDEX
PCTFREE 10
MAXTRANS 255
TABLESPACE TBSPC_INDX
LOGGING
STORAGE (
INITIAL 65536
NEXT 1048576
PCTINCREASE 0
MINEXTENTS 1
MAXEXTENTS 2147483645
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
) SORTED
h1. Reason of failure
The script will fail because SORTED is not allowed here. It should be SORT.
Additionally, the default behaviour for Data Modeler is to set Index Sort to NO but default setting for Oracle database 11g is SORT. Shouldn't Data Modeler use SORT as the default value?
Edited by: user7420841 on 2011-05-07 03:15Hi,
Thanks for reporting this problem. As you say, it should be SORT rather than SORTED. I have logged a bug on this.
I also agree that, for consistency with the database default, it would be better to have SORT as the default in Data Modeler.
David -
Yosemite mail mailbox alphabetical sort doesn't work
Why am I having trouble getting one mailbox into proper alphabetical order, and how can I fix it? It moved a mailbox to end of list, and I can't move it back w/o a lot of trouble, involving possible loss of the mailbox & subfolders along w/ it.
so I was on the phone to AppleCare on another matter... and I thought I'd get this one looked at... and SOLVED!
I was initially told by first support that they hadn't heard of this issue, so I pointed out this wasn't something new to Yosemite and has gone back years in OSX mail in my experience. A supervisor was put on the phone.
we started with the smaller of two Gmail IMAP accounts:
BACKUP BACKUP BACKUP <<< don't say I didn't warn you!
tried the un-enable/re-enable again... to no avail
then we opted to un-enable and add the Account again using the Mail/Preferences pane (didn't resolve the issue).
Then mail did something a little odd. On deletion of this replicated Gmail IMAP account it removed BOTH copies of that account!
But when we re-added it again, it had resolved the Alphabetical mailbox issue!!! HUZZAH
...due to the amount of mail that was then re-caching we opted to resolve the iCloud mail account next.
This time on clicking remove it launched the Internet Accounts pane Mail/ACCOUNTS not the Mail/Preferences/Accounts pane that we where in.
clicked on iCLOUD and unticked Mail. Back into Mail/Preferences/Accounts and deleted iCloud account...this took us BACK to the Internet Accounts pane where we opted to remove the entire iCloud Account.
** at this point you will be presented with lots of DELETE/ MERGE pop ups as you are removing contacts/calendars etc... so be warned!!!!
but on re-adding the iCloud Internet Account, it had resolved the Alphabetical mailbox issue again! HUZZAH
Now the reason I've posted all the waffle to this simple REMOVE and RE-ADD solution
is that it didn't do what I was expecting when clicking the remove mail account symbol, and I thought it best to point this out to others having the issue.
and apart from it messing up my Address Book ON MY MAC Vs iCloud contacts (which was resolved thanks to that backup I took before I did all this)
all is now well in the Alphabetical mailbox dept (for me)
Hope it works for you too!
Maybe you are looking for
-
my ipod touch will no longer connect to my laptop because my ipod is not up to date, but it won't find a newer software. what should I do?
-
How can I import a movie into iMovie 09 from a hard drive? The movie will open and play in idvd but breaks into separate files that can't be downloaded when I try to import. Can it be done? I am trying to create a disc of player highlights for a co
-
Read versions of comments field using javascript client object model
Hi, Does someone knows how to Read versions of comments field in 'tasks' list using javascript client object model? Thanks Manvir
-
Apex Calendar has a row limit per day? character limit per day?
Hi, I am using the apex calendar in my application and it seems to have a limit of rows it can display per day, does anyone knows anything about it? Or maybe a limit of characters it can display in one day. (full month view) What I need to do is to i
-
Precalculation and save workbook
Hi, Can i Precalculate a workbook and save it to the server. For example i have workbook, and i don't "refresh query when opening workbook." I will precalculate Workbooks and save the last results to the server, so users can see the last results ever