Select and Textarea do Not Work in Embedded Task Form

609 views
Skip to first unread message

Elmar Weber

unread,
Dec 29, 2013, 5:02:49 PM12/29/13
to camunda-...@googlegroups.com
Hello,

I'm just trying out to create a quick showcase and I'm running into trouble with select and textarea items of embedded task forms.

A select is for example defined as below in an embedded form:

<select id="selectLoanType" form-field type="string" name="loanType" required ng-change="calculateLoan()">
<option value="mortage" checked>Mortage Loan (5%)</option>
  <option value="cashAdvance">Cash Advance (10%)</option>
</select>

I'm getting the following JavaScript error in my browser console when opening a task for that form:

Error: No controller: ngModel
getControllers@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4823
[... lots of stack trace ...]
createHttpBackend/</xhr.onreadystatechange@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10407
<div id="selectLoanType" form-field="" type="string" name="loanType" required="required" ng-change="calculateLoan()" ng-class="{ 'input-prepend': typeSwitch }">

The issue is with my simple test as well as with the quickstart/task-form-embedded example under 7.0.0.Final and 7.1.0.alpha1 with a fresh copy and just this one example deployed.

Is there a specific version I have to run where the support for select element works?

Thanks,
Elmar

Daniel Meyer

unread,
Dec 30, 2013, 4:00:46 AM12/30/13
to camunda-...@googlegroups.com
Hi Elmar,

Thank you for the feedback.

This should work in 7.1.0-alpha1. (See attached Screenshot). Which web-browser are you using? 



Cheers,
Daniel Meyer

Elmar Weber

unread,
Dec 30, 2013, 3:14:31 PM12/30/13
to camunda-...@googlegroups.com
Hi Daniel,

Firefox 26 under Windows. Seems to be the problem, Chrome, IE 10 and Safari the latest work.
Can you confirm this, I'll post a bug then? I don't have a second system around just now, might otherwise also be an issue with my Firefox.

Thanks,
Elmar

Daniel Meyer

unread,
Dec 31, 2013, 4:26:30 AM12/31/13
to camunda-...@googlegroups.com
Hi Elmar,

thanks for investigating. It works for me in Firefox 26 under Linux. 



Maybe an older version of the camunda javascripts is still in your Browser cache? Have you tried clearing the cache?

Cheers,
Daniel Meyer

Elmar Weber

unread,
Jan 4, 2014, 10:21:57 AM1/4/14
to camunda-...@googlegroups.com
Hi Daniel,

thanks for checking. Clearing the cache was the first thing I tried, that did not help. I tested it on a virgin installation of Firefox 26 portable that worked. Maybe some extension or something is messing this up, since the problem persists in the other installation for some curious reason.

Thanks again,
Elmar

Daniel Meyer

unread,
Jan 6, 2014, 11:18:19 AM1/6/14
to camunda-...@googlegroups.com
Hi Elmar,

let us know If you figure this out.

Cheers,
Daniel Meyer

fernando...@gmail.com

unread,
Jan 31, 2014, 7:39:23 AM1/31/14
to camunda-...@googlegroups.com
Hello,

I have the same problem with the same error that makes the form not to render and thus the application not to work. I have a fresh installation of Camunda BPM Platform under Glassfish. I'd be glad if you know what's happening. Here you have the long strack trace. Thanks for your time and kind regards.

nodeLinkFn@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4960
compileTemplateUrl/</<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:5099
nodeLinkFn@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4953
compileTemplateUrl/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:5100
$http/promise.success/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10043
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/ref/<.then/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7582
Scope.prototype.$eval@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8926
Scope.prototype.$digest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8789
Scope.prototype.$apply@http://localhost:8080/camunda/assets/vendor/angular/angular.js:9012
done@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10265
completeRequest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10449

<div id="selectLoanType" form-field="" type="string" name="loanType" required="required" ng-change="calculateLoan()" ng-class="{ 'input-prepend': typeSwitch }">

angular.js (line 6349)

nodeLinkFn@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4960
compileTemplateUrl/</<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:5099
nodeLinkFn@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4953
compileTemplateUrl/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:5100
$http/promise.success/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10043
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/ref/<.then/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7582
Scope.prototype.$eval@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8926
Scope.prototype.$digest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8789
Scope.prototype.$apply@http://localhost:8080/camunda/assets/vendor/angular/angular.js:9012
done@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10265
completeRequest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10449

<div form-field="" required="required" id="inputLoanAmount" name="loanAmount" min="1000" ng-change="calculateLoan()" type="number" ng-class="{ 'input-prepend': typeSwitch }">
angular.js (line 6349)

nodeLinkFn@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4960
compileTemplateUrl/</<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:5099
nodeLinkFn@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4953
compileTemplateUrl/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:5100
$http/promise.success/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10043
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/ref/<.then/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7582
Scope.prototype.$eval@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8926
Scope.prototype.$digest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8789
Scope.prototype.$apply@http://localhost:8080/camunda/assets/vendor/angular/angular.js:9012
done@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10265
completeRequest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10449

<div form-field="" required="required" id="inputLoanRuntime" name="loanRuntime" ng-change="calculateLoan()" min="2" max="30" type="number" ng-class="{ 'input-prepend': typeSwitch }">
angular.js (line 6349)

