Do you try to test with a simple DSP (only one painted field for exemple).
I remember a problem with DSP (9.7.5 ?) when a field (radio group) was not correctly initialized , it could freeze the html page.
Original Message:
Sent: 04-12-2024 10:51
From: Iain Sharp
Subject: unifacetriggers won't work twice in a row.
I have put a call in the print trigger on the form to the $widgetoperation for the HTML field. This calls a proc operation with public web which parses a field in the data and then calls a weboperation with this data which then in turn calls unifaceTriggers to pass the data back to the form to handle. This STILL causes the HTML page to lock up. THe debugger in devtools indicates that it's hitting a this.isblocked, but I can't work out what this is under these circumstances.
I've now spent a full day banging away at this problem, and I have no way of understanding the problem, let alone fixing it. It seems that every time I poke the DSP/Mobile environment, I find something else which just seems to not work in crazy ways, and the support/documentation is between laughable and non-existant.
I am now going to revamp the whole thing to have the DSP store a print queue in the database, and then have the print run solely from the CS client, and hope that 'fixes' the issue. Its that or quit entirely and give the customer his money back.....
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
Original Message:
Sent: 04-12-2024 07:15
From: Iain Sharp
Subject: unifacetriggers won't work twice in a row.
It seems that even if I replace the contents of the onClick with a 'simple' prompt the behaviour persists. (One use of this field, and then the page behaves oddly (I can type in a textarea but it doesn't fire the onchange trigger, similarly clicking a radio group. When this is done and nothing is happening, the mouse goes to 'busy' but the 'processing' image is not displayed.
webtrigger onClickjavascript let person = prompt("Please enter your name", "Harry Potter");/* p=this.getParent(); f=p.getField("PPV_PREP_ID"); id=f.getValue(); rpt=p.getInstance().getEntity("FILTERS.NOMODEL").getOccurrence(0).getField("D_REPORT_FILE").getValue() if (typeof window.unifaceTriggers === "function") { window.unifaceTriggers("web_print",id,rpt) };*/endjavascriptend
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
Original Message:
Sent: 04-12-2024 05:31
From: Iain Sharp
Subject: unifacetriggers won't work twice in a row.
As part of our slow migration from CS to DSP, I have a form with an HTML widget, (the only field painted).
On the loaded DSP I have an attributes only field (button) with a call to unifaceTriggers in the onClick. This is supposed to call another instance which runs crystal reports and produces a print. The first click on this field performs the actions as appropriate. After which, none of the fields in the DSP are responsive. I can't type in text areas, I can (apparently) click one radio group, but the onChange is not fired, clicking the 'button' which just worked does nothing.
To try and find the issue, the uniface trigger in the form is now
askmess "Printing"return 0
But the issue persists.
The onclick trigger I am clicking is
webtrigger onClickjavascript p=this.getParent(); f=p.getField("PPV_PREP_ID"); id=f.getValue(); rpt=p.getInstance().getEntity("FILTERS.NOMODEL").getOccurrence(0).getField("D_REPORT_FILE").getValue() if (typeof window.unifaceTriggers === "function") { window.unifaceTriggers("web_print",id,rpt) };endjavascriptend
id and rpt are populated correctly, and the popup message appears the first time. The mouse pointer after the click is arrow with circle (busy), and whilst I can get a textbos to show the focus border, I can't type in it.
Am I missing something in the javascript to reset the state somehow?
I need to get this to work if we are going to be able to develop a hybrid system to bridge the 'modernisation' gap.
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------