Anything wrong with this simple RadListView? Tapping produces error page
up vote
0
down vote
favorite
I had asked a similar question but had to go away for a month and it has dropped off the radar.
I have a very basic RadListView that I am populating using the (loaded) listener in the RadListView.
<GridLayout orientation="vertical">
<RadListView [items]="reports" (loaded)="onListLoaded2($event)">
<ng-template tkListItemTemplate let-item="item">
<StackLayout class="itemTemplateStackLayout" orientation="vertical">
<StackLayout class="reportStackLayout" orientation="vertical">
<Label class="labelName blue_text bold_text list-group-item" [text]="item.report_name"></Label>
<GridLayout class="reportDetailsGridLayout" columns="*, *">
<Label row="0" col="0" horizontalAlignment="left" [class]="item.status_class" class="labelStatus" [text]="item.status_text" textWrap="true"></Label>
<Label row="0" col="1" horizontalAlignment="right" class="labelValue green_text bold_text" [text]="item.report_value" textWrap="true"></Label>
</GridLayout>
</StackLayout>
</StackLayout>
</ng-template>
</RadListView>
Here is the component code.
public onListLoaded2(args: ListViewEventData)
this._reports = new ObservableArray<Report>();
this._reports.push(new Report(1, "Mileage Claims", 2, 332.45, "Submitted", "status_orange", "Travel expenses for October"));
this._reports.push(new Report(0, "October Expenses", 2, 32.45, "Approved", "status_green", "Expense claims for October"));
this.isLoading=false;
public get reports(): ObservableArray<Report>
return this._reports;
This displays two reports as expected.
I want to be able to tap on one and get the detail page. However tapping anywhere produces an error page such as:
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onItemClick failed
TypeError: listView._listViewAdapter.isGroupHeader is not a function
File: "file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js, line: 539, column: 62
StackTrace:
Frame: function:'onItemClick', file:'file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js', line: 539, column: 63
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)....etc.
I did have an itemTap listener on the RadListView but got the same error page.
Any ideas? TIA
==========================
UPDATE
@ogrodowiczp - I tried that and it did not work. Maybe there is a wider issue? I created another test component with a simple RadListView and am getting the same error page when I tap on it. Maybe I have not got it set up properly? I have uninstalled and re-installed the plugin.
My app.module.ts looks like this:
import NativeScriptHttpModule from "nativescript-angular/http";
...
...
imports: [
...
NativeScriptUIListViewModule,
...
],
...
and my package.json:
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript":
"id": "org.nativescript.myApp",
"tns-android":
"version": "4.1.3"
,
"scripts":
"lint": "tslint "app/**/*.ts""
,
"dependencies":
"@angular/animations": "^6.0.9",
"@angular/common": "^6.0.9",
"@angular/compiler": "^6.0.9",
"@angular/core": "^6.0.9",
"@angular/forms": "^6.0.9",
"@angular/http": "^6.0.9",
"@angular/platform-browser": "^6.0.9",
"@angular/platform-browser-dynamic": "^6.0.9",
"@angular/router": "^6.0.9",
"nativescript-angular": "~6.0.0",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^4.0.1",
"nativescript-modal-datetimepicker": "^1.1.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-listview": "^3.8.0",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.1.0",
"tns-core-modules": "^4.2.0",
"zone.js": "^0.8.4"
,
"devDependencies":
"@angular-devkit/core": "~0.6.3",
"@angular/compiler-cli": "^6.0.9",
"@ngtools/webpack": "~6.0.3",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"clean-webpack-plugin": "~0.1.19",
"codelyzer": "~4.3.0",
"copy-webpack-plugin": "~4.5.1",
"css-loader": "~0.28.11",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "^0.7.3",
"nativescript-dev-webpack": "~0.12.0",
"nativescript-worker-loader": "~0.9.0",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.3.0",
"sass-loader": "~7.0.1",
"tslint": "~5.10.0",
"typescript": "~2.7.2",
"uglifyjs-webpack-plugin": "~1.2.5",
"webpack": "~4.6.0",
"webpack-bundle-analyzer": "~2.13.0",
"webpack-cli": "~2.1.3",
"webpack-sources": "~1.1.0"
Thanks.
angular nativescript angular2-nativescript
add a comment |
up vote
0
down vote
favorite
I had asked a similar question but had to go away for a month and it has dropped off the radar.
I have a very basic RadListView that I am populating using the (loaded) listener in the RadListView.
<GridLayout orientation="vertical">
<RadListView [items]="reports" (loaded)="onListLoaded2($event)">
<ng-template tkListItemTemplate let-item="item">
<StackLayout class="itemTemplateStackLayout" orientation="vertical">
<StackLayout class="reportStackLayout" orientation="vertical">
<Label class="labelName blue_text bold_text list-group-item" [text]="item.report_name"></Label>
<GridLayout class="reportDetailsGridLayout" columns="*, *">
<Label row="0" col="0" horizontalAlignment="left" [class]="item.status_class" class="labelStatus" [text]="item.status_text" textWrap="true"></Label>
<Label row="0" col="1" horizontalAlignment="right" class="labelValue green_text bold_text" [text]="item.report_value" textWrap="true"></Label>
</GridLayout>
</StackLayout>
</StackLayout>
</ng-template>
</RadListView>
Here is the component code.
public onListLoaded2(args: ListViewEventData)
this._reports = new ObservableArray<Report>();
this._reports.push(new Report(1, "Mileage Claims", 2, 332.45, "Submitted", "status_orange", "Travel expenses for October"));
this._reports.push(new Report(0, "October Expenses", 2, 32.45, "Approved", "status_green", "Expense claims for October"));
this.isLoading=false;
public get reports(): ObservableArray<Report>
return this._reports;
This displays two reports as expected.
I want to be able to tap on one and get the detail page. However tapping anywhere produces an error page such as:
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onItemClick failed
TypeError: listView._listViewAdapter.isGroupHeader is not a function
File: "file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js, line: 539, column: 62
StackTrace:
Frame: function:'onItemClick', file:'file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js', line: 539, column: 63
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)....etc.
I did have an itemTap listener on the RadListView but got the same error page.
Any ideas? TIA
==========================
UPDATE
@ogrodowiczp - I tried that and it did not work. Maybe there is a wider issue? I created another test component with a simple RadListView and am getting the same error page when I tap on it. Maybe I have not got it set up properly? I have uninstalled and re-installed the plugin.
My app.module.ts looks like this:
import NativeScriptHttpModule from "nativescript-angular/http";
...
...
imports: [
...
NativeScriptUIListViewModule,
...
],
...
and my package.json:
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript":
"id": "org.nativescript.myApp",
"tns-android":
"version": "4.1.3"
,
"scripts":
"lint": "tslint "app/**/*.ts""
,
"dependencies":
"@angular/animations": "^6.0.9",
"@angular/common": "^6.0.9",
"@angular/compiler": "^6.0.9",
"@angular/core": "^6.0.9",
"@angular/forms": "^6.0.9",
"@angular/http": "^6.0.9",
"@angular/platform-browser": "^6.0.9",
"@angular/platform-browser-dynamic": "^6.0.9",
"@angular/router": "^6.0.9",
"nativescript-angular": "~6.0.0",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^4.0.1",
"nativescript-modal-datetimepicker": "^1.1.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-listview": "^3.8.0",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.1.0",
"tns-core-modules": "^4.2.0",
"zone.js": "^0.8.4"
,
"devDependencies":
"@angular-devkit/core": "~0.6.3",
"@angular/compiler-cli": "^6.0.9",
"@ngtools/webpack": "~6.0.3",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"clean-webpack-plugin": "~0.1.19",
"codelyzer": "~4.3.0",
"copy-webpack-plugin": "~4.5.1",
"css-loader": "~0.28.11",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "^0.7.3",
"nativescript-dev-webpack": "~0.12.0",
"nativescript-worker-loader": "~0.9.0",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.3.0",
"sass-loader": "~7.0.1",
"tslint": "~5.10.0",
"typescript": "~2.7.2",
"uglifyjs-webpack-plugin": "~1.2.5",
"webpack": "~4.6.0",
"webpack-bundle-analyzer": "~2.13.0",
"webpack-cli": "~2.1.3",
"webpack-sources": "~1.1.0"
Thanks.
angular nativescript angular2-nativescript
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I had asked a similar question but had to go away for a month and it has dropped off the radar.
I have a very basic RadListView that I am populating using the (loaded) listener in the RadListView.
<GridLayout orientation="vertical">
<RadListView [items]="reports" (loaded)="onListLoaded2($event)">
<ng-template tkListItemTemplate let-item="item">
<StackLayout class="itemTemplateStackLayout" orientation="vertical">
<StackLayout class="reportStackLayout" orientation="vertical">
<Label class="labelName blue_text bold_text list-group-item" [text]="item.report_name"></Label>
<GridLayout class="reportDetailsGridLayout" columns="*, *">
<Label row="0" col="0" horizontalAlignment="left" [class]="item.status_class" class="labelStatus" [text]="item.status_text" textWrap="true"></Label>
<Label row="0" col="1" horizontalAlignment="right" class="labelValue green_text bold_text" [text]="item.report_value" textWrap="true"></Label>
</GridLayout>
</StackLayout>
</StackLayout>
</ng-template>
</RadListView>
Here is the component code.
public onListLoaded2(args: ListViewEventData)
this._reports = new ObservableArray<Report>();
this._reports.push(new Report(1, "Mileage Claims", 2, 332.45, "Submitted", "status_orange", "Travel expenses for October"));
this._reports.push(new Report(0, "October Expenses", 2, 32.45, "Approved", "status_green", "Expense claims for October"));
this.isLoading=false;
public get reports(): ObservableArray<Report>
return this._reports;
This displays two reports as expected.
I want to be able to tap on one and get the detail page. However tapping anywhere produces an error page such as:
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onItemClick failed
TypeError: listView._listViewAdapter.isGroupHeader is not a function
File: "file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js, line: 539, column: 62
StackTrace:
Frame: function:'onItemClick', file:'file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js', line: 539, column: 63
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)....etc.
I did have an itemTap listener on the RadListView but got the same error page.
Any ideas? TIA
==========================
UPDATE
@ogrodowiczp - I tried that and it did not work. Maybe there is a wider issue? I created another test component with a simple RadListView and am getting the same error page when I tap on it. Maybe I have not got it set up properly? I have uninstalled and re-installed the plugin.
My app.module.ts looks like this:
import NativeScriptHttpModule from "nativescript-angular/http";
...
...
imports: [
...
NativeScriptUIListViewModule,
...
],
...
and my package.json:
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript":
"id": "org.nativescript.myApp",
"tns-android":
"version": "4.1.3"
,
"scripts":
"lint": "tslint "app/**/*.ts""
,
"dependencies":
"@angular/animations": "^6.0.9",
"@angular/common": "^6.0.9",
"@angular/compiler": "^6.0.9",
"@angular/core": "^6.0.9",
"@angular/forms": "^6.0.9",
"@angular/http": "^6.0.9",
"@angular/platform-browser": "^6.0.9",
"@angular/platform-browser-dynamic": "^6.0.9",
"@angular/router": "^6.0.9",
"nativescript-angular": "~6.0.0",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^4.0.1",
"nativescript-modal-datetimepicker": "^1.1.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-listview": "^3.8.0",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.1.0",
"tns-core-modules": "^4.2.0",
"zone.js": "^0.8.4"
,
"devDependencies":
"@angular-devkit/core": "~0.6.3",
"@angular/compiler-cli": "^6.0.9",
"@ngtools/webpack": "~6.0.3",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"clean-webpack-plugin": "~0.1.19",
"codelyzer": "~4.3.0",
"copy-webpack-plugin": "~4.5.1",
"css-loader": "~0.28.11",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "^0.7.3",
"nativescript-dev-webpack": "~0.12.0",
"nativescript-worker-loader": "~0.9.0",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.3.0",
"sass-loader": "~7.0.1",
"tslint": "~5.10.0",
"typescript": "~2.7.2",
"uglifyjs-webpack-plugin": "~1.2.5",
"webpack": "~4.6.0",
"webpack-bundle-analyzer": "~2.13.0",
"webpack-cli": "~2.1.3",
"webpack-sources": "~1.1.0"
Thanks.
angular nativescript angular2-nativescript
I had asked a similar question but had to go away for a month and it has dropped off the radar.
I have a very basic RadListView that I am populating using the (loaded) listener in the RadListView.
<GridLayout orientation="vertical">
<RadListView [items]="reports" (loaded)="onListLoaded2($event)">
<ng-template tkListItemTemplate let-item="item">
<StackLayout class="itemTemplateStackLayout" orientation="vertical">
<StackLayout class="reportStackLayout" orientation="vertical">
<Label class="labelName blue_text bold_text list-group-item" [text]="item.report_name"></Label>
<GridLayout class="reportDetailsGridLayout" columns="*, *">
<Label row="0" col="0" horizontalAlignment="left" [class]="item.status_class" class="labelStatus" [text]="item.status_text" textWrap="true"></Label>
<Label row="0" col="1" horizontalAlignment="right" class="labelValue green_text bold_text" [text]="item.report_value" textWrap="true"></Label>
</GridLayout>
</StackLayout>
</StackLayout>
</ng-template>
</RadListView>
Here is the component code.
public onListLoaded2(args: ListViewEventData)
this._reports = new ObservableArray<Report>();
this._reports.push(new Report(1, "Mileage Claims", 2, 332.45, "Submitted", "status_orange", "Travel expenses for October"));
this._reports.push(new Report(0, "October Expenses", 2, 32.45, "Approved", "status_green", "Expense claims for October"));
this.isLoading=false;
public get reports(): ObservableArray<Report>
return this._reports;
This displays two reports as expected.
I want to be able to tap on one and get the detail page. However tapping anywhere produces an error page such as:
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onItemClick failed
TypeError: listView._listViewAdapter.isGroupHeader is not a function
File: "file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js, line: 539, column: 62
StackTrace:
Frame: function:'onItemClick', file:'file:///data/data/org.nativescript.myApp/files/app/tns_modules/nativescript-ui-listview/ui-listview.js', line: 539, column: 63
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)....etc.
I did have an itemTap listener on the RadListView but got the same error page.
Any ideas? TIA
==========================
UPDATE
@ogrodowiczp - I tried that and it did not work. Maybe there is a wider issue? I created another test component with a simple RadListView and am getting the same error page when I tap on it. Maybe I have not got it set up properly? I have uninstalled and re-installed the plugin.
My app.module.ts looks like this:
import NativeScriptHttpModule from "nativescript-angular/http";
...
...
imports: [
...
NativeScriptUIListViewModule,
...
],
...
and my package.json:
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript":
"id": "org.nativescript.myApp",
"tns-android":
"version": "4.1.3"
,
"scripts":
"lint": "tslint "app/**/*.ts""
,
"dependencies":
"@angular/animations": "^6.0.9",
"@angular/common": "^6.0.9",
"@angular/compiler": "^6.0.9",
"@angular/core": "^6.0.9",
"@angular/forms": "^6.0.9",
"@angular/http": "^6.0.9",
"@angular/platform-browser": "^6.0.9",
"@angular/platform-browser-dynamic": "^6.0.9",
"@angular/router": "^6.0.9",
"nativescript-angular": "~6.0.0",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^4.0.1",
"nativescript-modal-datetimepicker": "^1.1.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-listview": "^3.8.0",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.1.0",
"tns-core-modules": "^4.2.0",
"zone.js": "^0.8.4"
,
"devDependencies":
"@angular-devkit/core": "~0.6.3",
"@angular/compiler-cli": "^6.0.9",
"@ngtools/webpack": "~6.0.3",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"clean-webpack-plugin": "~0.1.19",
"codelyzer": "~4.3.0",
"copy-webpack-plugin": "~4.5.1",
"css-loader": "~0.28.11",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "^0.7.3",
"nativescript-dev-webpack": "~0.12.0",
"nativescript-worker-loader": "~0.9.0",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.3.0",
"sass-loader": "~7.0.1",
"tslint": "~5.10.0",
"typescript": "~2.7.2",
"uglifyjs-webpack-plugin": "~1.2.5",
"webpack": "~4.6.0",
"webpack-bundle-analyzer": "~2.13.0",
"webpack-cli": "~2.1.3",
"webpack-sources": "~1.1.0"
Thanks.
angular nativescript angular2-nativescript
angular nativescript angular2-nativescript
edited 2 days ago
asked 2 days ago
chakotha
88
88
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53225159%2fanything-wrong-with-this-simple-radlistview-tapping-produces-error-page%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password