xmpielab / xmpl-sdk Goto Github PK
View Code? Open in Web Editor NEWuCreate XMPL library SDK
License: MIT License
uCreate XMPL library SDK
License: MIT License
var res = new xmpResourceDriver({configuration:xmpcfg},true,true);
returns
Uncaught TypeError: xmpResourceDriver is not a constructor
I've been working with the sample code provided for the SPA and routing, and I can honestly say I had to make some changes to the .when() statements ordering to get the recipientID to work. I have a couple of other issues I'm working through with it now. I will precursor my issues with a statement that I am rather new to AngularJS, so some of my confusion is stemming from that.
First:
The site is routing to my main tracked page, but keeping tacking on #/Register on to the URL. No idea why.
Second:
I added custom directives to the site when I had it setup for individual pages, but they no longer work with the SPA code, I suspect because my ng-app has changed from xmp.app to spaApp. I tried switching the directives to use angular.module('spaApp').... but that was not successful.
I also tried adding "var xmpApp = angular.module('spaApp', ['ngRoute']);" to my custom directives file (just to try something), now all I get is an injector error.
*Note: this issue has been edited since my original posting, as originally I couldn't get the recipientID to look up at all.
When submitting a hidden input field, the value does not get committed to the database. No errors occur in uProduce or the browser, code sample below:
<input type="hidden" name="answerTotal" id="answerTotal" xmp-write-ador="xmp.r['answerTotal']" value="0">
hi,
I'm a programmer and I'm working with angular 2. I was wondering if there was a module on its way for the new version or if I have to write it myself?
Thank you for your time!
When implementing a select input as in the example below Angular will output an extra option . Simply inputting selected or selected="selected" to the static option that you want as a default will not work.
1 2 3 4 5 6Implementing as in the example below is the only workaround that could be found. A conditional statement is needed in the plan write ADOR to hijack the blank value.
1 2 3 4 5 6Conditional Statement in Write Ador:
if (value = "")
{
|->[test] := AsNumber(1)
}
else
{
|->[test] := AsNumber(value)
}
A special xmp attribute for select input may be needed where a user can indicate default options or use or create a dynamic select with default. Or maybe these is a more elegant solution..??
See links below for Angular documentation for ngOptions and ngSelected
https://docs.angularjs.org/api/ng/directive/ngOptions
https://docs.angularjs.org/api/ng/directive/ngSelected
Sample site/registerAndUpdate.html
The approach outlined always results in a registration page, regardless of wether a user exists or not. I'm guessing this is because the page is Anonymous?
Your e.g. on https://github.com/XMPieLab/XMPL-SDK/wiki/Updating-Recipient-Data, Angular doesn't seems to evaluate parseInt to convert :
<xmp-update-on-page-load xmp-ador="xmp.r['Visited']"
xmp-value="{{1 + parseInt(xmp.r['Visited'],10)}}"/>
I've found this :
http://stackoverflow.com/questions/26293769/how-to-parseint-in-angular-js
and
<xmp-update-on-page-load xmp-ador="xmp.r['Visited']"
xmp-value="{{1 + (xmp.r['Visited']-0)}}"/>
seems to do the trick?
I don't understand the following:
For those of you who wish to use the xmp object in AngularJS programming, note that the xmp object is a member of the scope of the base XMPie controller.
What is the base XMPie controller and how do we inject that into our custom (parent) controller?
Hello,
Would you like to add a word or two in the page
https://github.com/XMPieLab/XMPL-SDK/wiki/Cheat-Sheet-for-Email
regarding the
iid={{xmp.r['XMPieInstanceID']}}
feature. Only the XMPieRecipientKey is mentioned so far.
Thanks!
Hi,
I found a small error on the wiki page on the getting started. The scripts in the index.html should be in the header, not in the body in order for it to work. Here is a code snippet to replace the actual one:
`<!doctype html>
Let me know if the mystake is on my side or if I bring a good solution or not.
Thanks!
Email visibility adors do NOT work on anything other than XES email sends.
Note this on the documentation to save others much debugging time.
Thanks.
I am creating a page to send a card to some one its from an un personalised welcome page where the sender selects 1 out of 3 card to an unpersonalized page where the sender puts in the following information.
Own First and last name and email adres
and the firstname, last name and emal adres of the recipient.
Al these field need to be stored in a linked Excel database file when sender clicks the save button.
this page is based on the code of the register.html page from the sdk
But when i put in the asked info on the page and click send i get the following error
XMPL error
Error details
HTTP error data
Source:
url:
Result:
status:
data:
HTTP object
{}
Nothing more where am i doing things worng.
The code has been broken down to only one field
`<!doctype html>
</div>
<div>
<form xmp-register xmp-success-url="./dank.html">
<ul>
<li>
Voornaam Verzender :    <input type="text" xmp-write-ador="xmp.r['Voornaam Verzender']" size="30">
</li>
</ul>
<input class="btn-primary" type="submit" value="save" xmp-tracking-action>
</form>
</div>
</div>
</div>
</div>
<script src="./deps/jquery/jquery-1.10.2.min.js"></script>
<script src="./deps/xmp/js/xmp.min.js"></script>
<script src="./xmpcfg.js"></script>
Hello,
This other page on Github states that this attribute has been deprecated.
Would you like to consider having this page updated accordingly?
Thanks!
Kind regards,
Bill
Hello,
Do you manage to actually run your code sample
scope.xmpReady(function () {
scope.xmp.referredRecipient.ReferedByID = scope.xmp.recipientID;
});
or would it not more be
scope.xmp.**r.**recipientID;
instead?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.