Hello,

I have simple javascript function: function SetData(value) { alert(value) } When i invoke this function with api_externalMethod.invoke.... with parameter varchar2 or clob (length 200 symbols) all is ok. But when i call with long clob (lengt more then 4000 ), i don't get message from javascript.

pls/sql code: ..............

  v_params_t('0').value_cl := p_clob;
  api_externalMethod.invoke('set_js', v_params_t);
..........

From formspider i don't get any error or something, if i run application in debug mode, debug console show exception "ERROR : BDF_ExternalMethod.actionInvoke missing ) after argument list undefined undefined";

How i cn solve this problem

Formspider version 1.8

Thanks

asked 20 Jul, 02:20

AlfAbetas's gravatar image

AlfAbetas
611623
accept rate: 8%

edited 20 Jul, 02:28


Hi,

There is a bug in your version but it doesn't seem to be about the length of the parameter but the content of it.

As a workaround, please add the following javascript at the end of your main.jsp file but inside the body tag.

I hope this helps.

Kind Regards,

<script type="text/javascript">
BDF_ExternalMethod.prototype.actionInvoke = function(params) {
  var methodInvokedEvent = this.events[BDF_EventTypes.methodInvoked];
  if (methodInvokedEvent)
    this.isRequiresCallBack = !(methodInvokedEvent.isImmediate);

  var evalStr = 'window.fsExternalMethod = function(/*hidden_params*/) { return '+ this.signature + '.apply(this, arguments); }';
  this.lastSuccessful = BDF_Constant.booleanFalse;
  try {
    eval(evalStr);
    this.lastReturn = window.fsExternalMethod.apply(window, params) || BDF_Constant.nullValue;
    this.lastSuccessful = BDF_Constant.booleanTrue;
  } catch (err){
    BDF_Debug.logError("BDF_ExternalMethod.actionInvoke "+err.message+" "+err.description+" "+err.lineNumber);
  }
  if (methodInvokedEvent) {
    var extMethodCompletedAction = function() { 
      this.sentDelta = false;
      BDF_Manager.sendingNestedEvent = true;
      FS.EventManager.setEventsSuspended(true);
      BDF_Request.sendExternalMethodEvent.defer(1, BDF_Request, [methodInvokedEvent, this.getInstanceOID()]);
    };

    extMethodCompletedAction.defer(1, this);
  }
}
</script>
link

answered 23 Jul, 05:52

Serdar's gravatar image

Serdar ♦♦
100k4
accept rate: 13%

Hi Serdar,

After this change stop working another functionality. Like Get data (Before working:) )

...js function
function editorGetData (editor_name) {
    return   CKEDITOR.instances[editor_name].document.getBody().getHtml()
}

...DB side 
procedure get is
   l_params_t api_externalMethod.tt_params;
begin
    l_params_t('0').value_tx := 'html_code-mainPanel'; 
    api_externalMethod.invoke (in_externalmethodname_tx => 'CKeditor_getdata'
                              ,in_params_t              =>l_params_t);
end;

procedure post_externalMethod is
    v_result_cl        clob;
begin
    if api_externalMethod.issuccessful('CKeditor_getdata') = 'Y' then
        v_result_cl := api_externalMethod.getresult('CKeditor_getdata');
        if v_result_cl is not null then 
            api_component.setvalue('mainPanel.text',v_result_cl); 
        end if;
    end if;
end;
(23 Jul, 07:34) AlfAbetas

I don't see what is wrong. What is the error message?

(23 Jul, 08:40) Serdar ♦♦

Hi Serdar,

I don't get any error. But when i see not fire "Post method completed" from EXTHTERNAL_METHOD. "Post method completed" invoke db procedure "post_externalMethod" procedure text you can see from previous post.

Log from debuger.

INFO : 24-07-2018 08:54:12 PREAPPLYDELTA Event is called
INFO : 24-07-2018 08:54:12 PREAPPLYDELTA Event Not found
INFO : 24-07-2018 08:54:12 BUTTONPRESS Event is called
INFO : 24-07-2018 08:54:12 BUTTONPRESS event is found
INFO : 24-07-2018 08:54:12 HTML.GET Program Unit is called
INFO : 24-07-2018 08:54:12 End of BUTTONPRESS event
INFO : 24-07-2018 08:54:12 POSTINVOKEAPPLICATION Event is called
INFO : 24-07-2018 08:54:12 POSTINVOKEAPPLICATION Event Not found
-------------------
(24 Jul, 02:01) AlfAbetas
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1

Asked: 20 Jul, 02:20

Seen: 73 times

Last updated: 26 Jul, 05:06

Related questions


© Copyright Gerger 2017