Jump to content

Recommended Posts

Posted

Hi guys, i want on session termination to display message particular to that session,
and i've set the servermessages  on creation of  mainmodule,
BUT
this property is ignored and the servermodule servermessages  is displayed instead

Im I doing something wrong, or is this a known issue ?

 

 

Posted
4 hours ago, wkotze said:

and i've set the servermessages  on creation of  mainmodule,
BUT
this property is ignored and the servermodule servermessages  is displayed instead

Hello,

You should use UniMainModule.ServerMessages...

Posted

I do use UniMainModule.ServerMessages, this is however ignored and Servermodule is used ServerModule.ServerMessages is used

procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject);
var t : string;
begin
  t :='<html><body><a href="[###url###]/'+ UserCode +'"><br>[###message###]<br>Restart application</a></body></html>';
  ServerMessages.ExceptionTemplate.text := t;
  ServerMessages.terminatetemplate.text := t;
  ServerMessages.invalidsessiontemplate.text := t;
end;

 

Posted
1 hour ago, wkotze said:

I do use UniMainModule.ServerMessages, this is however ignored and Servermodule is used ServerModule.ServerMessages is used

Please tell me what exactly is not working, and how should it be..?

Posted

Hi Sherzod,  on session  terminate i want go the user a link to log back in with his url parameters

if session started with  http:/ip/?prodid=100,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=100"
if session started with  http:/ip/?prodid=200,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=200"
if session started with  http:/ip/?prodid=300,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=300"

The maninmodule. servermessages is howver ingonred, and the servermodule.servermessages  is displayed

 

termmsg.dpr

Posted
On 5/16/2020 at 1:42 PM, wkotze said:

Hi Sherzod,  on session  terminate i want go the user a link to log back in with his url parameters

if session started with  http:/ip/?prodid=100,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=100"
if session started with  http:/ip/?prodid=200,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=200"
if session started with  http:/ip/?prodid=300,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=300"

The maninmodule. servermessages is howver ingonred, and the servermodule.servermessages  is displayed

 

termmsg.dpr

i need the solution to ,for this case

Posted (edited)
On 5/21/2020 at 3:55 PM, wkotze said:

any news on this

hello i found the way  just empty your ulr href like this

image.png.738b2b89eab4a064b9e906fef4b36ec2.png 

replace server message on server module & mainmodule

Edited by donlego
  • Administrators
Posted
On 5/16/2020 at 9:42 AM, wkotze said:

Hi Sherzod,  on session  terminate i want go the user a link to log back in with his url parameters

if session started with  http:/ip/?prodid=100,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=100"
if session started with  http:/ip/?prodid=200,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=200"
if session started with  http:/ip/?prodid=300,  on session terminate i watn to hoew messgae : "Terminated, click here to return to http:/ip/?prodid=300"

The maninmodule. servermessages is howver ingonred, and the servermodule.servermessages  is displayed

 

termmsg.dpr

It is the default behavior. Try this in either ServerModule or MainModule:

 

<html>
<body bgcolor="#dfe8f6">
<p style="text-align:center;color:#0000A0">[###message###]</p>
<p style="text-align:center;color:#A05050">Terminated, click <a href="[###url###]">here</a> to return to application.</p>
</body>
</html>

 

Posted
23 minutes ago, wkotze said:

only servermodule.servermessages  gets called, maninmodule. servermessages  inot

Hello,

Please can you clarify, what does not work?

Posted

both
servermodule.servermessages  and
maninmodule. servermessages  is set

BUT

only
servermodule. servermessages  display on session termination
I want  maninmodule. servermessages to display NOT servermodule. servermessages 

 

  • 4 years later...
Posted

Up. I encountered the same issue. I need to show different servermessages for different users depending on the language selected by the user. I try to change maninmodule.servermessages (InvalidSessionMessage, UnavailableErrMsg, 4 strings) but nothing was changed. When I've changed servermodule.servermessages messages was changed, but globally for all the users. But that's not what I need. How is possible to show different messages for different logged users?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...