KUIB - Passing Parameters - Forum - Kendo UI Builder - Progress Community

KUIB - Passing Parameters

 Forum

KUIB - Passing Parameters

This question is not answered

Hi,

I've recently starting experimenting with KUIB and put together some sample pages :) However, I have come across a scenario of which I hope someone has encountered and resolved.

The scenario:

Order Form wants to call OrderLine form passing the selected Order Number.

In normal AngualrJS development, I would use $StateParams to pass values from one form to another (state to state).

Within the app.js I would have in the callee something like:

.state('order-lines', {
url: '/order-lines',
templateUrl: '.../order-lines.html',
controller: 'OrderLinesCtrl',
params: { 'callingObject': null},
data: {
...
},
resolve: {
....
}
BUT, how is this achieved within KUIB? I have implemented something similar, but obvioulsy, everytime I rebuild, the code I place within the KUIB 'app.js' is overwritten. 
Any info on this topic would be greatly appreciated.
All Replies
  • Hi Spandau66,

    A quick reply...

    Can you please customize the code ok view-factory.js file located in src/ folder and check if it solves the issue.

    Thanks and Regards,
    Anil Kumar.
  • Hi Anil,

    The issue is not with the view-factory.js file (I have already changed these files accordingly to set $stateparams and then to check $stateparams). In short, it's the 'app.js' not having a "params: { }" option. I can change the 'app.js' but is always overwritten when I rebuild.

    So the same question still applies. Is there an alternative way to pass parameters from one form to another (controller/factory to another controller/factory) using KUIB?

    TIA

    spandau66

  • Hi Anil,

    As an alternative, I could change the ejs template that builds the 'app.js' file. However, I would need some pointers as to where and what I would need to change. Obviously, I would maintain the template personally afterwards.

    TIA

  • You can edit the ejs template but we do not have documentation on how to do that at this time. The best way might be to save the values to local storage in onside of the first form and get from local storage on the show of the second form. You can google easily... I found

    HTH

    -Shelley

  • Hi Shelley,

    Thanks for the link (already in my bookmarks) :)

    I have resolved my own question, by accessing and changing the app.js.ejs file and adding what I required.

    Local Storage is always one way (providing it's encrypted), but have to be honest, not a fan of local storage....

    Thanks

    Martyn