Author |
Message |
|
Hi Björn,
we use iframeinclude to include a page from another application. When this page tries to access the iframeconfiguration via window.parent.RISCIframeIncludeBuffer we get an exception.
Uncaught (in promise) DOMException: Blocked a frame with origin "http://localhost:8080" from accessing a cross-origin frame.
at h.<anonymous> (http://localhost:8080/dokument-ui/elektra.98e8e150fc21fc8cec1f.js:3597:933)
at Generator.next (<anonymous>)
at s (http://localhost:8080/dokument-ui/elektra.98e8e150fc21fc8cec1f.js:3583:3312)
CapainCasa is running on localhost:8180. The other application on localhost:8080.
In production the applications will be on different servers but in the same domain.
Layout XML
<t:iframeinclude id="neuFAiFrame" height="100%" iframeconfiguration="#{e.NeuFADokumentTabUI.iframeconfiguration}" iframepage="#{e.NeuFADokumentTabUI.iframepage}" width="100%" name="neuFAiFrame" />
Code in embedded page
const url = document.location.href;
const index = url.indexOf("?");
const bufferId = url.substring(index+1);
let info: any;
info = window.parent.RISCIframeIncludeBuffer[bufferId];
In system.xml we deactivated HttpHeaderAttributesForPagesFilter
<filterconfiguration
active="false"
classname="org.eclnt.jsfserver.util.HttpHeaderAttributesForPagesFilter"/>
Is there a way to use RISCIframeIncludeBuffer in this scenario?
Regards
Axel
|
|
|
Great!
Thank you Björn
|
|
|
Hi Björn,
the text in column headers get truncated since update to 20230206.
The columns are wide enough, but the text of the header is truncated (
see screenshot).
Only some Fixgrids are affected. Seems only columns with width=10% are affected
Regards
Axel
|
|
|
In case someone is still using Swing...
We did a CaptainCasa Update from 20221005 to 20230206. After the update the applet containing the swing client did not start with a ClassNotFoundException.
After checking the server-side logs we saw a problem with SecurityFilterRemoteAddress. Session information and request information did not match and the jar was not loaded.
...
2023:02:08 14:35:22:817 | 1945 | SEVERE | Client that sends the request is not the one that created the session. Aborting security check with error. /elektrang/eclnt/images/splash_neutral.jpg
2023:02:08 14:35:22:818 | 1945 | SEVERE | Session information: 10.6.12.167/null/Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
2023:02:08 14:35:22:818 | 1944 | SEVERE | Client that sends the request is not the one that created the session. Aborting security check with error. /elektrang/eclnt/lib/eclnt.jar
2023:02:08 14:35:22:818 | 1945 | SEVERE | Request information: 10.6.12.167/null/Mozilla/4.0 (Windows 10 10.0) Java/1.8.0_202
2023:02:08 14:35:22:818 | 1944 | SEVERE | Session information: 10.6.12.167/null/Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
2023:02:08 14:35:22:818 | 1944 | SEVERE | Request information: 10.6.12.167/null/Mozilla/4.0 (Windows 10 10.0) Java/1.8.0_202
2023:02:08 14:35:22:818 | 1944 | SEVERE | Problem occurred during request processing. Please check for details in the server-side logging.
.......... Stacktrace Info ..........
java.lang.Error: Client that sends the request is not the one that created the session. Request is cancelled: /elektrang/eclnt/lib/eclnt.jar
at org.eclnt.jsfserver.util.SecurityFilterRemoteAddress.performCheckRemoteAddress(SecurityFilterRemoteAddress.java:80)
at org.eclnt.jsfserver.util.SecurityFilterRemoteAddress.doFilterExecute(SecurityFilterRemoteAddress.java:50)
at org.eclnt.jsfserver.util.CCFilterBase.doFilter(CCFilterBase.java:41)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
...
The filter was introduced in CC-Version 20221219. The implementation of the check changed when it was moved from SecurityFilterGeneral to SecurityFilterRemoteAddress.
To solve the problem we deactivated the filter in system.xml.
<filterconfiguration
active="false"
classname="org.eclnt.jsfserver.util.SecurityFilterRemoteAddress"/>
Regards
Axel
|
|
|
Thanks for the quick answer
|
|
|
Hi Björn
When loading the application some users sometimes get a messagebox containing "Problem loading fonts: texts might not correctly positioned".
I suspect this may be due to slow loading of the page, probably due to slow VPN connection. But I'm not sure about this.
I wasn't able to reproduce this behaviour myself, so it's hard to analyse further. For one instance I do have the eclntjsfsever and performance logs and the approximate time of occurence.
There is only this message containing "font":
Getter took longer than 200ms: #{e.ElektraContentWindowUI.scalefont}.
Not sure if this may be related to the problem.
Regards
Axel
|
|
|
Hi Björn,
running our application on JBoss Server the server logs a ClassCastException whenever a new client starts. There seems to be no negative side effects in the application.
2021-10-27 09:08:05,910 MESZ ERROR [io.undertow.websockets.jsr.request] (default task-1) UT026001: Unable to instantiate endpoint: java.lang.ClassCastException: org.eclnt.jsfserver.polling.websocket.WebSocketPollingEndPoint cannot be cast to javax.websocket.Endpoint
JBoss contains websocket API 1.1.
Setting <blockerinfo active="false"/> in system.xml makes the exception disapear.
Is there a better solution?
Regards
Axel
|
|
|
Hi Björn,
thanks for your quick answer and explanation.
Regards
Axel
|
|
|
Hi Björn,
on my first post I mistakenly wrote onRowSelect instead of onRowExecute.
We have a grid with different actions for onRowSelect and onRowExecute events.
onRowSelect loads data from the server and shows a preview pane beneath the grid. Processig time is about 250-300 milliseconds.
onRowExceute changes the content of the current page and opens a view for editing data associated with the selected row.
When double-clicking first onRowSelect is triggered then onRowExecute.
But the onRowExecute event is not always triggered. Instead the browser highlights the text you clicked on.
This depends of the "speed" of double clicking. Slower clicking reduces the chance of successful onRowExecute.
If you double-click on an empty area in a row onRowExecute is always triggered.
I did some testing with Thread:sleep when executing onRowSelect.
If sleep time in onRowSelect is greater 100 milliseconds then onRowExecute may not be triggered. With shorter sleep times I couln't reproduce the problem.
Regards
Axel
|
|
|
Hi Björn,
to paste text in an input field Ctrl-v still works.
Is there way to add a popup menu item for pasting input?
Regards
Axel
|
|
|
Hi Björn,
in the demo workplace under "Straight Controls / Menus / Client side copy&paste" no cut/copy/paste menu items appear.
In the editor t:systemmenuitem is not available under t:menu or t:popupmenu.
Regards
Axel
|
|
|
Hi Björn,
I just found out we use
<t:popupmenu id="COPYPASTE" >
<t:systemmenuitem id="g_1" clientsystemcommand="cut" text="Ausschneiden" />
<t:systemmenuitem id="g_2" clientsystemcommand="copy" text="Kopieren" />
<t:systemmenuitem id="g_3" clientsystemcommand="paste" text="Einfügen" />
</t:popupmenu>
on the outermost jsp to add cut/copy/paste menuitems to input fields. This works with Swing client but not with RISC client. Ist that what you men by
"2. the default Browser-menu is not available, this is correct - and there is no chance to really access it from JavaScript."
Regards
Axel
|
|
|
Hi Björn,
how is the attribute popupmenuglobalhotkeys in t:clientconfig to be used? There is no documentation for this attribute. Is it just true/false?
I would like to add a menu item "Copy from clipboard" for input fields. Is there a way to do this?
The class Clipboard only has a funtion to copy to client clipboard but not to copy from client clipboard.
Regards
Axel
|
|
|
Hi Björn,
a text field in CaptainCasa is finally rendered as an input-tag like this.
<input id="3196" spellcheck="false" autocomplete="off" class="riscfieldcontainer_field" placeholder="Name" style="box-sizing: border-box; position: absolute; z-index: 0; left: 0px; top: 0px; width: 198px; height: 22px;">
Current Chrome and Edge browsers ignore the attribute autocomplete="off" and show autofill suggestions on some fields.
There are decriptions of many obscure hacks on stackoverflow.com. One possible solution is to add an additional attribute list="autocompleteOff".
Do you know if this works?
Is there a way to influence the way the input tag is rendered to add this attribute or has that to be done in the framework?
Another way I found to prevent autofill on name fields is to replace placeholder="Name" with palceholder="Text". But as the placeholder text shows in the GUI this is not really a solution. Leaving placeholder empty is no solution because the browser seems to take a preceeding label as a hint to a following name input field.
Regards
Axel
|
|
|
Hi Björn,
moving the mosuse is not the reason.
It seems to be a timing problem. With my "normal" doubleclick there is no problem.
If I do a slower doubleclick the word is marked. But I have to try a couple of times to get the timing right.
I had a hard time to reproduce this behaviour, but a customer seems to have the special click-timing.
Regards
Axel
|
|
|