Error: name or type not defined for form field
FormFieldDirective/<.link@http://localhost:8080/camunda/app/tasklist/directives/taskForm.js:85
nodeLinkFn@http://localhost:8080/camunda/assets/vendor/angular/angular.js:4960
compileTemplateUrl/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:5100
$http/promise.success/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10043
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/defer/deferred.promise.then/wrappedCallback@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7509
qFactory/ref/<.then/<@http://localhost:8080/camunda/assets/vendor/angular/angular.js:7582
Scope.prototype.$eval@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8926
Scope.prototype.$digest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:8789
Scope.prototype.$apply@http://localhost:8080/camunda/assets/vendor/angular/angular.js:9012
done@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10265
completeRequest@http://localhost:8080/camunda/assets/vendor/angular/angular.js:10449

<div form-field="" name="address" rows="4" id="inputAddress" ng-class="{ 'input-prepend': typeSwitch }">

fernando...@gmail.com

unread,
Jan 31, 2014, 10:08:37 AM1/31/14
to camunda-...@googlegroups.com, fernando...@gmail.com
I've also tried with embedded forms and I get another different and possibly related error. When I start the example of the quickstart examples (https://github.com/camunda/camunda-quickstarts) I get the following error in the window:

> Communication Error: The application received an unexpected NaN response from the server. Try to refresh the page or login and out of the application.

And in the console log:

> [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "<unknown>"]
> consoleLog/<() angular.js (line 6349)
> null() angular.js (line 5420)
> qFactory/defer/deferred.promise.then/wrappedCallback() angular.js (line 7511)
> qFactory/defer/deferred.promise.then/wrappedCallback() angular.js (line 7509)
> qFactory/ref/<.then/<() angular.js (line 7582)
> Scope.prototype.$eval() angular.js (line 8926)
> Scope.prototype.$digest() angular.js (line 8789)
> Scope.prototype.$apply() angular.js (line 9012)
> done( )angular.js (line 10265)
> completeRequest() angular.js (line 10449)
> createHttpBackend/</xhr.onreadystatechange()
>
> return logFn.apply(console, args);


Any hint about what could make all the forms not to work? I'm using last version of Camunda (7.1.0-alpha1) with pre-built Glassfish BPM package under Kubuntu 13.04.


Thanks again.

fernando...@gmail.com

unread,
Jan 31, 2014, 10:24:43 AM1/31/14
to camunda-...@googlegroups.com, fernando...@gmail.com
I'm really sorry for all the emails I've sent, but I got more information after using Chromium instead of Firefox:

> Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/camunda/api/admin/auth/user/default
> XMLHttpRequest cannot load app:start-form.html. Cross origin requests are only supported for HTTP.
> XMLHttpRequest cannot load app:task-form.html. Cross origin requests are only supported for HTTP.

So it seems is not loading any form, but they're actually deployed in /src/main/webapp/(start-form.html). According to this post on StackOverflow (http://stackoverflow.com/questions/3828982/xmlhttprequest-cannot-load-an-url-with-jquery) it seems it's not allowed to do a XMLHttpRequest crossdomain. My question then is: so why it's in the examples like this? Did nobody else have these problems?

Cheers.

Roman Smirnov

unread,
Feb 3, 2014, 4:29:03 AM2/3/14
to camunda-...@googlegroups.com, fernando...@gmail.com
Hi Fernando,

I am not able to reproduce your described failure with 7.1.0-alpha1 and 7.1.0-alpha2.

The following exception usually occurs when you not logged in

"> Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/camunda/api/admin/auth/user/default"

Have you tried clearing the cache?

Cheers,
Roman

fernando...@gmail.com

unread,
Feb 3, 2014, 4:32:04 AM2/3/14
to camunda-...@googlegroups.com, fernando...@gmail.com
Yes, I tried to clear the cache but with no success anyway. I'm trying to make it work on Windows, because maybe it was something related to the other OS and I just need to reinstall everything because of some strange reason. I'll let you know.

fernando...@gmail.com

unread,
Feb 3, 2014, 5:23:46 AM2/3/14
to camunda-...@googlegroups.com, fernando...@gmail.com
Hello everyone,

I've tried a fresh installation of the whole system on my Windows OS and it's working fine now. I really don't know why it's not working on my Kubuntu, but eventually I'll try to re-install everything again and make it work.


Thanks for your help anyway. Cheers.

Christian Lipphardt

unread,
Feb 3, 2014, 8:48:37 AM2/3/14
to camunda-...@googlegroups.com, fernando...@gmail.com
Hi Fernando,

Did you try to access the webapp in the "incognito"-mode? 

Cheers
Christian

Fernando Gómez Pose

unread,
Feb 3, 2014, 8:50:11 AM2/3/14
to Christian Lipphardt, camunda-...@googlegroups.com
I just checked again with the previous configuration, and I get the same error. It's so weird.
--
Fernando Gómez Pose

Roman Smirnov

unread,
Feb 3, 2014, 11:41:33 AM2/3/14
to camunda-...@googlegroups.com, Christian Lipphardt
Hi Fernando,

it sounds really strange! We are not able to reproduce it...

Did you try to disable the web-security in chromium to avoid the cross origin failure? But it should work with the enabled web-security!

Cheers,
Roman

Fernando Gómez Pose

unread,
Feb 3, 2014, 12:02:57 PM2/3/14
to camunda-...@googlegroups.com, Christian Lipphardt
It doesn't matter, since I use both Firefox and Chromium and I get the same error in both systems... I'll tell you if it works when I'll reinstall the whole OS with the same configuration.


Regards.


--
You received this message because you are subscribed to a topic in the Google Groups "camunda BPM users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/camunda-bpm-users/nj1CCirMbzM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/f76aaa1c-6814-4d22-8e98-81be3bbab218%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Fernando Gómez Pose
Reply all
Reply to author
Forward
0 new messages