Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WebNode to Json RequestHandler 1

Status
Not open for further replies.

omarben

Programmer
May 20, 2015
6
FR
Hi,

In our company we are changing all the RequestHandlers to JSon RequestHandlers because we're using AngularJS which is working fine,
but we want to keep some of the WebNodes, unfortunately they're not really friendly with AngularJS. That's why I'm wondering if there is a way to call a WebNode from a RequestHandler, because I've tried doing this
Code:
$myModule.WebNodes.myChild.myAction(Assoc data)
from a JSon RequestHandler and i'm getting "Cannot get value; a non-existent feature was specified".

Thank you for your help!

-----
Omar BENCHHIBA
benchhiba.com
 
I don't reallu understand what you are trying to do but typically what oscripter do is they will create a simple Utils Object under root and expose it as a global,so if there needs to be code that needs to be re-used we can call it by that global like you are doing.

Another way is if you want to simulate a particular action like a webnode one can do this
Code:
in builder time you would define a temp object in CSIDE the system alareday gives you a temp handle

Object webnode
webNode = $WebNode.WebNodes.GetItem( 144 )

at this point the webNode object will do everything that the Document(144) webnode will do

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thank you for your answer i tried using

Code:
Object webnode
webNode = $WebNode.WebNodes.GetItem( 144 )
but when i try to call one my scripts i get "Can only call Scripts or External API functions" is there any way to fix this ?

PS: I'm new to LiveLink
 
Thank you it's okay i solved my problem :) by doing this

Code:
string tmp = 'Action-Create2'
webnode.(tmp)(data)

because when i do
Code:
webnode.Action-Create2(data)
i didn't want to compile and by just calling Create2 it was throwing that error

Thank you !


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top