[ 
https://issues.apache.org/jira/browse/CONNECTORS-1414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974286#comment-15974286
 ] 

Kishore Kumar commented on CONNECTORS-1414:
-------------------------------------------

Hi [~daddywri],

Yes, We can add the message as a global variable in index.jsp and then use it 
in the javascript fie.

{code:title=index.jsp|borderStyle=solid}
  <script type="text/javascript">
    var ErrorCode = {
        
ServerDown:"<%=Messages.getBodyJavascriptString(pageContext.getRequest().getLocale(),"errorCode.serverDown")%>"
    }
  </script>
{code}

and then in the javascript file as

{code:title=mcf.js|borderStyle=solid}
  var msg = xhr.status + " " + xhr.statusText;
  //Proper error message, if the server is down.
  if(xhr.readyState === 0 && xhr.status === 0)
  {
    msg = ErrorCode.ServerDown;
  }
{code}

> Return descriptive error message when UI is disconnected
> --------------------------------------------------------
>
>                 Key: CONNECTORS-1414
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1414
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Framework core
>    Affects Versions: ManifoldCF 2.7
>            Reporter: Markus Schuch
>            Assignee: Kishore Kumar
>            Priority: Minor
>             Fix For: ManifoldCF 2.8
>
>
> When disconnected from server the new UI returns {{Error 0}} instead of a 
> descriptive error message. This should be changed to something like 
> {{Connection lost}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to