Author |
Message |
15/05/2023 13:22:07
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Hi everyone,
does sombody know if it is possible in EclntEditor to pre-select a custom default style that will be used for each jsp preview in the project automatically?
I can change the style for each jsp separately, but I don't find a way to set it as a global default for all jsp pages, for example in the .ccproject.
Does anyone have an idea how it could be done?
Best would be if it could use a style from the running application, not only from the project source webapp/eclntserver/styles
Best regards
Frauke
|
Filename |
Default-style.png |
Download
|
Description |
Here I can set it for each jsp, but when I re-open it next time, it will be reset to the previous default, which is 'defaultrisc'. |
Filesize |
51 Kbytes
|
Downloaded: |
488 time(s) |
|
|
|
15/05/2023 14:04:53
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi Frauke,
the style which is defined in "sessiondefault.xml" is the one that is used in the layout editor by default (and which is also the base for showing the available style variants).
You either can directly edit (eclntjsfserver/config/sessiondefauts.xml) or use the "Project configuration..." button in the tools, then select "Session Defaults" at the bottom of the following dialog.
Kind regards! Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
16/05/2023 08:29:42
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Hi Björn,
thanks for your answer. I already tried this yesterday, but the session defaults do not seem to affect the jsp in the preview.
To me it looks like the preview styles (combo box selection list, see screenshot of my first post) are taken from the project and not from the editor.
We are using custom styles in the project, the editor doesn't know them and has it's own set of styles (built into some jar file).
Even copying the custom style into the Editor did not help.
Or has anything changed since version 20221005?
I did not do the update until now.
Best regards
Frauke
|
|
|
16/05/2023 08:37:15
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Correction:
I think you meant the sessiondefaults.xml of the project, right?
that works!
I missunderstood and changed the sessiondefault.xml of the editor
Best regards
Frauke
|
|
|
17/05/2023 08:29:00
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Hi,
I have another issue related to this:
the default language seems not to work. I want to use English, but the preview still uses German.
My sessiondefaults.xml looks like this (style is working).
Code:
<sessiondefaults
style="act3_risc"
language="en"
country="US"
clientlanguage="en"
clientcountry="US"
/>
What could be the reason?
CaptainCasa version is still 20221005
Best regards
Frauke
|
|
|
22/05/2023 12:54:36
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
...sorry, missed this one:
I cannot reproduce this: in my examples the editor content shows the right language. Btw.: the editor does not influence the language but just renders the content as is. So the language is coming from the application.
Maybe your application sets the language explicity somewhere?
Pleas check for:
Code:
1. HttpSessopmAccess.setCurrentLocale(...) - modern version
2. FacesContext().getCurrentInstance().getViewRoot().setLocale(...)
Kind regards! Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
22/05/2023 14:51:10
|
heyl
Power User
Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline
|
Hi Björn,
aaah, I found it!
We are setting the language correctly in the sessions, default is English. So I wondered where the German text in the preview was coming from.
The answer was in the Dispatcher.
In the default constructor we are creating some default session parameters with German locale.
Code:
if (HttpSessionAccess.checkIfInLayoutEditorPreview()) {
m_sessionSettings = new SessionSettings(null, Locale.GERMAN, null);
}
I didn't even remember the method checkIfInLayoutEditorPreview()
Thanks and best regards
Frauke[
|
|
|
|